API referenceAutomations
Edit a draft automation
PATCH
Only allowed while status = draft (else 409 not_editable) — editing a live program out from under in-flight enrollments would be unsafe. Fields omitted from the body keep their current value; the trigger is re-validated whenever trigger_kind/ trigger_config is touched.
bearerAuthheader
AuthorizationBearer <token>API key sent as Authorization: Bearer <key>. Looked up by SHA-256
hash (email_core::sha256_hex) against api_keys.hash; revoked
keys and keys belonging to a suspended tenant are rejected. See the
top-level Authentication section for permission levels.
id*stringapplication/json- body
name?stringtrigger_kind?stringValue in
"contact_created""audience_added""manual"trigger_config?from_domain_id?stringsteps?array<|||>Items
items <= 50Updated.
application/json- response
id?stringname?stringtrigger_kind?stringValue in
"contact_created""audience_added""manual"trigger_config?from_domain_id?string|nullsteps?array<|||>status?stringValue in
"draft""active""paused""archived"created_at?integerFormat
int64updated_at?integerFormat
int64curl -X PATCH "https://example.com/v1/automations/string" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "string", "name": "string", "trigger_kind": "contact_created", "trigger_config": {}, "from_domain_id": "string", "steps": [ { "type": "send", "subject": "string", "body_html": "string", "body_text": "string" } ], "status": "draft", "created_at": 0, "updated_at": 0}