Skip to main content

Call Control

Verified against backend/internal/publicapi/builder_dto.go, callcontrol_handler.go, and routes.go.

MethodPathScope
POST/calls/:id/hangupcalls:control

This is deliberately the only call-control endpoint

If you're looking for transfer, whisper, barge-in, or takeover on the public API: they aren't here, on purpose. Internally, those operations are either no-ops or actively corrupt call state — publishing them on the public surface would mean documenting an endpoint that returns success while doing something other than what it claims, or nothing at all. Hangup is the one call-control primitive that's safe to expose today.

(Barge-in and transfer do exist as real, working agent behaviors — they're driven by the voice agent itself during the call, not by an external API caller mid-call. See Voice & Agent Capabilities.)

Hang up a call

bash
curl -X POST https://api.voicematrix.ai/api/v1/ext/calls/<call-id>/hangup \
  -H "X-API-Key: vm_live_..." \
  -H "Idempotency-Key: hangup-<call-id>"
json
{ "id": "...", "status": "completed", "teardown_ok": true }

teardown_ok exists because "the database row flipped to completed" and "the call is actually down" aren't guaranteed to be the same event. Internally, a LiveKit teardown failure is logged but the call is still marked completed; if LiveKit isn't configured at all, teardown reports success unconditionally. Either way, a call that's still up but billed as ended is a billing-relevant failure, and reporting it as an unqualified success would hide that. If teardown_ok is false, treat the call as possibly still connected (and possibly still costing money) and check independently — don't take the 200 at face value.

Next

  • Calls
  • Webhookscall.ended fires regardless of how the call ended
All pages