Voice API

Hangup Call

Terminate an active or ringing call.

End an in-progress or ringing call immediately.

Endpoint

DELETEhttps://api.tryvox.io/v1/voice/accounts/{auth_id}/calls/{call_uuid}

Example request

curl -X DELETE \
  -u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN \
  https://api.tryvox.io/v1/voice/accounts/$TRYVOX_AUTH_ID/calls/550e8400-e29b-41d4-a716-446655440000

Response

204 No Content. The call is torn down on the media server, and the configured hangup_url fires.

Behavior

  • Both legs of the call are released. In-flight Play / Speak / DTMF / Recording actions are interrupted.
  • The call's hangup_cause becomes NORMAL_CLEARING.
  • The webhook sent to hangup_url for an API hangup always reports Status: "completed", even if the call was never answered. Check Billsec to tell whether it connected.
  • A participant hung up while in a VoxML Conference leaves the room; the conference keeps running for everyone else.

Errors

StatusCodeReason
401INVALID_CREDENTIALSAuth ID / Auth Token bad
403FORBIDDENAuth ID in URL doesn't match the authenticated key
400VALIDATION_FAILEDThe call has already ended (status hangup or failed)
404NOT_FOUNDNo call with this UUID on this account, or its 24-hour record has expired

Error envelope:

{
  "error": {
    "code": "VALIDATION_FAILED",
    "message": "call is not in an active state"
  }
}

Use cases

  • Cancel a ringing outbound — your retry logic decides the destination is wrong; hang up before answer to avoid billing.
  • Force-hangup on max duration — your application enforces a per-call cap stricter than time_limit and pulls the plug.
  • Operator override — an agent in the dashboard ends a customer call from outside the call leg.

Notes

  • Hangup is final. There's no resume, no undo. The request_uuid cannot be reused; place a new call if you need to redial.
  • Webhooks still fire. The configured hangup_url is called, and any call.ended webhook subscription receives the event once the call record is processed.
  • In-progress recordings are still finalised after a hangup and appear in the Recordings API.

On this page