Skip to Content
Calls

Hang up a live call

Permissioncalls:hangupRetriesIdempotency-Key requiredAuthentication
POST
/calls/{id}/hangup

Durably records the hangup intent, asks the call-bound provider to terminate the live call, and returns 200 only after provider confirmation or when the call is already terminal.

A scheduled reconciliation heals the related outbound job and attempt after commit.

Failures are never reported as success

A provider failure does not falsely mark the call ended. Retryable 502, 503 and 504 errors may be retried with the same Idempotency-Key, as directed by error.details.

Evaluation calls and calls from another workspace are deliberately indistinguishable from missing calls.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Use a Voice API key or connected-app OAuth access token. Authentication.

Path Parameters

id*string
Formatuuid

Header Parameters

Idempotency-Key*string

Required. Reuse the same key to retry this write safely. Retries and idempotency.

Match^[A-Za-z0-9!#$%&'*+.^_`|~-]+$
Length1 <= length <= 255

Response Body

The provider confirmed termination or the call was already terminal.

application/json
  1. response

Closed action result for a confirmed hangup or terminal no-op.

call_id*string
Formatuuid
status*string
Value in"ended""failed"
changed*boolean

True only when this request transitioned the call to ended.

provider_confirmation*string
Value in"confirmed""already_terminal"
reconciliation_status*string

Scheduled means durable outbound job and attempt healing continues after commit.

Value in"not_applicable""scheduled"
Example Request
curl -X POST 'https://api.kejue.co/v1/calls/497f6eca-6276-4993-bfeb-53cbbbba6f08/hangup' \  -H 'Idempotency-Key: string'
Example Response
{  "call_id": "11111111-1111-4111-8111-111111111111",  "status": "ended",  "changed": true,  "provider_confirmation": "confirmed",  "reconciliation_status": "scheduled"}