API · Automations
Update Automation
Update an automation’s name, status, or workflow (requires full access). Disable it in a separate request before editing steps and connections; enabled workflow edits return 422.
PATCH
/automations/{automation_id}Full accessRequest parameters
| Parameter | Type | Description |
|---|---|---|
automation_idpath · required | string | The ID of the automation. |
namebody · optional | stringAt least 1 character | The name of the automation. |
statusbody · optional | "enabled" | "disabled" | The status of the automation. |
stepsbody · optional | (object)[]1–101 items | One trigger plus up to 100 execution steps, supplied with connections while disabled, within 64 KiB and 12 nesting levels. |
steps[].keybody · required | string | A unique key for this step within the automation graph. |
steps[].typebody · required | "trigger" | "send_email" | "delay" | "wait_for_event" | "condition" | "contact_update" | "contact_delete" | "add_to_segment" | Step type determining the required configuration: trigger, send_email, delay, wait_for_event, condition, contact_update, contact_delete, or add_to_segment. |
steps[].configbody · required | object | Step-specific settings such as event_name, template, duration, condition rules, contact fields, or segment_id; subject overrides, structured template variables, mixed nested conditions, null comparisons, and wait filter_rule return 422, and waits need a timeout of at most 30 days to activate. |
connectionsbody · optional | (object)[] | Tree-shaped connections supplied together with steps while the automation is disabled; cycles, joins, and arbitrary fan-out are rejected. |
connections[].frombody · required | string | The `key` of the source step. |
connections[].tobody · required | string | The `key` of the target step. |
connections[].typebody · optional | "default" | "condition_met" | "condition_not_met" | "timeout" | "event_received" | Connection type, defaulting to default. |
Request example
Set OPENSEND_BASE_URL=https://api.example.com and OPENSEND_API_KEY=os_replace_me on your server.
bash
curl -X PATCH "$OPENSEND_BASE_URL/automations/YOUR_automation_id" \
-H "Authorization: Bearer $OPENSEND_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"status":"enabled"}'Response
200 · application/json. Example IDs stand for IDs returned by your installation.
json
{
"object": "automation",
"id": "YOUR_ID"
}Behavior and errors
Disable in a separate request before editing the graph. Supply both steps and connections for a graph change. Enabling validates the trigger and dependencies, including published templates and owned segments.
Use a full-access credential. Unknown or foreign resources return 404. See authentication, errors, rate limits, and pagination.