Skip to main content

Create Automation

Create an automation and save it as a draft.

name, trigger, and steps are required. steps is a chain of delay and send-email steps, and may end in one branch. The response is the automation detail. Activate it separately with Activate Automation.

Request​

POST /automations

Request Body​

ParameterTypeRequiredDescription
namestringYesAutomation name (max 255 characters). Must contain a non-whitespace character.
triggerobjectYesEnrollment trigger. See below.
stepsarrayYesThe chain, in send order. See Step Object for its size and structure rules.
reentry_policystringNoonce or multiple_times. Defaults to multiple_times.
timezone_modestringNocontact, tenant, or fixed. Defaults to contact. See Automation Object.
timezone_uuidstringNoA timezone from List Timezones. Required when timezone_mode is fixed. With any other mode it must be omitted or null; any other value returns 422 VALIDATION_ERROR.
languagestring|nullNoTwo letters. Stored lowercase. Omit or send null to leave it unset.

status is always draft. The response assigns the automation uuid and each step uuid. Sending status, structure, or uuid returns 422 VALIDATION_ERROR. A step uuid may be omitted or null; any other value returns 422 VALIDATION_ERROR.

trigger.type is one of contact_added_to_list, contact_entered_segment, product_purchased, contact_added_to_waitlist, or contact_updated. Send the UUID that matches type and omit the others. For contact_updated, send conditions and omit the UUIDs. See Trigger Object and Condition Object.

typeSend
contact_added_to_listlist_uuid — a list on your account
contact_entered_segmentsegment_uuid — a segment on your account
product_purchasedproduct_uuid — a product in your store, and optionally variant_uuid — one of its variants
contact_added_to_waitlistwaitlist_uuid — a waitlist in your store
contact_updatedconditions — see Condition Object

Each step's type is timer, send_email, or branch. A timer sends delay_value (an integer — see Step Object for its range) and delay_unit (minutes, hours, or days). A send_email sends subject (max 255), content (Markdown, max 65000), and from_identity (a sender identity on your account — see Step Object). Optional email fields are name (max 255; defaults to the subject), preheader (max 255), from_name (max 255), and reply_to (email, max 255).

A branch sends branches and is the last step. Each arm sends condition_type (audience_matches or audience_not_matches), segment_uuid, and steps (timer and send_email steps). name on an arm is optional. See Step Object, Branch Object, and Email body.

Example Requests​

A linear chain:

curl -X POST "https://email.easy.tools/api/v1/automations" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"name": "Welcome series",
"trigger": {
"type": "contact_added_to_list",
"list_uuid": "cd9a83c7-f3ac-49ff-8031-adf6b455d8b8"
},
"steps": [
{ "type": "timer", "delay_value": 1, "delay_unit": "days" },
{
"type": "send_email",
"subject": "Welcome",
"content": "Hello **there**",
"from_identity": "e050fca6-7eeb-45a1-b3e7-3a1ebff6e375"
}
]
}'

A chain that ends in a branch. The same segment is used on both arms:

curl -X POST "https://email.easy.tools/api/v1/automations" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{
"name": "Welcome series branch",
"trigger": {
"type": "contact_added_to_list",
"list_uuid": "cd9a83c7-f3ac-49ff-8031-adf6b455d8b8"
},
"steps": [
{ "type": "timer", "delay_value": 1, "delay_unit": "hours" },
{
"type": "branch",
"branches": [
{
"condition_type": "audience_matches",
"segment_uuid": "26e7be80-cd42-4191-889d-fc9497a0568d",
"name": "Already bought",
"steps": [
{
"type": "send_email",
"subject": "Welcome",
"content": "Hello",
"from_identity": "e050fca6-7eeb-45a1-b3e7-3a1ebff6e375"
}
]
},
{
"condition_type": "audience_not_matches",
"segment_uuid": "26e7be80-cd42-4191-889d-fc9497a0568d",
"steps": [
{
"type": "send_email",
"subject": "An offer",
"content": "See this",
"from_identity": "e050fca6-7eeb-45a1-b3e7-3a1ebff6e375"
}
]
}
]
}
]
}'

Response​

Success Response (201 Created)​

The automation detail. See Automation Object.

A linear chain has structure linear. Every step has branches set to null.

