Create a send-email step
POST /automations/{automationUuid}/automation_steps/send_campaign
/automations/{automationUuid}/automation_steps/send_campaignSends an email to the contact when it reaches this step, with content taken from an existing template, builder JSON or raw HTML, and lets it continue. Its place in the flow is set with parent, parent_yes or parent_no; with none of them it becomes the first step.
When to use: To send an email inside a flow: a welcome message, a reminder, a thank-you. Prefer template_simple_json_code to write new content, because it stays editable in the visual editor; use template only to reuse an existing template.
When not to use: To send an email to a whole audience once, create an email campaign with create_campaign. To alert your own team instead of the contact, use create_step_send_notification.
Side effects: The step keeps its email settings as an internal automation campaign. A real email goes to the contact and counts against the plan's sending limits. The contact needs an email address and a confirmed subscription, otherwise the step is skipped; the same email is not sent twice within 6 hours. If the account cannot send (not enough credits, daily limit reached, expired plan, blocked audience), the internal campaign is marked as failed and the step does not complete. If the chosen position is already occupied, the new step is inserted there and the step that was there moves after it.
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 AutomationStep resource
TypeScript Definitions
Use the request body type in TypeScript.
API Resource for automation steps.
This class defines the API endpoints and serves as the base class for all automation step types. Uses DiscriminatorMap for polymorphic serialization.
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_steps/send_campaign" \ -H "X-Auth-Token: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "action": { "subject": "string", "from_name": "string", "from_email": "/entity/1", "reply_to": "/entity/1", "template": "/entity/1", "template_simple_json_code": {}, "template_html": "string", "preview_text": "string", "track_opens": true, "track_clicks": true, "use_conversations": true }, "parent": "/entity/1", "parent_yes": "/entity/1", "parent_no": "/entity/1" }'{ "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "step_type": "string", "automation": "/entity/1", "count_automation_queue_items_completed": 0, "count_automation_queue_items_in_queue": 0, "action": { "subject": "string", "from_name": "string", "from_email": "/entity/1", "reply_to": "/entity/1", "template": "/entity/1", "template_simple_json_code": {}, "template_html": "string", "preview_text": "string", "track_opens": true, "track_clicks": true, "use_conversations": true }, "children": { "next": { "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f", "step_type": "string", "automation": "/entity/1", "count_automation_queue_items_completed": 0, "count_automation_queue_items_in_queue": 0, "action": null, "children": null } }}