Cancel a contact's automation runs

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
FieldTypeDescription
idrequiredstring · pathThe contact's id (`con_…`) or email.
Request body2 fields
FieldTypeDescription
automation_idsstring[]Only these automations (`atm_…`, up to 100). Leave it out to stop the contact's runs in every automation.
statusenumlive | active | waitingWhich live runs to cancel: all (`live`, default), only `active` or only `waiting`.
Response · 200 fields4 fields
FieldTypeDescription
objectrequiredstring—
contact_idrequiredstring—
canceledrequiredintegerRuns canceled, across every automation.
automationsrequiredobject[]Each automation it stopped runs in, most runs first. Empty when nothing was live.
200400401403404422

Search docs and guides

Search the docs and product guides.