Cancel Call

Calls

Cancel Call

Calls off a call you placed through the API (out_… or sch_…). A call still waiting to ring — booked, queued for its hours, or a retry — is cancelled and answers 200 with its report, status: "cancelled". A call ringing or connected is ended on the line and answers 202 with the report as it stands; its ending arrives a moment later with call.analysed, and no retry follows. A call that has already ended answers 409. Needs a full key.

DELETE/calls/{id}

Path parameters

idstringrequired
The call's id as Place Call or List Calls gave it: out_… or sch_… for a call you placed, the call reference for any other.

Headers

Katexs-Workspacestring
Developers only: the customer workspace this request acts in — its org_… id from POST /customers. Leave it out to act in your own workspace. Refused with 404 (Workspace not found.) when the id is unknown, is not one of your customers, or is not an org_… id; 410 when that customer was deleted (restore it with POST /customers/{id}/restore until it is erased); 403 when the key belongs to one customer workspace (it cannot act as another); 400 when your workspace is not a developer workspace. /customers/* and GET /customers/usage are your own workspace's and refuse the header with 400: call them without it.

Example request

bash
curl -X DELETE "https://app.katexs.com/api/v1/calls/{id}" \
  -H "Authorization: Bearer $KATEXS_API_KEY"

Responses

StatusDescription
200Cancelled before it rang.
202A live call is being ended. The body is its report as it stands.
400Katexs-Workspace was sent from a workspace that is not a developer workspace.
401The key is missing, wrong or revoked. The answer is always the same, whichever it is.
403The key's access level (read-only or build) does not allow this request, the plan does not include it, or a customer's key named another workspace in Katexs-Workspace. code says which: key_scope_read, key_scope_build, workspace_header_forbidden, or forbidden.
404No call you placed with that id in this workspace. Calls the API did not place cannot be cancelled here.
409The call has already ended (or is being placed this very second), or its phone line would not take the request to end it. Carries the call's report as call.
410The customer named in Katexs-Workspace was deleted. POST /customers/{id}/restore brings it back until its erase date.
429Over a per-minute limit. Wait for Retry-After seconds. code and limit say which limit: rate_limit_resources (240 requests a minute for the workspace), rate_limit_family (2,400 across a developer's customers), rate_limit_calls, rate_limit_messages, rate_limit_codes, rate_limit_code_recipient, concurrent_calls or number_daily_limit.

Response fields

billingobject | nullrequired
What the call was billed as. Null for a booked call that has not rung. Carrier-only calls. A call that ended before the agent spoke runs no agent (no recogniser, model or voice), so it is charged the phone carrier's fee only, in whole minutes. billedSeconds is the length rounded up to the minute. For these calls voicePlan and ratePerMinuteMicro still show the plan and rate the call was set up on, which is not what was charged: reconcile such a call by costMicro. A call that ends at 0 seconds is not charged at all: billedSeconds stays null. One that lasts a second is one minute. Forwarded calls are not carrier-only. A call forwarded to a phone (forwardedTo) on a number rented here is billed for every second the caller was connected, at the rate it was admitted at: the voice plan of the agent attached to the number, or the Premium plan when no agent is. When your own keys apply (the agent's, or the workspace's when no agent is attached), that is the flat own-key price of the set instead (voicePlan is null), even though the forward uses none of your keys. On a number you brought nothing is charged: ratePerMinuteMicro still shows the rate the call was admitted at, and billedSeconds is null. Free trial calls. voicePlan, ratePerMinuteMicro and billedSeconds are null for a call paid from a free-plan workspace's trial minutes. A call in a workspace on a paid plan, a developer's own test calls included, is billed from its balance and carries them.
idstringrequired
The id to open it by: out_… / sch_… for a call you placed, the call reference otherwise.
callRefstring | nullrequired
The reference of the attempt that actually rang. Null on a call that has not rung.
referencestring | nullrequired
Your reference from Place Call.
metadataobject | nullrequired
Your metadata from Place Call, untouched.
attemptintegerrequired
1 for the first try, 2 for the first retry. Range: 1–.
statusstringrequired
Where the call is. scheduled and cancelled only appear on calls you placed for later. One of: scheduled, ringing, connected, completed, missed, failed, cancelled.
directionstringrequired
Who rang whom. One of: inbound, outbound.
phonestring | nullrequired
The customer's number.
fromstring | nullrequired
Your number the call rang from. Null until it rings, unless the request chose one, and always null on a call that came in.
tostring | nullrequired
Your number a call that came in was dialled on, in international format (+14155550134), so a workspace with several numbers can tell which line the caller rang. Null on a call you placed (phone is who you rang, from the number it rang from) and on a call that came in before this was kept.
agentobject | nullrequired
The agent on the call. Null on a call forwarded to a phone when no agent answered the number (forwardedTo is set).
scheduledForstring (date-time) | nullrequired
When a booked call will ring. Null once it has.
startedAtstring (date-time) | nullrequired
When it started ringing.
answeredAtstring (date-time) | nullrequired
When it was picked up.
endedAtstring (date-time) | nullrequired
When it ended.
secondsintegerrequired
How long it lasted. On a call forwarded to a phone (forwardedTo) this is how long the caller was connected - answer to hang-up - even when nothing was billed (a number you brought bills nothing for a forward). 0 for a forward nobody picked up (status missed). Range: 0–.
hangupstring | nullrequired
Why it ended. Null while live; not_placed for a booked call that never rang. One of: answered, no_answer, busy, rejected, unreachable, cancelled, voicemail, before_agent, failed, not_placed.
variablesobjectrequired
The {{name}} values the call used.
summarystring | nullrequired
Two or three sentences about the call, when summarised.
fieldsobjectrequired
The collected details, keyed by field name. Empty when nothing was said.
analysedAtstring (date-time) | nullrequired
When the summary and fields were written. Null means they may still arrive.
handedToobject[]required
Every agent the call was handed to mid-call, oldest first (set on the agent's Actions page, under Hand calls to another agent). Empty when it stayed with agent, which is always the agent the call was placed or answered as. A hand-off to another agent is not a hand-over to a person: it sends no conversation.escalated.
forwardedTostring | nullrequired
The phone this call was forwarded to, when the number forwards every call (forwardTo on the phone number) and no agent answered it. Null on every other call. A forwarded call has no transcript, summary or fields.
contentDeletedbooleanrequired
True once the call's recording and transcript were deleted — by Delete Call Content, or by the workspace's callRetentionDays. The summary, fields, transcript and recording are then empty; when it happened, how long it lasted and what it cost stay.
contentDeletedAtstring (date-time) | nullrequired
When its content was deleted; null while it is kept.
errorstring | nullrequired
Why a booked call could not be placed, in words. Null otherwise.
insightsobject | nullrequired
What the call came to: how it ended, the customer's objections, why a no was a no, problems on the customer's side, and the next step agreed. Written once the call is read, before call.analysed is sent. Null when the agent's Call insights is off (Agents → the agent → Voice), for a web call, a call nobody spoke on, or a call whose content was deleted. Only what the customer actually said is noted.
transcriptobject[]required
This call's spoken turns, oldest first.
recordingobject | nullrequired
A signed link to the audio that needs no key — Get Recording By Signed Link. Null when the call was not recorded.
retryScheduledForstring (date-time) | nullrequired
When the next try will ring, if this one did not reach them and another is queued.
costMicrointeger | nullrequired
What this call cost the workspace, in millionths of currency (6370000 is 6.37) — the figure GET /usage/calls gives, at a white-label reseller's price for its clients. Null until the call is settled. Settlement runs before call.analysed is sent, so the webhook normally carries it, but it is null there too when the call has not settled; read Get Call later for the figure.
currencystring | nullrequired
The currency costMicro is in — the workspace's. Null only for a booked call that has not rung. Always USD.
qualityobject | nullrequired
How the call went, in numbers, written once when it ends. Null for a call that was not measured — a call from before call quality was recorded, a call that never connected, or one whose voice connection never reported. A figure inside is null when the part of the call that measures it did not report.
usageobjectrequired
What the call used: the language-model tokens its replies used, whether the model is ours or your own key's (BYOK), and the characters sent to the voice. Each is null when it was not recorded: a call that never reached the model (a missed call, a forward, a booked call that has not rung). The input count is what the provider reported; where a provider reports none it is estimated from the prompt's length, and inputTokensEstimated says so. The call's summary and field extraction after it ends are not counted.
200 response
{
  "id": "sch_2d7b0e91-4f3a-4c88-9b1e-7a6c5d4e3f21",
  "callRef": null,
  "reference": "LSQ-42",
  "metadata": {
    "deal_id": "D-19",
    "owner": "Ravi"
  },
  "attempt": 1,
  "status": "cancelled",
  "direction": "outbound",
  "phone": "919876543210",
  "from": null,
  "to": null,
  "agent": {
    "id": "ag_5c4a5f93-2b1e-4d7a-9f60-8e2d1c3b4a71",
    "name": "Skyline Sales"
  },
  "scheduledFor": "2026-10-07T04:30:00.000Z",
  "startedAt": null,
  "answeredAt": null,
  "endedAt": null,
  "seconds": 0,
  "hangup": "not_placed",
  "variables": {
    "lead_name": "Asha"
  },
  "summary": null,
  "fields": {},
  "transcript": [],
  "recording": null,
  "analysedAt": null,
  "retryScheduledFor": null,
  "costMicro": null,
  "currency": null,
  "quality": null,
  "usage": {
    "inputTokens": null,
    "outputTokens": null,
    "cachedInputTokens": null,
    "inputTokensEstimated": null,
    "ttsCharacters": null
  },
  "billing": null,
  "forwardedTo": null,
  "error": null
}

Last updated November 2026 · Found a problem? Email support@katexs.com