Cancel a run
POST/api/v1/automations/runs/{run_id}/cancel
POST /automations/runs/{run_id}/cancel
curl -X POST 'https://www.unitpost.com/api/v1/automations/runs/run_123/cancel' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'User-Agent: my-app/1.0'Response · 200
{
"object": "automation_run",
"id": "id_123",
"automation_id": "automation_123",
"status": "active",
"exit_reason": "string",
"subject": {
"type": "string",
"contact_id": "contact_123",
"label": "string"
},
"version": 0,
"step_count": 1,
"held": false,
"at_block_id": "at_block_123",
"backfill_job_id": "backfill_job_123",
"started_at": "2026-01-01T00:00:00.000Z",
"completed_at": "2026-01-01T00:00:00.000Z"
}Stop one live run: its timers are cancelled and no further step executes. Terminal runs return 409. Requires the automations:write capability.
Parameters1 field
| Field | Type | Description |
|---|---|---|
run_idrequired | string · path | — |
Response · 200 fields13 fields
| Field | Type | Description |
|---|---|---|
objectrequired | string | — |
idrequired | string | — |
automation_idrequired | string | — |
statusrequired | enumactive | waiting | completed | exited | goal_met | failed | canceled | — |
exit_reasonrequired | string | null | Why the run stopped; null while live. `finished` (it reached the end, or an Exit block, which may give its own reason), `exit_condition`, `goal`, `restarted`, `max_steps`, `ttl`, `cancel`, `automation_archived`, `block_removed`, `stale_hold`, `error:<node_id>`, … A run that reached an Exit block before 2026-12-01 reads `exit_node` (status `exited`). |
subjectrequired | object | — |
versionrequired | integer | null | — |
step_countrequired | integer | — |
heldrequired | boolean | A pause froze the run at its next step; Resume (or a publish) continues it. A run still on a wait timer of a paused automation reads false until its wait ends, then it is held there. Unpublishing a paused automation ends every run in progress, held or not, unless `held_runs: "release"`. |
at_block_idrequired | string | null | — |
backfill_job_idrequired | string | null | The backfill that started it (`job_…`; publish's `backfill_count`), or null for a run its trigger or a manual enroll started. Filter with `?backfill=`, cancel one backfill's runs with POST …/runs/cancel `backfill`. |
started_atrequired | string | — |
completed_atrequired | string | null | — |
200401403404409