Create a contact subscribed trigger
POST /automations/{automationUuid}/automation_triggers/contact_subscribed
/automations/{automationUuid}/automation_triggers/contact_subscribedStarts the automation when a contact becomes subscribed to the automation's audience (by email or by SMS) from one of the chosen origins: added in the app, added through the API or subscribed through a form.
When to use: For welcome series and onboarding of new subscribers.
When not to use: To react every time someone completes a given form, including people who were already subscribed, use create_trigger_form_completed. To start contacts that are already in the audience, create a custom_api trigger with create_trigger_custom_api and call trigger_custom_api.
Side effects: Fires when the subscription is confirmed (with double opt-in, when the contact confirms) and only if the contact was not subscribed yet: updating an existing subscriber does not fire it, a contact who subscribes again does. Contacts brought in by an import or a bulk action do not start it. 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
application/problem+json
curl -X POST "https://api.easymailing.com/automations/0df14405-90ff-4287-b3e4-ef088901ee6f/automation_triggers/contact_subscribed" \ -H "X-Auth-Token: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "sources": [ "suscriber.source.manual" ], "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}