Cancel a job
POST/api/v1/jobs/{id}/cancel
POST /jobs/{id}/cancel
curl -X POST 'https://www.unitpost.com/api/v1/jobs/job_123/cancel' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'User-Agent: my-app/1.0'Response · 200
{
"object": "job",
"id": "id_123",
"kind": "string",
"status": "QUEUED",
"total": 1,
"processed": 0,
"failed": 0,
"error": "string",
"created_at": "2026-01-01T00:00:00.000Z",
"completed_at": "2026-01-01T00:00:00.000Z"
}Stop a queued or running job. A running job stops after the part in flight; the work already done stays. A kind that can't stop half-way (a custom-field rename) is a 409 saying why. Takes no body. Needs the capability that starts the kind (contacts:write for a custom-field job, contacts:read for an export, topics:write for a topic opt-out). Requires the contacts:read or contacts:write capability.
Parameters1 field
| Field | Type | Description |
|---|---|---|
idrequired | string · path | — |
Response · 200 fields10 fields
| Field | Type | Description |
|---|---|---|
objectrequired | string | — |
idrequired | string | — |
kindrequired | string | — |
statusrequired | enumQUEUED | RUNNING | COMPLETED | FAILED | CANCELED | — |
totalrequired | integer | null | — |
processedrequired | integer | — |
failedrequired | integer | — |
errorrequired | string | null | — |
created_atrequired | string | — |
completed_atrequired | string | null | — |
200400401403404409422