curl --request PATCH \
--url https://brew.new/api/v1/automations/{automationId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Welcome flow v2"
}
'{
"automationId": "M3nRk8LqW2xT5vBp9YcZd",
"automationVersionId": "Rt4Vw1KyPb6HZq7Lm2Nx8",
"triggerEventId": "user_signed_up",
"name": "Welcome flow",
"version": "latest",
"published": false,
"isLive": true,
"liveVersion": 3,
"liveAutomationVersionId": "Nt6Wq4Ym8Lz1Rv3Kx9Pb2",
"nodes": [
{
"id": "trg",
"label": "On signup",
"type": "trigger",
"config": {
"actionType": "trigger"
}
},
{
"id": "send_welcome",
"label": "Welcome",
"type": "sendEmail",
"config": {
"actionType": "sendEmail",
"emailId": "V1StGXR8_Z5jdHi6B-myT",
"emailVersionId": "Ux8nW3qL1mP9zRv6TkYcB",
"domainId": "kx7bkh53hasmfeh5kd7sqgykt187g8ww",
"subject": "Welcome to Brew, {{firstName | there}}!",
"previewText": "Thanks for signing up — get started in 2 minutes.",
"fromName": "Brew",
"replyTo": "support@example.com"
}
}
],
"connections": [
{
"from": "trg",
"to": "send_welcome"
}
],
"emailIds": [
"V1StGXR8_Z5jdHi6B-myT"
],
"createdAt": "2026-04-08T12:00:00.000Z",
"updatedAt": "2026-04-08T12:00:00.000Z"
}Update or publish an automation
One endpoint, two mutually exclusive modes: update the graph (a new automationVersionId on the same automationId) or change lifecycle state (published, paused). The modes cannot be combined: update first, then PATCH { "published": true }.
Use when editing a graph or changing runtime state of an automation created with createAutomation. Manual-audience runs are controlled with pauseAudienceRun, resumeAudienceRun and cancelAudienceRun, not here.
Input Update: one or more of name, description, nodes, connections, triggerEventId, under the same typed condition contract as create (explicit type, canonical snake_case operator, no value for unary operators, type-correct values elsewhere); dryRun: true validates without persisting. Lifecycle: published: true promotes the stored latest version live (optionally pin automationVersionId; the graph is validated first), published: false unpublishes, paused: true or false freezes or resumes future send steps (stopInFlight also stops runs already in progress).
Returns the bare automation row, or with dryRun: true a 200 AutomationDryRunReport { valid, blockers[], warnings[], blockingIssues[], nodeCounts }: blockingIssues[] lists per-node references the effective trigger or contact catalog cannot provide (fatal: true for filter or split conditions and triple-brace {{{ }}} body tokens fails publish; fatal: false for subject, previewText, fromName, replyTo and double-brace body tags renders empty at send time); valid is false when any blocker or blocking issue is present, while publish itself hard-blocks only fatal issues so a live automation can be republished after a soft orphan. Updating a LIVE automation saves a draft and does not go live: the previously published version keeps serving until you republish, published describes the returned row, isLive, liveVersion and liveAutomationVersionId describe the automation, and warnings[] carries DRAFT_SAVED_NOT_LIVE.
Errors 404 AUTOMATION_NOT_FOUND, AUTOMATION_VERSION_NOT_FOUND (pin liveAutomationVersionId, a versions[] id, or a run row’s automationVersionId), TRIGGER_EVENT_NOT_FOUND; 400 AUTOMATION_GRAPH_INVALID (details.issues[]); 409 PUBLISH_VALIDATION_FAILED (details.blockers[]), AUTOMATION_VERSION_CONFLICT (re-read, reapply, retry); 422 AUTOMATION_NOT_PUBLISHED (nothing to unpublish), AUTOMATION_NOT_PAUSABLE (a manual-audience automation pauses through its runs).
See also createAutomation, testAutomation, runAutomation, listAutomationRuns.
curl --request PATCH \
--url https://brew.new/api/v1/automations/{automationId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Welcome flow v2"
}
'{
"automationId": "M3nRk8LqW2xT5vBp9YcZd",
"automationVersionId": "Rt4Vw1KyPb6HZq7Lm2Nx8",
"triggerEventId": "user_signed_up",
"name": "Welcome flow",
"version": "latest",
"published": false,
"isLive": true,
"liveVersion": 3,
"liveAutomationVersionId": "Nt6Wq4Ym8Lz1Rv3Kx9Pb2",
"nodes": [
{
"id": "trg",
"label": "On signup",
"type": "trigger",
"config": {
"actionType": "trigger"
}
},
{
"id": "send_welcome",
"label": "Welcome",
"type": "sendEmail",
"config": {
"actionType": "sendEmail",
"emailId": "V1StGXR8_Z5jdHi6B-myT",
"emailVersionId": "Ux8nW3qL1mP9zRv6TkYcB",
"domainId": "kx7bkh53hasmfeh5kd7sqgykt187g8ww",
"subject": "Welcome to Brew, {{firstName | there}}!",
"previewText": "Thanks for signing up — get started in 2 minutes.",
"fromName": "Brew",
"replyTo": "support@example.com"
}
}
],
"connections": [
{
"from": "trg",
"to": "send_welcome"
}
],
"emailIds": [
"V1StGXR8_Z5jdHi6B-myT"
],
"createdAt": "2026-04-08T12:00:00.000Z",
"updatedAt": "2026-04-08T12:00:00.000Z"
}Authorizations
Send your Brew API key as Authorization: Bearer brew_xxx.
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 - 64Path Parameters
Automation id returned by POST /v1/automations and listed by GET /v1/automations.
1 - 64"M3nRk8LqW2xT5vBp9YcZd"
Body
1 - 1202000500- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Show child attributes
Show child attributes
1000Show child attributes
Show child attributes
1 - 256Optimistic concurrency guard: the exact version read before deriving this update. Supply together with expectedBaseDefinitionSha256.
1 - 64Optimistic concurrency guard: SHA-256 of the exact definition read before deriving this update. Supply together with expectedBaseVersionId.
^[a-f0-9]{64}$Validate only — runs the full publish-gate check and returns blockers/warnings without writing.
Lifecycle action: true validates + publishes the STORED latest version (a saved edit goes live only after this); false unpublishes. Cannot be combined with field/graph updates — update first, then publish.
Exact version to publish; requires published: true.
1 - 64With published: false only — ALSO permanently stop contacts already mid-flow (default: they drain to completion).
Freeze (true) / resume (false) a LIVE automation without unpublishing; held contacts resume from the same point.
Response
Updated / published / unpublished — the bare automation row. For dryRun: true update requests, an AutomationDryRunReport instead (no writes).
- Option 1
- Option 2
1 - 641 - 641 - 120x >= 01 - 641 - 2562000x >= 01 - 64Show child attributes
Show child attributes
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?