Skip to main content

API Endpoint

Path Parameters

string
required
The phone number of the queued call to cancel (e.g., “966501234567”). Accepts numbers with or without the ”+” or “966”/“0” prefix — they are normalized automatically.

Request Headers

required
Bearer your-api-key
application/json

Request Body

string
Optional agent ID to scope the cancellation to a specific agent’s queue. If provided, must be a valid agent belonging to your company.
The request body is optional — an empty body is valid if you don’t need to scope by agentId.

Response

boolean
required
Whether the request was processed successfully
object
required
Cancellation result object containing:
boolean
required
Whether a pending call was found and cancelled
string
required
The normalized phone number
string
The ID of the cancelled queue item (only present when cancelled is true)
string
The queue item’s status before cancellation (only present when cancelled is true)
string
The queue item’s new status, always "CANCELLED" (only present when cancelled is true)
string
The batch ID the call belonged to, if it was part of a batch (only present when cancelled is true)

Error Handling

string
Error message if the request fails
Only calls with status PENDING in a batch with status PENDING, SCHEDULED, QUEUED, ONGOING, or PAUSED are cancellable. Calls that have already started, completed, or failed cannot be cancelled.