Cancel a scheduled, pending, or running batch job. Stops new calls and marks remaining contacts as cancelled.
| Parameter | Type | Required | Description |
|---|---|---|---|
batch_job_id | string | ✅ | Unique batch job identifier |
| Field | Type | Description |
|---|---|---|
success | boolean | Whether cancellation succeeded |
message | string | Cancellation result description |
batchJobId | string | Cancelled batch job ID |
redisJobCancelled | boolean | Whether Redis scheduled job was cancelled |
contactsCancelled | integer | Number of contacts marked as cancelled |
| Job Status | Cancellation Behavior |
|---|---|
scheduled | Cancels Redis defer job + marks DB as cancelled |
pending | Marks all contacts as cancelled |
running | Marks remaining (non-terminal) contacts as cancelled |
completed | ❌ Error: Cannot cancel completed job |
failed | ❌ Error: Cannot cancel failed job |
cancelled | ❌ Error: Already cancelled |
pending — Not yet calledqueued — Waiting for retryno_answer — Will be retriedbusy — Will be retriedtimeout — Will be retriedcompleted — Already successfulfailed — Final failureblocked — Permanently blockedinvalid_number — Invalid phone numbercarrier_error — Carrier error (final)cancelled — Already cancelled| Error Code | Cause |
|---|---|
job_not_found | Batch job ID doesn’t exist |
already_terminal | Job is in completed/failed/cancelled status |
Your TalkifAI API key. Get it from Studio → Settings → API Keys.