Cancel a Click2Call call
DELETE/api/v1/click2call/:id
Hangs the call up, whatever leg it has reached — before anyone answered, or
mid-conversation. The response is 204 No Content with an empty body.
Repeating the cancel is safe
A repeated DELETE also answers 204. The request is recorded once and
every repeat gets the same answer, so a client that retries on a timeout
cannot get a spurious failure. Do not read a second 204 as "there was
still a call to hang up".
What the cancel shows up as
A cancel that actually ended the call reads back with reason canceled.
Its state is completed if the two legs had already been bridged, and
failed if the call was hung up before it came together.
If the call had already ended on its own before your DELETE arrived, its
original reason is kept — a call nobody answered still reads no_answer.
Cleaning up with a defensive DELETE therefore cannot hide why a call ended.
404
404 call_not_found means the call is unknown to you: it never existed, the
ID is malformed, it belongs to another account, or it is older than the
12-hour retention window — which runs from when the call was placed, not
from when it ended. The cases are deliberately indistinguishable.
See also: click2call_show, which reads the call back after the cancel.
Request
Responses
- 204
- 401
- 403
- 404
The call was hung up. The body is empty, and repeating the request answers 204 again.
The API token is missing or incorrect. This endpoint answers 401; the rest of v1 answers 403 for the same refusal.
The API token is missing or incorrect, or the Click2Call API is not enabled for this account (click2call_api_disabled).
No such call: it never existed, the ID is malformed, it belongs to another account, or it is older than the 12-hour retention window.