Easymailing
Automations

Create an automation

POST /automations

POST/automations

Creates an empty automation in draft status for one audience. It starts with one manual trigger and no steps, and nothing runs until you add steps and triggers and activate it.

When to use: To build a new workflow, for example a welcome series for new subscribers or a follow-up after a purchase. Then add steps with the create_step_* operations, triggers with the create_trigger_* operations, and finish with automation_activate.

When not to use: To send one email to an audience a single time, create an email campaign with create_campaign. To rename an existing automation, use update_automation.

Side effects: The new automation is a draft, so it sends nothing yet. Its audience cannot be changed afterwards.

Permissions: Requires the author role or higher, or the marketing.automations.write capability.

Authorization

X-Auth-Token<token>

Value for the X-Auth-Token header parameter.

In: header

Request Body

The new Automation 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" \  -H "X-Auth-Token: YOUR_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "title": "string",    "description": "string",    "audience": "string"  }'
{  "id": 0,  "uuid": "095be615-a8ad-4c33-8e9c-c7612fbf6c9f",  "title": "string",  "description": "string",  "status": "automation.status.draft",  "audience": "string",  "stats": {    "completed": 0,    "in_queue": 0,    "canceled": 0  },  "automation_triggers": [    {      "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    }  ],  "first_step": "/entity/1",  "orphan_steps": [    "/entity/1"  ],  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}