Create a custom API trigger
POST /automations/{automationUuid}/automation_triggers/custom_api
/automations/{automationUuid}/automation_triggers/custom_apiAdds a trigger that your own system fires, one contact at a time, by calling trigger_custom_api.
When to use: When another system (your app, a CRM, a payment tool) must decide who enters the automation and when.
When not to use: If Easymailing can detect the event itself (a form, a purchase, a click), use the trigger for that event. To start the automation from another automation, use create_step_trigger_automation.
Side effects: Nothing starts until trigger_custom_api is called with this trigger in automation_trigger and the automation is active. The automation is taken from that trigger: the automationUuid in the URL of that call is not checked. Works only while the automation is active and the trigger is enabled, and only for contacts with a confirmed subscription. A contact that is already running through the automation is not started again; after finishing, it can enter again only if workflow_repeat is true and 24 hours have passed.
Permissions: Requires the author role or higher, or the marketing.automations.write capability.
Value for the X-Auth-Token header parameter.
In: header
Path Parameters
UUID of the automation, as returned by list_automations.
The new AutomationTrigger resource
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://api.easymailing.com/automations/0df14405-90ff-4287-b3e4-ef088901ee6f/automation_triggers/custom_api" \ -H "X-Auth-Token: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "workflow_repeat": true }'{ "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "automation": "/entity/1", "trigger_type": "trigger.admin.manual", "active": true, "workflow_repeat": true, "trigger": null, "count_automation_queues": 0, "count_completed_automation_queues": 0, "count_queued_automation_queues": 0, "count_canceled_automation_queues": 0}