Update a workflow
Sparse update — omitted fields are left unchanged.
Two state rules apply: the trigger (trigger_type/event_name/interval_ms) cannot be changed while the workflow has running executions (409), and enabled: true is refused while any step is still unconfigured (422), because an enabled workflow accepts contacts immediately and would otherwise fail only once one reached the broken step.
sequence REPLACES every non-trigger step with a linear chain and is likewise refused while executions are running. Omit it to leave the graph untouched.
Requires the workflows:write scope — Create, edit, enable, and delete your automation workflows.
AuthorizationBearer <API Key>API key authentication. Use a sk_* (FULL) or pk_* (SENDING_ONLY) key as the bearer token. Public keys (pk_*) are restricted to the email-send endpoints and the self-serve list subscribe/unsubscribe pair; every other endpoint — event tracking included — answers 403 for them. In scope terms (used by /api/v1/* operations): FULL keys hold every scope; SENDING_ONLY keys hold only emails:send.
id*stringWorkflow id.
uuidapplication/json- body
Body for PATCH /api/v1/workflows/{id}. Every field is optional; omitted fields are left unchanged. Changing the trigger while executions are running answers 409.
name?string1 <= length <= 200description?stringlength <= 1000trigger_type?stringWhat starts a workflow. EVENT: a custom event you record. MANUAL: only an explicit API call. SCHEDULE: a fixed repeating interval.
"EVENT""MANUAL""SCHEDULE"event_name?string1 <= length <= 200interval_ms?integerFor SCHEDULE workflows: how often the workflow fires, in milliseconds. Between one minute and 30 days; defaults to one hour.
60000 <= value <= 2592000000enabled?booleanallow_reentry?booleanmax_executions_per_hour?|Per-workflow start rate cap. null removes the cap.
0 < valuesequence?array<>Optional LINEAR chain that REPLACES every non-trigger step, in run order. Destructive: the existing steps are discarded and their ids do not survive, which is why omitting this field leaves the graph untouched. Branches need PUT /api/v1/workflows/{id}/graph instead.
1 <= items <= 199Updated workflow
application/json- response
An automation workflow as exposed on the v1 API.
id*stringuuidname*stringdescription*string|nullenabled*booleantrigger_type*string"EVENT""MANUAL""SCHEDULE"event_name*|Trigger event for EVENT workflows; null for the other trigger types.
allow_reentry*booleanmax_executions_per_hour*integer|nullversion*integerIncremented on every structural (step/transition) change.
step_count*integerSteps in this workflow's graph, trigger step included — so a workflow that has only ever been created reports 1. Read /graph for the steps themselves.
created_at*stringdate-timeupdated_at*stringdate-timecurl -X PATCH 'https://api.sendly.now/api/v1/workflows/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "description": "string", "enabled": true, "trigger_type": "EVENT", "event_name": "string", "allow_reentry": true, "max_executions_per_hour": 0, "version": 0, "step_count": 0, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z"}