Voice / Call Controls

Hang up a call

End a call, or a single leg of it. Omit leg_id to hang up the entire call; supply it to drop just that leg.

post/api/v1/voice/calls/{call_id}/hangup

Request

  • Base URL: https://api.frejun.ai
  • URL: https://api.frejun.ai/api/v1/voice/calls/{call_id}/hangup
  • Auth: API key in header x-api-key

Path parameters

call_idstring required

Request body

leg_idstring nullable

Leg to hang up (cl_ prefix). Omit to end the entire call.

reasonstring nullable

Optional machine-readable reason, e.g. AGENT_HANGUP. Uppercase, digits, and underscores only.

Example request

{
  "reason": "AGENT_HANGUP"
}

Response

Successful Response

request_idstring required

Identifier for this control request. Reuse it to correlate retries and webhooks.

playback_idstring nullable

Identifier of the started playback (pb_ prefix). Only returned by the play action.

Example response

{
  "request_id": "req_9f8e7d6c5b4a3f2e1d0c9b8a"
}

Changes

No recorded changes to this operation across all 1 revision of this API.