Cancel a contact's automation runs
POST/api/v1/contacts/{id}/automation-runs/cancel
POST /contacts/{id}/automation-runs/cancel
curl -X POST 'https://www.unitpost.com/api/v1/contacts/con_123/automation-runs/cancel' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'User-Agent: my-app/1.0' \
-H 'Content-Type: application/json' \
-d '{
"automation_ids": [
"atm_123"
]
}'Response · 200
{
"object": "contact_automation_runs_cancel",
"contact_id": "contact_123",
"canceled": 0,
"automations": [
{
"automation_id": "automation_123",
"canceled": 0
}
]
}Stop one contact's live runs in every automation, or only in automation_ids: someone asked you to stop, got a refund, or opened a support case. Their timers are cancelled and nothing more is sent to them by those runs; the automations stay live for everyone else (a later trigger can start them again, so add an exit rule or update the contact when that must not happen). {id} is the contact's id or email. The runs it stops are the ones List a contact's automation runs shows in progress. Also needs contacts:read (it names a contact). Requires the automations:write capability.
Parameters1 field
| Field | Type | Description |
|---|---|---|
idrequired | string · path | The contact's id (`con_…`) or email. |
Request body2 fields
| Field | Type | Description |
|---|---|---|
automation_ids | string[] | Only these automations (`atm_…`, up to 100). Leave it out to stop the contact's runs in every automation. |
status | enumlive | active | waiting | Which live runs to cancel: all (`live`, default), only `active` or only `waiting`. |
Response · 200 fields4 fields
| Field | Type | Description |
|---|---|---|
objectrequired | string | — |
contact_idrequired | string | — |
canceledrequired | integer | Runs canceled, across every automation. |
automationsrequired | object[] | Each automation it stopped runs in, most runs first. Empty when nothing was live. |
200400401403404422