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.
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 elementsIANA 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