Cancel live runs

Cancel live runs

POST/api/v1/automations/{id}/runs/cancel

POST /automations/{id}/runs/cancel
curl -X POST 'https://www.unitpost.com/api/v1/automations/atm_123/runs/cancel' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'User-Agent: my-app/1.0' \
  -H 'Content-Type: application/json' \
  -d '{
    "contact_id": "con_123"
  }'
Response · 200
{
  "object": "automation_runs_cancel",
  "canceled": 0,
  "backfill": {
    "job_id": "job_123",
    "stopped": false
  }
}

Stop the automation's live runs in one call: all of them (status: live, the default) or only active or waiting ones. Their timers are cancelled and nothing more executes for them. Cancel them before deleting an automation that still has runs in progress. With contact_id, only that contact's runs stop (naming a contact also needs contacts:read); to stop a contact in every automation, use Cancel a contact's automation runs. Requires the automations:write capability.

Parameters1 field
FieldTypeDescription
idrequiredstring · path—
Request body3 fields
FieldTypeDescription
statusenumlive | active | waitingWhich live runs to cancel: all (`live`, default), only `active` or only `waiting`.
backfillstringOnly one backfill's runs (`job_…`, or `latest`): it stops that backfill (nobody else starts) and cancels the live runs it started; runs the trigger started are left alone.
contact_idstringOnly this contact's runs (`con_…`; also needs `contacts:read`): stop one person in this automation and leave everyone else's runs alone. To stop them in every automation, use POST /contacts/{id}/automation-runs/cancel.
Response · 200 fields3 fields
FieldTypeDescription
objectrequiredstring—
canceledrequiredinteger—
backfillobject—
200400401403404422

Search docs and guides

Search the docs and product guides.