Skip to Content
Documentation
API reference

Cancel a call

POST
/calls/{id}/cancel

Stops a queued call (including one waiting between retries) immediately so no further attempts are placed, or hangs up an in-progress call without retrying. Canceled calls that were not answered do not count towards your quota. Idempotent if the call is already canceled; returns 409 call_not_cancelable if it already finished (answered, not_answered, or failed).

Authorization

apiKey
headerAuthorizationBearer <token>

Your API key, for example Authorization: Bearer ch_live_xxxxxxxxxxxx. Create keys in your dashboard under API keys.

Path Parameters

id*string

Call ID returned when you created the call.

Response Body

The canceled call (or in_progress while the active call hangs up).

application/json
  1. response

A call and its result. The webhook body and GET /calls/{id} return exactly this object.

id*string

Call ID.

status*string

queued: waiting or between retries. in_progress: ringing or on the call. answered: the person picked up (counts towards your plan). not_answered: no answer, busy or voicemail after all retries (free). failed: invalid number or technical error (free). canceled: stopped from the dashboard before anyone answered (free).

Value in"queued""in_progress""answered""not_answered""failed""canceled"
option_id*|

The id you gave the chosen answer, wherever it sits in the menus. null if nothing was chosen. Use this in your code.

option_label*|

Label of the chosen option, or null if nothing was chosen.

answer_method*|

How the person answered: keypad (pressed a phone key), voice (spoke their answer), or null if no option was chosen.

Value in"keypad""voice"null
answer_transcript*|

Raw speech-to-text transcript of what the person said when answering by voice (or the last unrecognized speech if no option was chosen). null for keypad answers or after the 60-day retention window.

metadata*

The metadata you sent, unchanged.

Example Request
curl -X POST 'https://api.callhuman.es/v1/calls/call_x9f2k/cancel'
Example Response
{  "id": "call_x9f2k",  "status": "canceled",  "option_id": null,  "option_label": null,  "answer_method": null,  "answer_transcript": null,  "metadata": {    "booking_id": "bk_1042"  }}