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.
Example Request
Example Request
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)Example Response (call cancelled)
Example Response (call cancelled)
Example Response (no pending call found)
Example Response (no pending call found)
Error Handling
string
Error message if the request fails
Example Error Responses
Example Error Responses