Create an automation
Deterministic create: the body carries the full graph ({ name, triggerEventId?, nodes, connections }).
Use when you have minted every design a sendEmail node references (generateEmail first). Publish afterwards with updateAutomation ({ "published": true }), or launch a manual-audience automation with runAutomation.
Input Trigger binding, exactly one: an EVENT automation passes triggerEventId; a MANUAL-AUDIENCE automation omits it and gives the trigger node config: { "mode": "manualAudience", "audienceId": "…" }. Typed conditions: every filter and condition-mode split uses a non-empty conditions array; each condition needs field, type (string, number, date or bool) and a canonical snake_case operator; unary operators omit value, comparisons require a type-correct scalar, a non-empty array, or an exact two-value between tuple (see AutomationNode). Every sendEmail node carries emailId, emailVersionId and subject (previewText is optional; the design’s <Preview> is the source of truth). domainId is optional at create time; publishing or running requires a verified one from listDomains. There is no messageClass key: the delivery class derives from the sending domain’s sendingPurpose (a transactional-purpose domain sends with no unsubscribe link and delivers to unsubscribed contacts), so pick the class by picking the domain. Node ids are stored as sent, except the two shapes NODE_ID_REPLACED reports. dryRun: true validates without persisting.
Returns 201 with the bare AutomationRow; with dryRun: true, 200 with an AutomationDryRunReport { valid, blockers[], warnings[], blockingIssues[], nodeCounts } (blockers[] fail publish, warnings[] are advisory, blockingIssues[] lists per-node references the bound trigger or contact catalog cannot provide, each of which also fails publish; valid is false when any blocker or blocking issue is present).
Errors 400 AUTOMATION_GRAPH_INVALID with details.issues[] (kind, nodeId, message per problem, plus code on a structure issue); 404 TRIGGER_EVENT_NOT_FOUND for an unknown triggerEventId.
See also updateAutomation, testAutomation, runAutomation, createTrigger.
Authorizations
Headers
The brand this request acts on. REQUIRED for organization-scoped credentials (otherwise 400 BRAND_ID_REQUIRED — there is no default brand); list ids with GET /v1/brands. Brand-scoped credentials may omit it, and sending a different brand returns 403 BRAND_SCOPE_MISMATCH. A brand outside your organization returns 404 BRAND_NOT_FOUND.
1 - 64Body
Response
Dry-run result (returned only for dryRun: true; no writes). valid is false when any blockers[] entry or any blockingIssues[] entry is present. Create and update both return blockingIssues[] (possibly empty).
Was this page helpful?