Voice API
Hangup Call
Terminate an active or ringing call.
End an in-progress or ringing call immediately.
Endpoint
DELETE
https://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-446655440000Response
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_causebecomesNORMAL_CLEARING. - The webhook sent to
hangup_urlfor an API hangup always reportsStatus: "completed", even if the call was never answered. CheckBillsecto tell whether it connected. - A participant hung up while in a VoxML
Conferenceleaves the room; the conference keeps running for everyone else.
Errors
| Status | Code | Reason |
|---|---|---|
| 401 | INVALID_CREDENTIALS | Auth ID / Auth Token bad |
| 403 | FORBIDDEN | Auth ID in URL doesn't match the authenticated key |
| 400 | VALIDATION_FAILED | The call has already ended (status hangup or failed) |
| 404 | NOT_FOUND | No 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_limitand 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_uuidcannot be reused; place a new call if you need to redial. - Webhooks still fire. The configured
hangup_urlis called, and anycall.endedwebhook 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.