{
"data": {
"uuid": "976854b8-692b-4f5e-aca9-30b3053de7ae",
"name": "Welcome series",
"status": "draft",
"structure": "linear",
"trigger": {
"type": "contact_added_to_list",
"list_uuid": "cd9a83c7-f3ac-49ff-8031-adf6b455d8b8",
"segment_uuid": null,
"product_uuid": null,
"variant_uuid": null,
"waitlist_uuid": null,
"conditions": null
},
"reentry_policy": "multiple_times",
"timezone_mode": "contact",
"timezone_uuid": null,
"language": null,
"steps": [
{
"uuid": "7dfb27a9-7c68-43ad-af24-ff3ff65050f1",
"type": "timer",
"delay_value": 1,
"delay_unit": "days",
"name": null,
"subject": null,
"preheader": null,
"from_name": null,
"reply_to": null,
"from_identity": null,
"from_email": null,
"content": null,
"content_editable_via_api": null,
"content_overwrite_required": null,
"branches": null
},
{
"uuid": "7e80dfed-47d3-4934-9368-6d6b8b179164",
"type": "send_email",
"delay_value": null,
"delay_unit": null,
"name": "Welcome",
"subject": "Welcome",
"preheader": null,
"from_name": null,
"reply_to": null,
"from_identity": "e050fca6-7eeb-45a1-b3e7-3a1ebff6e375",
"from_email": "hello@example.com",
"content": "Hello **there**",
"content_editable_via_api": true,
"content_overwrite_required": false,
"branches": null
}
],
"created_at": "2026-09-29T11:58:38Z",
"updated_at": "2026-09-29T11:58:38Z"
}
}

A chain that ends in a branch has structure branched. The branch step and each step inside an arm have their own uuid. branches is null on every timer and send_email.

{
"data": {
"uuid": "2b34fffc-17ef-4062-8900-e4a62e3337c5",
"name": "Welcome series branch",
"status": "draft",
"structure": "branched",
"trigger": {
"type": "contact_added_to_list",
"list_uuid": "cd9a83c7-f3ac-49ff-8031-adf6b455d8b8",
"segment_uuid": null,
"product_uuid": null,
"variant_uuid": null,
"waitlist_uuid": null,
"conditions": null
},
"reentry_policy": "multiple_times",
"timezone_mode": "contact",
"timezone_uuid": null,
"language": null,
"steps": [
{
"uuid": "867e6910-c507-4d0a-8037-222a68dc4b30",
"type": "timer",
"delay_value": 1,
"delay_unit": "hours",
"name": null,
"subject": null,
"preheader": null,
"from_name": null,
"reply_to": null,
"from_identity": null,
"from_email": null,
"content": null,
"content_editable_via_api": null,
"content_overwrite_required": null,
"branches": null
},
{
"uuid": "15b5e475-0571-4fad-96b7-d1a37af4776e",
"type": "branch",
"delay_value": null,
"delay_unit": null,
"name": null,
"subject": null,
"preheader": null,
"from_name": null,
"reply_to": null,
"from_identity": null,
"from_email": null,
"content": null,
"content_editable_via_api": null,
"content_overwrite_required": null,
"branches": [
{
"condition_type": "audience_matches",
"segment_uuid": "26e7be80-cd42-4191-889d-fc9497a0568d",
"name": "Already bought",
"steps": [
{
"uuid": "a1ed6f10-1409-4d17-a75a-2c14d31c025a",
"type": "send_email",
"delay_value": null,
"delay_unit": null,
"name": "Welcome",
"subject": "Welcome",
"preheader": null,
"from_name": null,
"reply_to": null,
"from_identity": "e050fca6-7eeb-45a1-b3e7-3a1ebff6e375",
"from_email": "hello@example.com",
"content": "Hello",
"content_editable_via_api": true,
"content_overwrite_required": false,
"branches": null
}
]
},
{
"condition_type": "audience_not_matches",
"segment_uuid": "26e7be80-cd42-4191-889d-fc9497a0568d",
"name": null,
"steps": [
{
"uuid": "79f050b4-779b-4cc1-acc5-6d10234848d5",
"type": "send_email",
"delay_value": null,
"delay_unit": null,
"name": "An offer",
"subject": "An offer",
"preheader": null,
"from_name": null,
"reply_to": null,
"from_identity": "e050fca6-7eeb-45a1-b3e7-3a1ebff6e375",
"from_email": "hello@example.com",
"content": "See this",
"content_editable_via_api": true,
"content_overwrite_required": false,
"branches": null
}
]
}
]
}
],
"created_at": "2026-09-30T11:52:46Z",
"updated_at": "2026-09-30T11:52:46Z"
}
}

Response Fields​

See Automation Object.

Error Responses​

Validation Error (422 Unprocessable Entity)​

Returned when the body is missing a required field, a referenced list, segment, sender identity, or timezone does not belong to your account, or a step breaks the rules in Step Object. A missing or extra condition, a prohibited UUID on trigger, or a custom field that is not on your account is a validation error. See Condition Object. Size and shape errors on the chain use messages such as The steps field must be a list. or The steps.1.branches field must not have more than 10 items.

{
"error": {
"code": "VALIDATION_ERROR",
"message": "The given data was invalid",
"details": {
"steps.1.branches.0.segment_uuid": ["Contact segment not found"]
}
}
}