1. Create a draft
Send this body toPOST /api/v1/automations with Authorization: Bearer <API_KEY> and Content-Type: application/json. Creation requires
automations:write. The name allows 1 to 120 Unicode scalars, without
surrounding whitespace or control characters.
Response: HTTP 201
automation, not data. A successful write stores the
automation; it does not prove that a message was sent. Save id and the exact
updated_at string. Do not round or reformat timestamps.
2. Read before editing
CallGET /api/v1/automations/{automationId}?account_id=... with
automations:read. HTTP 200 returns the same complete envelope shown above.
Always start an edit from a fresh read.
3. Rename or replace configuration
For a rename, send this body toPATCH /api/v1/automations/{automationId}.
Replace the example timestamp with the value from your fresh read.
configuration object. It
replaces the stored configuration; nested objects and arrays are not merged. You
can send the name, the configuration, or both, but not status. HTTP 200
returns the full automation envelope, including the new updated_at.
On a live automation, inspect has_unpublished_changes. When true, the returned
name and configuration describe the draft, while the previously published
version continues running. draft_updated_at is informational; concurrency
always uses updated_at.
4. Publish or pause
After reviewing the stored draft, send the following body toPOST /api/v1/automations/{automationId}/activate. Use the latest version from a new
read. Activation requires automations:activate.
200 returns the complete envelope with status: "live" and published
configuration. To pause new trigger processing, send the same body shape with a
fresh version to POST /api/v1/automations/{automationId}/deactivate; HTTP
200 returns status: "paused". Creating with status: "live" publishes
immediately and also requires activation scope.
Recover without duplicate writes
409withapi_automation_version_conflict: read again, reconcile the newer changes, and rebuild the update.422withapi_automation_invalid_configuration: inspecterror.details.issuesand fix the reported paths.api_automation_committed_response_unavailablewithcommitted: trueandretryable: false: the write committed. Read back, or list after creation, before deciding what to do.- An uncertain create outcome must not be blindly retried: creation is not idempotent.
Example conflict response
HTTP409.
204 with no body; do not try to parse it as JSON.
