Start an automation for a contact via API
POST /automations/{automationUuid}/automation_queues/trigger_custom_api
/automations/{automationUuid}/automation_queues/trigger_custom_apiStarts the automation for one contact, identified by email, through one of its custom_api triggers: the contact enters at the first step straight away.
When to use: When your own system or website decides that a contact must enter an automation (for example after a signup in your app) instead of Easymailing detecting the event itself.
When not to use: To add a person to the audience first, use create_audience_member. To create the trigger this call needs, use create_trigger_custom_api. Triggers of any other type start by themselves and cannot be started with this operation.
Side effects: The first step runs immediately, so any email, SMS, group change or webhook in the automation happens right away for that contact. It also fires the member_automation_started webhook. Only unconfirmed contacts are rejected: a contact that is unsubscribed is accepted, but its run is cancelled straight away.
Permissions: Requires the author role or higher, or the marketing.automations.activate capability.
Value for the X-Auth-Token header parameter.
In: header
Path Parameters
UUID of the automation that owns the trigger, as returned by list_automations.
The new AutomationQueue resource
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/problem+json
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_queues/trigger_custom_api" \ -H "X-Auth-Token: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "email": "user@example.com", "automation_trigger": "/entity/1" }'{ "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "status": "automation.queue.status.queued", "automation_trigger": { "trigger_type": "trigger.admin.manual", "active": true, "workflow_repeat": true, "trigger": null }, "member": { "email": "user@example.com", "client_ip": "192.168.0.1", "locale": "string", "location": { "city": "string", "postal_code": "string", "timezone": "string", "country_code": "string", "country": "string", "lat": 0.1, "lng": 0.1 }, "status": "suscriber.status.confirmed", "email_opt_in_source": "suscriber.source.manual", "email_opt_in_at": "2019-08-24T14:15:22Z", "email_opt_out_at": "2019-08-24T14:15:22Z", "source": "suscriber.source.manual", "rating": 0.1, "audience": "string", "groups": [ { "title": "string", "description": "string", "color": "string", "public": true } ], "member_consent": { "ip": "192.168.0.1", "consent_at": "2019-08-24T14:15:22Z", "treatment_purposes": [ { "translations": [ { "title": "string", "locale": "string" } ], "description": "string" } ] }, "custom_fields": [ { "list_field": "/entity/1", "value": "string" } ], "suscription_form": "/entity/1", "stats": { "sent": 0, "delivered_emails": 0, "unique_opens": 0, "unique_clicks": 0, "open_rate": 0, "click_rate": 0, "orders": 0, "revenue": 0, "order_rate": 0, "avg_revenue": 0 }, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }, "automation": "/entity/1"}