Voice API quick guide

The five most common tasks, in the order you will do them. Each step links to the documentation, which has every field, error and example in curl, PHP, Python and Node.

The voice API is now available for SIP trunk and PBX customers. Request your key and we will activate it on your account.

1. Get your API key

The voice API is enabled on a Universal Telecom SIP trunk or virtual PBX account. Once it is on, create the key in the panel: Settings → Developers → API keys.

Give each key only the permissions it needs:

  • calls:read — read live calls and history.
  • calls:control — hang up a call in progress (only the account administrator can use it).
  • webhooks:write — create and manage webhook subscriptions.
  • Use the key from your server. Never in your users' browser or in a URL.
  • Resellers: one key also sees your customers' calls, filtered by account.

See it in the docs →

2. See live calls

One request lists what is ringing and in progress on your trunk or PBX, newest first.

For a dashboard, poll about every 5 seconds and use webhooks for anything you cannot miss. The docs also describe a summary with live figures (in progress, ringing, today's minutes).

curl "https://api.utio.io/v1/calls/pbx?status=live" \
  -H "Authorization: Bearer $UTIO_API_KEY"

See it in the docs →

3. Search history and see why a call failed

The same route serves the history: filter by status, dates, direction or number. Without dates you get the last 24 hours; the maximum range is 31 days, and results are paginated.

A call's detail shows its timeline: when it rang, when it was answered and why it ended, with the Q.850 cause. The most common ones:

  • 16 — normal end.
  • 17 — busy: try again later.
  • 19 — rings, nobody answers.
  • 1 — unassigned number: check the number.
  • 21 — rejected: check the account (blocked destination, balance, restriction).
  • 34 — no circuit available: retry after a pause.
curl "https://api.utio.io/v1/calls/pbx?status=failed,busy,no_answer&from=2026-11-17T00:00:00%2B01:00" \
  -H "Authorization: Bearer $UTIO_API_KEY"

curl "https://api.utio.io/v1/calls/pbx/ID_DE_LA_LLAMADA" \
  -H "Authorization: Bearer $UTIO_API_KEY"

See it in the docs →

4. Hang up a call in progress

With a key that has calls:control, one request is enough. Add an idempotency key so you can safely resend it if the network drops the request.

The response says the order has been sent; the final state arrives through the end-of-call webhook. If the call had already ended, you get a 409.

curl -X POST "https://api.utio.io/v1/calls/live/ID_DE_LA_LLAMADA/hangup" \
  -H "Authorization: Bearer $UTIO_API_KEY" \
  -H "Idempotency-Key: colgar-ID_DE_LA_LLAMADA"

See it in the docs →

5. Receive webhooks

Subscribe your server to the events you need. The subscription response includes the signing secret: keep it on your server.

Each call gets exactly one final event: call.completed if it was answered, otherwise call.busy, call.no_answer, call.failed, call.canceled or call.voicemail. If you only listen to call.completed, you will miss the failures.

Verify each delivery's signature on the raw body, before parsing it, and reject deliveries older than 5 minutes. Python example:

  • Return 2xx straight away and process afterwards (in a queue).
  • Retries carry the same delivery id: deduplicate them.
  • Test your receiver with the test delivery described in the docs.
import hmac, hashlib, time

def firma_valida(ts: str, firma: str, cuerpo: bytes, secreto: bytes) -> bool:
    esperada = "sha256=" + hmac.new(secreto, ts.encode() + b"." + cuerpo, hashlib.sha256).hexdigest()
    return ts.isdigit() and abs(time.time() - int(ts)) <= 300 and hmac.compare_digest(esperada, firma)

See it in the docs →

Every detail is in the docs

Fields, errors, limits and examples in curl, PHP, Python and Node, with a “Try it” button.

UTIO is the AI agent line of Universal Telecom, an operator registered with the CNMC.