Skip to documentation

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 access

Request parameters

ParameterTypeDescription
automation_id
path · required
stringThe ID of the automation.
name
body · optional
string
At least 1 character
The name of the automation.
status
body · optional
"enabled" | "disabled"The status of the automation.
steps
body · 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[].key
body · required
stringA unique key for this step within the automation graph.
steps[].type
body · 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[].config
body · required
objectStep-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.
connections
body · optional
(object)[]Tree-shaped connections supplied together with steps while the automation is disabled; cycles, joins, and arbitrary fan-out are rejected.
connections[].from
body · required
stringThe `key` of the source step.
connections[].to
body · required
stringThe `key` of the target step.
connections[].type
body · 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.