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.
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.
draft when auto_publish=false. active when auto_publish=true and all publish gates pass.
Available options:
draft,
active
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Mailercloud API","description":"Send campaigns, manage contacts, and automate email with the Mailercloud API.","colors":{"primary":"#1B7CFF","light":"#4D9AFF","dark":"#0F62D8"},"logo":{"light":"https://mintcdn.com/mailercloud/i1yaE0mG2KZobCyB/logo/light.svg?fit=max\u0026auto=format\u0026n=i1yaE0mG2KZobCyB\u0026q=85\u0026s=ee63a470243c3c865ec9248b577f2a20","dark":"https://mintcdn.com/mailercloud/141gVSRGKgQdCHEd/logo/dark.svg?fit=max\u0026auto=format\u0026n=141gVSRGKgQdCHEd\u0026q=85\u0026s=cc781b737536e3755238b1d9eaf979c3","href":"https://www.mailercloud.com"},"favicon":"https://mintcdn.com/mailercloud/i1yaE0mG2KZobCyB/favicon.png?fit=max\u0026auto=format\u0026n=i1yaE0mG2KZobCyB\u0026q=85\u0026s=00200874c6abcc324677e5a8fb5505c0","api":{"playground":{"display":"interactive"},"examples":{"defaults":"all","languages":["curl","python","javascript","php","go"]}},"background":{"color":{"dark":"#0A1220"}},"navbar":{"links":[{"href":"https://app.mailercloud.com/login","label":"Sign In"}],"primary":{"type":"button","label":"Get Started","href":"https://app.mailercloud.com/register?source=apidoc"}},"footer":{"socials":{"website":"https://www.mailercloud.com","x":"https://twitter.com/mailercloud","linkedin":"https://www.linkedin.com/company/mailercloud","facebook":"https://www.facebook.com/mailercloud","youtube":"https://www.youtube.com/channel/UCslSwv-TECN8rLvFM8wRlog"}},"fonts":{"heading":{"family":"Hanken Grotesk","weight":600},"body":{"family":"Inter","weight":400}},"styling":{"eyebrows":"breadcrumbs","latex":false},"contextual":{"options":["copy","view","chatgpt","claude","mcp","cursor"],"display":"header"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"mailercloud","hasAudioNarration":false,"actualSubdomain":"mailercloud","customDomains":["apidoc.mailercloud.com"],"gitSource":{"type":"github","owner":"mailercloud-com","repo":"mailercloud-api-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"latestBuiltDeploymentHistoryId":"6ae1cccc201cdb70a521d146","collectionId":"631a1394-a3ec-4363-965d-624bbb36882a","liveDeploymentHistoryId":"6ae1cccc201cdb70a521d146","schemaVersion":"v3"},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae1cccc201cdb70a521d146","clientVersion":"0.0.4006","searchFilterCounts":[{"language":"default","tag":"Marketing API","count":71},{"language":"default","tag":"Documentation","count":13},{"language":"default","tag":"Campaigns","count":12},{"language":"default","tag":"Guides","count":8},{"language":"default","tag":"Contacts","count":8},{"language":"default","tag":"Domains","count":7},{"language":"default","tag":"Inbox Tracker","count":7},{"language":"default","tag":"Webhooks","count":7},{"language":"default","tag":"Email API","count":6},{"language":"default","tag":"Email","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true,"deflection":{"enabled":true,"email":"support@mailercloud.com"}},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":"#content-area .prose.text-lg{font-size:1rem;line-height:1.7}#pagination .pagination-title{font-size:.875rem;line-height:1.45}#navbar,#navbar-transition{background:linear-gradient(90deg,#0f62d8 0,#1b7cff 65%,#3d8bff 100%)!important;border-bottom:none!important;backdrop-filter:none!important}#navbar a,#navbar button,#navbar p,#navbar span,#navbar svg{color:#fff}#navbar a:hover{opacity:.85}#navbar img[src*=\"logo/light\"]{display:none!important}#navbar img[src*=\"logo/dark\"]{display:block!important}#topbar-cta-button a>span.absolute{background:#fff!important}#assistant-entry,#assistant-entry *,#topbar-cta-button,#topbar-cta-button *{color:#0f62d8!important}#search-bar-entry{background:rgba(255,255,255,.15);border-color:rgba(255,255,255,.3)}.dark #navbar,.dark #navbar-transition{background:linear-gradient(90deg,#0b2a55 0,#10408a 65%,#164fa5 100%)!important}.dark #assistant-entry,.dark #assistant-entry *{color:#7eb3ff!important}.dark #topbar-cta-button,.dark #topbar-cta-button *{color:#0f62d8!important}.tryit-button{background:#1b7cff!important;color:#fff!important}.tryit-button:hover{background:#0f62d8!important;opacity:1!important}#content-area h1{font-size:1.9375rem}#content-area h2{font-size:1.5625rem}#content-area h3{font-size:1.25rem}"}],"page":{"pagePath":"api-reference/automations/create-automation","slug":"/api-reference/automations/create-automation","pageMetadata":{"title":"Create Automation","description":"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.\n\nThe 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.\n\n**Plan gate:** the caller's plan must include advanced automation, otherwise a `403` is returned.","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /automations","href":"/api-reference/automations/create-automation","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n strong: \"strong\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsxs(_components.p, {\n children: [\"API to create an advanced automation in a single request. \", _jsx(_components.code, {\n children: \"name\"\n }), \" and \", _jsx(_components.code, {\n children: \"nodes\"\n }), \" are required. \", _jsx(_components.code, {\n children: \"auto_publish\"\n }), \" is optional (defaults to \", _jsx(_components.code, {\n children: \"false\"\n }), \" = draft). \", _jsx(_components.code, {\n children: \"timezone\"\n }), \", \", _jsx(_components.code, {\n children: \"start_time\"\n }), \", \", _jsx(_components.code, {\n children: \"end_time\"\n }), \", \", _jsx(_components.code, {\n children: \"allow_re_enrollment\"\n }), \", \", _jsx(_components.code, {\n children: \"re_enroll_interval\"\n }), \", \", _jsx(_components.code, {\n children: \"re_enroll_unit\"\n }), \" are optional.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"The automation is declared as a directed graph of nodes: exactly one trigger node, plus any number of action / wait / condition nodes wired via \", _jsx(_components.code, {\n children: \"parent_id\"\n }), \". Caller-supplied node ids (\", _jsx(_components.code, {\n children: \"id\"\n }), \", \", _jsx(_components.code, {\n children: \"parent_id\"\n }), \", \", _jsx(_components.code, {\n children: \"target_id\"\n }), \") are short strings used only to wire the graph in the request; they are not stored.\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [_jsx(_components.strong, {\n children: \"Plan gate:\"\n }), \" the caller’s plan must include advanced automation, otherwise a \", _jsx(_components.code, {\n children: \"403\"\n }), \" is returned.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create Automation","description":"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.\n\nThe 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.\n\n**Plan gate:** the caller's plan must include advanced automation, otherwise a `403` is returned.","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /automations","href":"/api-reference/automations/create-automation","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"summary":"Create Automation","operationId":"create-automation","description":"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.\n\nThe 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.\n\n**Plan gate:** the caller's plan must include advanced automation, otherwise a `403` is returned.","tags":["Automations"],"parameters":["e61e8454-9908-4b65-9d6a-1d9d6d698ec5"],"requestBody":"7ad3755b-1818-4a02-ba8b-b14dcde64261","responses":{"201":"540f881c-5b78-445f-bb89-b025b351da7b","400":"7e7b2b53-1a02-4b4c-ac47-ceb877990c43","401":"87ff9fcb-f29f-4353-8e14-ea33f5bc2912","403":"47673946-47b8-4581-a1f5-d30f1a995046","500":"5387bf7b-ddc6-4b4e-a6b5-40d9a21bf645"},"method":"post","type":"path","servers":["525ccd40-acd0-4c1f-b45f-645a2ccc048d"],"security":["797e1cf7-8b79-49d7-8256-e509d254deea"],"path":"/automations","baseUrlOptions":["https://cloudapi.mailercloud.com/v1"],"title":"Create Automation","codeSamples":[],"requestExampleLanguages":["bash","python","javascript","php","go"],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{"e61e8454-9908-4b65-9d6a-1d9d6d698ec5":{"name":"Content-Type","in":"header","required":true,"description":"Request body type","schema":{"type":"string","default":"application/json","isRequired":true,"description":"Request body type","uniqueKey":"","typeLabel":"string"}}},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","nodes"],"properties":{"name":{"type":"string","minLength":1,"maxLength":150,"description":"Automation display name. HTML is stripped server-side.\n\nMinimum: 1\nMaximum: 150","isRequired":true,"uniqueKey":"name","typeLabel":"string"},"nodes":{"type":"array","minItems":1,"maxItems":500,"description":"DAG of trigger + downstream action / condition nodes. Exactly one trigger node is required; no orphans and no cycles allowed.\n\nMinimum items: 1\nMaximum items: 500","items":{"type":"object","required":["id","type"],"properties":{"type":{"type":"string","enum":["trigger","wait_for_period","wait_until_time","wait_for_event","if_else","random_split","goto","delete_contact","update_contact_property","add_tag","remove_tag","add_to_list","remove_from_list"],"description":"Node type. The trigger type must appear exactly once at the root.\n\nSupported types: trigger, wait_for_period, wait_until_time, wait_for_event, if_else, random_split, goto, delete_contact, update_contact_property, add_tag, remove_tag, add_to_list, remove_from_list","isRequired":true,"uniqueKey":"nodes.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"parent_id":{"type":"string","description":"Parent node's id. Required on every node except the trigger.","uniqueKey":"nodes.items.[INDEX].parent_id","typeLabel":"string"},"branch":{"type":"string","enum":["yes","no"],"description":"Required on direct children of if_else and random_split.\n\nSupported values: yes, no","uniqueKey":"nodes.items.[INDEX].branch","typeLabel":"enum\u003cstring>"},"target_id":{"type":"string","description":"Target node id for goto nodes. Must reference an existing caller id that is NOT in this node's ancestor chain.","uniqueKey":"nodes.items.[INDEX].target_id","typeLabel":"string"},"trigger":{"type":"string","enum":["list_subscribed","audience_subscribed","webform_submitted","contact_added_via_api","any_property_changed","list_property_changed","campaign_opened","campaign_not_opened","campaign_clicked","campaign_not_clicked","campaign_sent","date_property","tag_added"],"description":"Trigger type. Required when type=trigger.\n\nSupported triggers: list_subscribed, audience_subscribed, webform_submitted, contact_added_via_api, any_property_changed, list_property_changed, campaign_opened, campaign_not_opened, campaign_clicked, campaign_not_clicked, campaign_sent, date_property, tag_added","uniqueKey":"nodes.items.[INDEX].trigger","typeLabel":"enum\u003cstring>"},"list":{"type":"string","description":"List name (cid-scoped). Required for list_subscribed, contact_added_via_api, any_property_changed, list_property_changed triggers AND for add_to_list / remove_from_list nodes.","uniqueKey":"nodes.items.[INDEX].list","typeLabel":"string"},"webform":{"type":"string","description":"Webform name (cid-scoped). Required for webform_submitted trigger.","uniqueKey":"nodes.items.[INDEX].webform","typeLabel":"string"},"campaign":{"type":"string","description":"Campaign name (cid-scoped). Required for all 5 campaign_* triggers and for wait_for_event when the event is a campaign trigger.","uniqueKey":"nodes.items.[INDEX].campaign","typeLabel":"string"},"tag":{"type":"string","maxLength":100,"description":"Tag name (cid-scoped). Required for tag_added trigger and add_tag / remove_tag nodes. Also accepted as the single-tag form of the if_else contact_tag filter.\n\nMaximum: 100","uniqueKey":"nodes.items.[INDEX].tag","typeLabel":"string"},"property":{"type":"string","description":"Custom field mapping_name (e.g. custom_1, country). Required for any_property_changed, list_property_changed, date_property triggers; update_contact_property node; and contact_property if_else filter.\n\nAllowed characters: ^[A-Za-z0-9_]+$","uniqueKey":"nodes.items.[INDEX].property","typeLabel":"string"},"property_condition":{"type":"string","enum":["equals","not_equals","is_known","is_unknown","contains","does_not_contain","starts_with","ends_with"],"description":"Property comparison operator. Required for property triggers and update_contact_property.\n\nSupported values: equals, not_equals, is_known, is_unknown, contains, does_not_contain, starts_with, ends_with","uniqueKey":"nodes.items.[INDEX].property_condition","typeLabel":"enum\u003cstring>"},"property_value":{"type":"string","description":"Comparison value for property triggers. Not required when property_condition is is_known or is_unknown.","uniqueKey":"nodes.items.[INDEX].property_value","typeLabel":"string"},"value":{"description":"Used by update_contact_property (new value to assign) and as the generic value slot for some if_else condition operators.\n\nType depends on operator (string / number / object {from, to} for between / object {from_date, to_date} for between_dates).","uniqueKey":"nodes.items.[INDEX].value","typeLabel":"any"},"allow_import":{"type":"boolean","description":"If true, contacts imported via CSV / API also trigger this automation. Applies to list_subscribed, audience_subscribed, contact_added_via_api, property triggers and tag_added.","uniqueKey":"nodes.items.[INDEX].allow_import","typeLabel":"boolean"},"set_time_limit":{"type":"boolean","description":"If true, the trigger waits at most wait_for / wait_unit before evaluating. Optional on property and campaign_opened / campaign_clicked triggers.","uniqueKey":"nodes.items.[INDEX].set_time_limit","typeLabel":"boolean"},"wait_for":{"type":"integer","minimum":1,"description":"How long to wait before triggering. Required for campaign_not_opened and campaign_not_clicked. Optional for property and campaign_opened / campaign_clicked triggers when set_time_limit is true.","uniqueKey":"nodes.items.[INDEX].wait_for","typeLabel":"integer"},"wait_unit":{"type":"string","enum":["hours","days","weeks"],"description":"Unit for wait_for.\n\nSupported values: hours, days, weeks","uniqueKey":"nodes.items.[INDEX].wait_unit","typeLabel":"enum\u003cstring>"},"when":{"type":"string","enum":["same_day","before","after"],"description":"Required for date_property trigger.\n\nSupported values: same_day, before, after","uniqueKey":"nodes.items.[INDEX].when","typeLabel":"enum\u003cstring>"},"day":{"type":"integer","description":"For date_property trigger when when != same_day: 1-90 days before/after. For wait_until_time node with mode=day_of_month: 1-31.","uniqueKey":"nodes.items.[INDEX].day","typeLabel":"integer"},"time":{"type":"string","description":"HH:mm for date_property trigger. HH:mm:ss (must not be 00:00:00) for wait_until_time node.","uniqueKey":"nodes.items.[INDEX].time","typeLabel":"string"},"is_recurring":{"type":"boolean","description":"Optional on date_property trigger.","uniqueKey":"nodes.items.[INDEX].is_recurring","typeLabel":"boolean"},"days":{"type":"integer","minimum":0,"maximum":90,"description":"wait_for_period delay (days). At least one of days / hours / minutes must be > 0.\n\nMinimum: 0\nMaximum: 90","uniqueKey":"nodes.items.[INDEX].days","typeLabel":"integer"},"hours":{"type":"integer","minimum":0,"maximum":24,"description":"wait_for_period delay (hours).\n\nMinimum: 0\nMaximum: 24","uniqueKey":"nodes.items.[INDEX].hours","typeLabel":"integer"},"minutes":{"type":"integer","minimum":0,"maximum":60,"description":"wait_for_period delay (minutes).\n\nMinimum: 0\nMaximum: 60","uniqueKey":"nodes.items.[INDEX].minutes","typeLabel":"integer"},"mode":{"type":"string","enum":["time_of_day","day_of_week","day_of_month","specific_date"],"description":"Required for wait_until_time node.\n\nSupported values: time_of_day, day_of_week, day_of_month, specific_date","uniqueKey":"nodes.items.[INDEX].mode","typeLabel":"enum\u003cstring>"},"weeks":{"type":"array","minItems":1,"items":{"type":"string","enum":["mon","tue","wed","thu","fri","sat","sun"],"uniqueKey":"nodes.items.[INDEX].weeks.items.[INDEX]","typeLabel":"enum\u003cstring>"},"description":"Required when wait_until_time mode=day_of_week.\n\nSupported values: mon, tue, wed, thu, fri, sat, sun","uniqueKey":"nodes.items.[INDEX].weeks","typeLabel":"enum\u003cstring>[]"},"date":{"type":"string","description":"Required when wait_until_time mode=specific_date.\n\nFormat: YYYY-MM-DD (must be >= today).","uniqueKey":"nodes.items.[INDEX].date","typeLabel":"string"},"event":{"type":"string","description":"Trigger name to wait for. Required for wait_for_event node. Use one of the trigger values. The matching trigger's required fields must also be supplied on the same node (e.g. event=campaign_opened requires campaign).","uniqueKey":"nodes.items.[INDEX].event","typeLabel":"string"},"tags":{"type":"array","items":{"type":"string","uniqueKey":"nodes.items.[INDEX].tags.items.[INDEX]","typeLabel":"string"},"maxItems":100,"description":"Multi-tag form of the if_else contact_tag filter.\n\nMaximum: 100 entries","uniqueKey":"nodes.items.[INDEX].tags","typeLabel":"string[]"},"filters":{"type":"array","maxItems":3,"description":"if_else filter groups. The outer array is OR (max 3 groups). Each inner array is AND (>=1 condition per group).","items":{"type":"array","minItems":1,"items":{"type":"object","required":["condition","operator"],"properties":{"condition":{"type":"string","enum":["contact_property","subscriber_status","contact_rating","domain","subscriber_opened","global_openers","campaign_tag","campaign_activity","contact_tag","contact_details"],"description":"Filter condition type.\n\nSupported values: contact_property, subscriber_status, contact_rating, domain, subscriber_opened, global_openers, campaign_tag, campaign_activity, contact_tag, contact_details","isRequired":true,"uniqueKey":"nodes.items.[INDEX].filters.items.[INDEX].items.[INDEX].condition","typeLabel":"enum\u003cstring>"},"operator":{"type":"string","description":"Allowed values depend on condition.\n\ncontact_property: equals, not_equals, is_known, is_unknown, contains, does_not_contain, starts_with, ends_with\n\nsubscriber_status: is, is_not\n\ncontact_rating: equals, between\n\ndomain: equals, not_equals, is_empty, is_not_empty\n\nsubscriber_opened: count, in_last_days, not_in_last_days\n\nglobal_openers: equals, not_equals, less_than, greater_than, between\n\ncampaign_tag, campaign_activity, contact_tag, contact_details: any_time, between_dates, in_last_days","isRequired":true,"uniqueKey":"nodes.items.[INDEX].filters.items.[INDEX].items.[INDEX].operator","typeLabel":"string"},"status_value":{"type":"string","enum":["active","unknown","valid","opened","clicked"],"description":"Required when condition=subscriber_status. Use this key (not the generic value).\n\nSupported values: active, unknown, valid, opened, clicked","uniqueKey":"nodes.items.[INDEX].filters.items.[INDEX].items.[INDEX].status_value","typeLabel":"enum\u003cstring>"},"value":{"description":"Operator-shaped value.\n\nbetween: {from: int, to: int}\nbetween_dates: {from_date: YYYY-MM-DD, to_date: YYYY-MM-DD}\nin_last_days / not_in_last_days: int 1-365\nis_known / is_unknown / is_empty / is_not_empty: omit value entirely","uniqueKey":"nodes.items.[INDEX].filters.items.[INDEX].items.[INDEX].value","typeLabel":"any"},"tag":{"type":"string","description":"Single-tag form of the contact_tag filter.","uniqueKey":"nodes.items.[INDEX].filters.items.[INDEX].items.[INDEX].tag","typeLabel":"string"},"tags":{"type":"array","items":{"type":"string","uniqueKey":"nodes.items.[INDEX].filters.items.[INDEX].items.[INDEX].tags.items.[INDEX]","typeLabel":"string"},"maxItems":100,"description":"Multi-tag form of the contact_tag filter.\n\nMaximum: 100 entries","uniqueKey":"nodes.items.[INDEX].filters.items.[INDEX].items.[INDEX].tags","typeLabel":"string[]"},"property":{"type":"string","description":"Custom field mapping_name. Required when condition=contact_property.\n\nAllowed characters: ^[A-Za-z0-9_]+$","uniqueKey":"nodes.items.[INDEX].filters.items.[INDEX].items.[INDEX].property","typeLabel":"string"}},"uniqueKey":"nodes.items.[INDEX].filters.items.[INDEX].items.[INDEX]","typeLabel":"object"},"uniqueKey":"nodes.items.[INDEX].filters.items.[INDEX]","typeLabel":"object[]"},"uniqueKey":"nodes.items.[INDEX].filters","typeLabel":"object[][]"}},"uniqueKey":"nodes.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"nodes","typeLabel":"object[]"},"timezone":{"type":"string","description":"IANA timezone (e.g. Asia/Kolkata, America/New_York, UTC). Defaults to the caller's account timezone.","uniqueKey":"timezone","typeLabel":"string"},"auto_publish":{"type":"boolean","default":false,"description":"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.","uniqueKey":"auto_publish","typeLabel":"boolean"},"allow_re_enrollment":{"type":"boolean","default":false,"description":"Allow the same contact to re-enter this automation after completing or exiting.","uniqueKey":"allow_re_enrollment","typeLabel":"boolean"},"re_enroll_interval":{"type":"integer","minimum":1,"maximum":30,"description":"Minimum wait before a contact can re-enroll. Required when allow_re_enrollment is true.\n\nMinimum: 1\nMaximum: 30","uniqueKey":"re_enroll_interval","typeLabel":"integer"},"re_enroll_unit":{"type":"string","enum":["hours","days","weeks"],"description":"Unit for re_enroll_interval. Required when allow_re_enrollment is true.\n\nSupported values: hours, days, weeks","uniqueKey":"re_enroll_unit","typeLabel":"enum\u003cstring>"},"start_time":{"type":"string","description":"Earliest UTC moment the automation will accept new contacts.\n\nFormat: YYYY-MM-DD HH:mm:ss\n\nMust be in the future.","uniqueKey":"start_time","typeLabel":"string"},"end_time":{"type":"string","description":"Latest UTC moment the automation will accept new contacts.\n\nFormat: YYYY-MM-DD HH:mm:ss\n\nMust be in the future and >= start_time.","uniqueKey":"end_time","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example-1---Welcome-series":{"title":"Example-1---Welcome-series","value":{"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"}]}},"Example-2---Birthday-A-B-test":{"title":"Example-2---Birthday-A-B-test","value":{"name":"Birthday wishes - A/B variant test","timezone":"Asia/Kolkata","auto_publish":true,"allow_re_enrollment":true,"re_enroll_interval":1,"re_enroll_unit":"weeks","nodes":[{"id":"n1","type":"trigger","trigger":"date_property","property":"birthday","when":"same_day","time":"09:00","is_recurring":true},{"id":"n2","parent_id":"n1","type":"random_split"},{"id":"n3","parent_id":"n2","branch":"yes","type":"add_tag","tag":"Birthday-Variant-A"},{"id":"n4","parent_id":"n2","branch":"no","type":"add_tag","tag":"Birthday-Variant-B"}]}},"Example-3---Re-engage-non-openers":{"title":"Example-3---Re-engage-non-openers","value":{"name":"Re-engage Spring Sale non-openers","timezone":"America/New_York","auto_publish":false,"start_time":"2026-06-01 00:00:00","end_time":"2026-07-31 23:59:59","nodes":[{"id":"n1","type":"trigger","trigger":"campaign_not_opened","campaign":"Spring Sale 2026","wait_for":3,"wait_unit":"days"},{"id":"n2","parent_id":"n1","type":"wait_until_time","mode":"day_of_week","time":"10:00:00","weeks":["mon","tue","wed","thu","fri"]},{"id":"n3","parent_id":"n2","type":"if_else","filters":[[{"condition":"subscriber_status","operator":"is","status_value":"active"},{"condition":"contact_rating","operator":"between","value":{"from":3,"to":5}}],[{"condition":"contact_tag","operator":"any_time","tag":"VIP"}]]},{"id":"n4","parent_id":"n3","branch":"yes","type":"add_to_list","list":"Re-engagement Pool"},{"id":"n5","parent_id":"n3","branch":"no","type":"remove_tag","tag":"Engaged"}]}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"540f881c-5b78-445f-bb89-b025b351da7b":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["draft","active"],"description":"draft when auto_publish=false. active when auto_publish=true and all publish gates pass.","uniqueKey":"status","typeLabel":"enum\u003cstring>"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example-1---draft":{"title":"Example-1---draft","value":{"id":"wHKw","status":"draft"}},"Example-2---active":{"title":"Example-2---active","value":{"id":"wHKH","status":"active"}}},"exampleType":"examples"}},"exampleType":"examples"},"7e7b2b53-1a02-4b4c-ac47-ceb877990c43":{"description":"Bad Request - validation, entity-name resolution, or publish gate failure","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"errors.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example-1":{"title":"Example-1","value":{"errors":[{"field":"nodes[2].tag","message":"tag \"VIP\" not found"},{"field":"settings.start_time","message":"must be in the future"}]}}},"exampleType":"examples"}},"exampleType":"examples"},"87ff9fcb-f29f-4353-8e14-ea33f5bc2912":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"errors.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example-1":{"title":"Example-1","value":{"errors":[{"field":"","message":"Authorization failed"}]}}},"exampleType":"examples"}},"exampleType":"examples"},"47673946-47b8-4581-a1f5-d30f1a995046":{"description":"Forbidden - caller's plan does not include advanced automation","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string","uniqueKey":"errors.items.[INDEX].field","typeLabel":"string"},"message":{"type":"string","uniqueKey":"errors.items.[INDEX].message","typeLabel":"string"}},"uniqueKey":"errors.items.[INDEX]","typeLabel":"object"},"uniqueKey":"errors","typeLabel":"object[]"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example-1":{"title":"Example-1","value":{"errors":[{"field":"","message":"Plan does not include advanced automation"}]}}},"exampleType":"examples"}},"exampleType":"examples"},"5387bf7b-ddc6-4b4e-a6b5-40d9a21bf645":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","uniqueKey":"message","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example-1":{"title":"Example-1","value":{"message":"Internal server error"}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"797e1cf7-8b79-49d7-8256-e509d254deea":{"apiKey":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Mailercloud API key (plain text, no Bearer prefix). Create keys in Settings → API.","scopes":[],"schemeName":"apiKey"}}},"servers":{"525ccd40-acd0-4c1f-b45f-645a2ccc048d":{"url":"https://cloudapi.mailercloud.com/v1"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"Authorization","description":"Your Mailercloud API key (plain text, no Bearer prefix). Create keys in Settings → API.","scopes":[],"schemeName":"apiKey"},"schema":{"title":"Authorization","type":"string","description":"Your Mailercloud API key (plain text, no Bearer prefix). Create keys in Settings → API.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"apiKey","name":"Authorization"}],"title":"apiKey"}]},"originalFileLocation":"openapi-v1.json"},"subdomain":"mailercloud","siteName":"Mailercloud API","title":"Create Automation - Mailercloud API","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-27T11:58:41.484Z","originalFileLocation":"api-reference/automations/create-automation.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"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\u0026#x27;s plan must include advanced automation, otherwise a 403 is returned.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Mailercloud API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/mailercloud/xGtgtsD6i5MXTEn-/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/mailercloud/xGtgtsD6i5MXTEn-/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/mailercloud/xGtgtsD6i5MXTEn-/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/mailercloud/xGtgtsD6i5MXTEn-/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/mailercloud/xGtgtsD6i5MXTEn-/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/mailercloud/xGtgtsD6i5MXTEn-/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/mailercloud/xGtgtsD6i5MXTEn-/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/mailercloud/xGtgtsD6i5MXTEn-/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/mailercloud/xGtgtsD6i5MXTEn-/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create Automation - Mailercloud API\">\u003cmeta data-mint-head property=\"og:description\" content=\"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\u0026#x27;s plan must include advanced automation, otherwise a 403 is returned.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Mailercloud API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://apidoc.mailercloud.com/api-reference/automations/create-automation\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://mailercloud.mintlify.app/_mintlify/api/og/v2?division=Automations\u0026amp;title=Create+Automation\u0026amp;description=API+to+create+an+advanced+automation+in+a+single+request.+%60name%60+and+%60nodes%60+are+required.+%60auto_publish%60+is+optional+%28defaults+to+%60false%60+%3D+draft%29.+%60timezone%60%2C\u0026amp;theme=936b6c78a22bbcb175702a1d\u0026amp;signature=4ee0dcf0e7707c20a1e7ed4a2b0600f54724eeef83286d326a571e1bb6c69e9c\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create Automation - Mailercloud API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"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\u0026#x27;s plan must include advanced automation, otherwise a 403 is returned.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://mailercloud.mintlify.app/_mintlify/api/og/v2?division=Automations\u0026amp;title=Create+Automation\u0026amp;description=API+to+create+an+advanced+automation+in+a+single+request.+%60name%60+and+%60nodes%60+are+required.+%60auto_publish%60+is+optional+%28defaults+to+%60false%60+%3D+draft%29.+%60timezone%60%2C\u0026amp;theme=936b6c78a22bbcb175702a1d\u0026amp;signature=4ee0dcf0e7707c20a1e7ed4a2b0600f54724eeef83286d326a571e1bb6c69e9c\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/mailercloud/xGtgtsD6i5MXTEn-/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Mailercloud API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1B7CFF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://apidoc.mailercloud.com/api-reference/automations/create-automation\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/automations/create-automation.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://apidoc.mailercloud.com/#organization\",\"name\":\"Mailercloud API\",\"url\":\"https://apidoc.mailercloud.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/mailercloud/i1yaE0mG2KZobCyB/logo/light.svg?fit=max\u0026auto=format\u0026n=i1yaE0mG2KZobCyB\u0026q=85\u0026s=ee63a470243c3c865ec9248b577f2a20\"}},{\"@type\":\"WebSite\",\"@id\":\"https://apidoc.mailercloud.com#website\",\"name\":\"Mailercloud API\",\"url\":\"https://apidoc.mailercloud.com\",\"publisher\":{\"@id\":\"https://apidoc.mailercloud.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://apidoc.mailercloud.com/api-reference/automations/create-automation#webpage\",\"url\":\"https://apidoc.mailercloud.com/api-reference/automations/create-automation\",\"name\":\"Create Automation\",\"description\":\"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.\",\"dateModified\":\"2026-10-27T11:58:41.484Z\",\"isPartOf\":{\"@id\":\"https://apidoc.mailercloud.com#website\"},\"breadcrumb\":{\"@id\":\"https://apidoc.mailercloud.com/api-reference/automations/create-automation#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://apidoc.mailercloud.com/api-reference/automations/create-automation#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Automations\",\"item\":\"https://apidoc.mailercloud.com/api-reference/automations/get-automation-details\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create Automation\",\"item\":\"https://apidoc.mailercloud.com/api-reference/automations/create-automation\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://apidoc.mailercloud.com/api-reference/automations/create-automation#apireference\",\"headline\":\"Create Automation\",\"name\":\"Create Automation\",\"description\":\"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.\",\"url\":\"https://apidoc.mailercloud.com/api-reference/automations/create-automation\",\"mainEntityOfPage\":{\"@id\":\"https://apidoc.mailercloud.com/api-reference/automations/create-automation#webpage\"},\"dateModified\":\"2026-10-27T11:58:41.484Z\",\"publisher\":{\"@id\":\"https://apidoc.mailercloud.com/#organization\"},\"isPartOf\":{\"@id\":\"https://apidoc.mailercloud.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Mailercloud API\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Mailercloud API","nav":{"global":null,"tabs":[{"tab":"Documentation","pages":[{"title":"Documentation","href":""}]},{"tab":"Marketing API","icon":"envelopes-bulk","groups":[{"group":"Campaigns","pages":[{"title":"Create Campaign","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /campaign","href":"/api-reference/campaigns/create-campaign"},{"title":"Create Campaign (v2)","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /campaign/save","href":"/api-reference/campaigns/create-campaign-v2"},{"title":"Campaign Domain Report","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /campaign/domain/report/{id}","href":"/api-reference/campaigns/campaign-domain-report"},{"title":"Campaign List","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /campaign/list","href":"/api-reference/campaigns/campaign-list"},{"title":"Testmail Group List","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /campaign/testmail-groups/list","href":"/api-reference/campaigns/testmail-group-list"},{"title":"Schedule Campaign","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /campaign/schedule/{id}","href":"/api-reference/campaigns/schedule-campaign"},{"title":"Send a Test Email","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /campaign/testmail/{id}","href":"/api-reference/campaigns/send-a-test-email"},{"title":"Get Single Campaign Details","deprecated":null,"version":null,"openapi":"/openapi-v1.json get /campaign/{id}","href":"/api-reference/campaigns/get-single-campaign-details"},{"title":"Update Campaign","deprecated":null,"version":null,"openapi":"/openapi-v1.json put /campaign/{id}","href":"/api-reference/campaigns/update-campaign"},{"title":"List Campaign Opens","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /campaign/{id}/opens","href":"/api-reference/campaigns/list-campaign-opens"},{"title":"List Campaign Clicks","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /campaign/{id}/clicks","href":"/api-reference/campaigns/list-campaign-clicks"},{"title":"List Campaign Unsubscribes","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /campaign/{id}/unsubs","href":"/api-reference/campaigns/list-campaign-unsubscribes"}]},{"group":"Custom Properties","pages":[{"title":"Create Property","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /contact/property","href":"/api-reference/custom-properties/create-property"},{"title":"Delete Property","deprecated":null,"version":null,"openapi":"/openapi-v1.json delete /contact/property/{id}","href":"/api-reference/custom-properties/delete-property"},{"title":"Update Property","deprecated":null,"version":null,"openapi":"/openapi-v1.json patch /contact/property/{id}","href":"/api-reference/custom-properties/update-property"},{"title":"List Property","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /contact/property/search","href":"/api-reference/custom-properties/list-property"}]},{"group":"Contacts","pages":[{"title":"Create Contact","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /contacts","href":"/api-reference/contacts/create-contact"},{"title":"Create or Update Contact","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /contacts/upsert","href":"/api-reference/contacts/create-or-update-contact"},{"title":"Get Contact Details","deprecated":null,"version":null,"openapi":"/openapi-v1.json get /contacts/{id}","href":"/api-reference/contacts/get-contact-details"},{"title":"Update Contact","deprecated":null,"version":null,"openapi":"/openapi-v1.json put /contacts/{id}","href":"/api-reference/contacts/update-contact"},{"title":"Delete Contact","deprecated":null,"version":null,"openapi":"/openapi-v1.json delete /contacts/{id}","href":"/api-reference/contacts/delete-contact"},{"title":"Remove Contact Tag","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /contact/tag/remove","href":"/api-reference/contacts/remove-contact-tag"},{"title":"Get Contacts in a List","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /contact/search/{id}","href":"/api-reference/contacts/get-contacts-in-a-list"},{"title":"Create Batch Contact","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /contacts/batch","href":"/api-reference/contacts/create-batch-contact"}]},{"group":"Lists","pages":[{"title":"Create a New List","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /list","href":"/api-reference/lists/create-a-new-list"},{"title":"Get Single List Details","deprecated":null,"version":null,"openapi":"/openapi-v1.json get /list/{id}","href":"/api-reference/lists/get-single-list-details"},{"title":"Delete a List","deprecated":null,"version":null,"openapi":"/openapi-v1.json delete /list/{id}","href":"/api-reference/lists/delete-a-list"},{"title":"Update a List","deprecated":null,"version":null,"openapi":"/openapi-v1.json patch /list/{id}","href":"/api-reference/lists/update-a-list"},{"title":"List Lists","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /lists/search","href":"/api-reference/lists/list-lists"}]},{"group":"Segments","pages":[{"title":"List Segment","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /segment/search","href":"/api-reference/segments/list-segment"},{"title":"Create Segment","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /segments","href":"/api-reference/segments/create-segment"},{"title":"Update a Segment","deprecated":null,"version":null,"openapi":"/openapi-v1.json put /segments/{id}","href":"/api-reference/segments/update-a-segment"}]},{"group":"Senders","pages":[{"title":"List Senders","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /senders/search","href":"/api-reference/senders/list-senders"},{"title":"List Reply Emails","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /reply-emails/search","href":"/api-reference/senders/list-reply-emails"},{"title":"Add a Sender","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /senders","href":"/api-reference/senders/add-a-sender"},{"title":"Delete a Sender","deprecated":null,"version":null,"openapi":"/openapi-v1.json delete /senders/{id}","href":"/api-reference/senders/delete-a-sender"}]},{"group":"Account","pages":[{"title":"Client Details","deprecated":null,"version":null,"openapi":"/openapi-v1.json get /client/plan","href":"/api-reference/account/client-details"}]},{"group":"Webforms","pages":[{"title":"Webform List","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /webform/search","href":"/api-reference/webforms/webform-list"}]},{"group":"Tags","pages":[{"title":"Create Tag","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /tags","href":"/api-reference/tags/create-tag"},{"title":"List Tags","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /tags/search","href":"/api-reference/tags/list-tags"},{"title":"Update Tag","deprecated":null,"version":null,"openapi":"/openapi-v1.json put /tags/{id}","href":"/api-reference/tags/update-tag"},{"title":"Delete Tag","deprecated":null,"version":null,"openapi":"/openapi-v1.json delete /tags/{id}","href":"/api-reference/tags/delete-tag"}]},{"group":"Webhooks","pages":[{"title":"Create a New Webhook","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /webhooks","href":"/api-reference/webhooks/create-a-new-webhook"},{"title":"Update a Webhook","deprecated":null,"version":null,"openapi":"/openapi-v1.json put /webhooks/{id}","href":"/api-reference/webhooks/update-a-webhook"},{"title":"Delete a Webhook","deprecated":null,"version":null,"openapi":"/openapi-v1.json delete /webhooks/{id}","href":"/api-reference/webhooks/delete-a-webhook"},{"title":"Get Webhook Details","deprecated":null,"version":null,"openapi":"/openapi-v1.json get /webhooks/detail/{id}","href":"/api-reference/webhooks/get-webhook-details"},{"title":"Search and List Webhooks","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /webhooks/search","href":"/api-reference/webhooks/search-and-list-webhooks"},{"title":"Test Webhook","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /webhooks/test","href":"/api-reference/webhooks/test-webhook"},{"title":"Toggle Webhook Status","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /webhooks/toggle/{id}","href":"/api-reference/webhooks/toggle-webhook-status"}]},{"group":"Templates","pages":[{"title":"Create Template","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /templates/create","href":"/api-reference/templates/create-template"},{"title":"Update Template","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /templates/update","href":"/api-reference/templates/update-template"},{"title":"Get Template Details","deprecated":null,"version":null,"openapi":"/openapi-v1.json get /templates/details/{id}","href":"/api-reference/templates/get-template-details"},{"title":"List Templates","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /templates/list","href":"/api-reference/templates/list-templates"},{"title":"Get Template Categories","deprecated":null,"version":null,"openapi":"/openapi-v1.json get /templates/categories/list","href":"/api-reference/templates/get-template-categories"},{"title":"Get Template by Name or ID","deprecated":null,"version":null,"openapi":"/openapi-v1.json get /templates/details","href":"/api-reference/templates/get-template-by-name-or-id"}]},{"group":"Automations","pages":[{"title":"Get Automation Details","description":"Retrieve details and node-level campaign report data for an advanced automation by its ID. The request body filters which node types are included.","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /automations/{id}","href":"/api-reference/automations/get-automation-details"},{"title":"Create Automation","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /automations","href":"/api-reference/automations/create-automation"}]},{"group":"Domains","pages":[{"title":"Add a Domain","description":"Add a sending domain to your account and get the DNS records to publish at your DNS provider. The domain goes through exactly the same checks as **Account Settings → Domains** in the app (format, blocked and ISP domains, subdomain depth, duplicates and your plan's domain limit), and the same DNS records are generated.\n\nThe response is the same domain object as **Get a Domain**: `status` is `not_verified` and each record is `pending` (the second DKIM record is `optional`), with a `message` saying what to do at your DNS provider. Open tracking is off for a new domain.\n\nAfter adding the records at your DNS provider, verify the domain from **Account Settings → Domains**.\n\n**Notes**\n- The domain is case-insensitive and a leading `www.` is removed (`WWW.Example.com` is saved as `example.com`).\n- Subdomains up to 3 levels below the root are allowed (`news.example.com`, `a.b.c.example.com`).\n- Adding a domain can take a few seconds while its DNS is checked.\n\n**Tracking host (`mc.`)**\n- For a domain such as `example.com`, the tracking record's host is `mc.example.com`.\n- For a subdomain that already exists in your DNS, the host gets a `mc-` prefix instead, e.g. `mc-news.example.com`.\n- `mc.example.com` is never treated as `example.com`. If it is not used as a tracking host, it can be added as its own domain: it keeps its full name and gets its own records (tracking host `mc-mc.example.com`).\n- If `mc.example.com` is already the tracking host of an added domain (e.g. `example.com` was added first), it cannot be added — the API returns 400 *\"This domain is already in use or linked elsewhere\"*.","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /domains","href":"/api-reference/domains/add-a-domain"},{"title":"List Domains","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /domains/search","href":"/api-reference/domains/list-domains"},{"title":"Get a Domain","deprecated":null,"version":null,"openapi":"/openapi-v1.json get /domains/{id}","href":"/api-reference/domains/get-a-domain"},{"title":"Update a Domain","deprecated":null,"version":null,"openapi":"/openapi-v1.json put /domains/{id}","href":"/api-reference/domains/update-a-domain"},{"title":"Delete a Domain","deprecated":null,"version":null,"openapi":"/openapi-v1.json delete /domains/{id}","href":"/api-reference/domains/delete-a-domain"},{"title":"Verify a Domain","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /domains/{id}/verify","href":"/api-reference/domains/verify-a-domain"},{"title":"Share DNS Records","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /domains/{id}/share","href":"/api-reference/domains/share-dns-records"}]},{"group":"Inbox Tracker","pages":[{"title":"Inbox-tracking","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /inbox-tracking","href":"/api-reference/inbox-tracker/inbox-tracking"},{"title":"List placement providers","deprecated":null,"version":null,"openapi":"/openapi-v1.json get /v2/placement/providers","href":"/api-reference/inbox-tracker/list-placement-providers"},{"title":"Start a placement test","deprecated":null,"version":null,"openapi":"/openapi-v1.json post /v2/placement/tests","href":"/api-reference/inbox-tracker/start-a-placement-test"},{"title":"Get a placement test","deprecated":null,"version":null,"openapi":"/openapi-v1.json get /v2/placement/tests/{test_id}","href":"/api-reference/inbox-tracker/get-a-placement-test"},{"title":"Get a campaign's latest placement test","deprecated":null,"version":null,"openapi":"/openapi-v1.json get /v2/placement/campaigns/{campaign_id}/latest","href":"/api-reference/inbox-tracker/get-a-campaigns-latest-placement-test"},{"title":"List a campaign's placement tests","deprecated":null,"version":null,"openapi":"/openapi-v1.json get /v2/placement/campaigns/{campaign_id}/tests","href":"/api-reference/inbox-tracker/list-a-campaigns-placement-tests"},{"title":"Get placement test quota","deprecated":null,"version":null,"openapi":"/openapi-v1.json get /v2/placement/quota","href":"/api-reference/inbox-tracker/get-placement-test-quota"}]}]},{"tab":"Email API","icon":"paper-plane","pages":[{"title":"Email API","href":"/api-reference/email/send-email"}]},{"tab":"Email Verifier","icon":"circle-check","pages":[{"title":"Email Verifier","href":"/api-reference/verification/verify-emails"}]}]},"title":"Create Automation - Mailercloud API","buildId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","deploymentId":"dpl_2xiSHD9XEvLsPGPcfoMtkLTB3dy9","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-DmVyH30O.js","utils-BHQqGGOd.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-CD-E4BIt.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-Bp5Lq9Ds.js","snippetPresets-C4xAVCFP.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-CgXVLxUC.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-BF8I5oUf.js","shallow-Byd0lWnC.js","getApiPlaygroundDisplay-BGOZG1OK.js","CodeSnippet-CpvQL0CY.js","CodeSnippets-B8wkBKXa.js","Page-CBCH2P7b.js","getPastedJson-Ry3scI3Y.js","icon-D7a9HcdD.js","MethodPill-CJ8pmHhz.js","DuplicateIcon-rh1HJF0t.js","createIcon-DvGznqYs.js","DynamicMarkdown-Cc6AuSHS.js","SectionHeading-B4A0S-ep.js","axios-vUo_bRtp.js","Markdown-Cc16CX65.js","clsx-Cs6nMGht.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-zbf22OZA.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-C_fs-y5n.js"]}