curl --request POST \
--url https://cloudapi.mailercloud.com/v1/automations \
--header 'Authorization: <api-key>' \
--header 'Content-Type: <content-type>' \
--data '
{
"name": "Welcome series for new subscribers",
"timezone": "Asia/Kolkata",
"auto_publish": true,
"nodes": [
{
"id": "n1",
"type": "trigger",
"trigger": "list_subscribed",
"list": "Newsletter Subscribers"
},
{
"id": "n2",
"parent_id": "n1",
"type": "wait_for_period",
"days": 1
},
{
"id": "n3",
"parent_id": "n2",
"type": "if_else",
"filters": [
[
{
"condition": "subscriber_status",
"operator": "is",
"status_value": "active"
}
]
]
},
{
"id": "n4",
"parent_id": "n3",
"branch": "yes",
"type": "add_tag",
"tag": "Welcomed-Active"
},
{
"id": "n5",
"parent_id": "n3",
"branch": "no",
"type": "add_tag",
"tag": "Welcomed-Inactive"
}
]
}
'{
"id": "wHKw",
"status": "draft"
}Create Automation
API to create an advanced automation in a single request. name and nodes are required. auto_publish is optional (defaults to false = draft). timezone, start_time, end_time, allow_re_enrollment, re_enroll_interval, re_enroll_unit are optional.
The automation is declared as a directed graph of nodes: exactly one trigger node, plus any number of action / wait / condition nodes wired via parent_id. Caller-supplied node ids (id, parent_id, target_id) are short strings used only to wire the graph in the request; they are not stored.
Plan gate: the caller’s plan must include advanced automation, otherwise a 403 is returned.
curl --request POST \
--url https://cloudapi.mailercloud.com/v1/automations \
--header 'Authorization: <api-key>' \
--header 'Content-Type: <content-type>' \
--data '
{
"name": "Welcome series for new subscribers",
"timezone": "Asia/Kolkata",
"auto_publish": true,
"nodes": [
{
"id": "n1",
"type": "trigger",
"trigger": "list_subscribed",
"list": "Newsletter Subscribers"
},
{
"id": "n2",
"parent_id": "n1",
"type": "wait_for_period",
"days": 1
},
{
"id": "n3",
"parent_id": "n2",
"type": "if_else",
"filters": [
[
{
"condition": "subscriber_status",
"operator": "is",
"status_value": "active"
}
]
]
},
{
"id": "n4",
"parent_id": "n3",
"branch": "yes",
"type": "add_tag",
"tag": "Welcomed-Active"
},
{
"id": "n5",
"parent_id": "n3",
"branch": "no",
"type": "add_tag",
"tag": "Welcomed-Inactive"
}
]
}
'{
"id": "wHKw",
"status": "draft"
}Authorizations
Your Mailercloud API key (plain text, no Bearer prefix). Create keys in Settings → API.
Headers
Request body type
Body
Automation display name. HTML is stripped server-side.
Minimum: 1 Maximum: 150
1 - 150DAG of trigger + downstream action / condition nodes. Exactly one trigger node is required; no orphans and no cycles allowed.
Minimum items: 1 Maximum items: 500
1 - 500 elementsShow child attributes
Show child attributes
IANA timezone (e.g. Asia/Kolkata, America/New_York, UTC). Defaults to the caller's account timezone.
If true, the automation is published immediately and the response returns status=active. If false (default), it is saved as a draft and returns status=draft.
Allow the same contact to re-enter this automation after completing or exiting.
Minimum wait before a contact can re-enroll. Required when allow_re_enrollment is true.
Minimum: 1 Maximum: 30
1 <= x <= 30Unit for re_enroll_interval. Required when allow_re_enrollment is true.
Supported values: hours, days, weeks
hours, days, weeks Earliest UTC moment the automation will accept new contacts.
Format: YYYY-MM-DD HH:mm:ss
Must be in the future.
Latest UTC moment the automation will accept new contacts.
Format: YYYY-MM-DD HH:mm:ss
Must be in the future and >= start_time.
Response
Created
draft when auto_publish=false. active when auto_publish=true and all publish gates pass.
draft, active