Get a phone call
Full call detail, including the transcript segments when transcription was on.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Path Parameters
Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.voice.getVoiceCall({ path: { id: 'abc123', },});console.log(data);{ "call": { "_id": "string", "accountId": "string", "conversationId": "string", "contactId": "string", "channel": "whatsapp", "direction": "inbound", "from": "string", "to": "string", "forwardTo": "string", "greeting": "string", "status": "ringing", "isVoicemail": true, "amd": true, "answeredMachine": true, "forwardCallerId": "business", "recordingEnabled": true, "transcriptionEnabled": true, "transcriptionLanguage": "auto", "startedAt": "2019-08-24T14:15:22Z", "answeredAt": "2019-08-24T14:15:22Z", "endedAt": "2019-08-24T14:15:22Z", "transferredAt": "2019-08-24T14:15:22Z", "durationSeconds": 0, "endReason": "hangup", "hangupCause": "string", "sipHangupCause": "string", "callErrors": [ { "code": 0, "message": "string" } ], "recordingUrl": "string", "lastTranscriptSnippet": "string", "transcript": [ { "text": "string", "confidence": 0, "at": "2019-08-24T14:15:22Z" } ], "billing": { "metaMinutes": 0, "telnyxSeconds": 0, "transcriptionSeconds": 0, "transcriptionCostUSD": 0, "metaCostUSD": 0, "telnyxCostUSD": 0, "recordingCostUSD": 0, "billableCostUSD": 0, "totalCostUSD": 0, "currency": "string" }, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z" }}Place an outbound phone call
Dials `to` FROM one of your voice-enabled numbers and, on answer, bridges the callee to the number's stored forward destination, or to the per-call `forwardTo` override. Destinations can be your own AI voice agent (Vapi/Retell), a phone, or a SIP endpoint. An optional `greeting` is spoken to the callee before the bridge. The 200 response means the call is dialing; the lifecycle continues asynchronously (track it via `GET /v1/voice/calls/{id}` or the `call.*` webhooks). Outbound calls are capped per rolling hour (429 when hit). **Idempotency:** send an `Idempotency-Key` header to make retries safe; same key + same body replays the original response instead of dialing (and billing) a second call.
Hang up a live call
Hangs up a live call on demand, including an outbound call that is still ringing and has not been answered yet (the callee stops ringing immediately). Works for PSTN calls and for WhatsApp calls (the `callId` returned by `POST /v1/whatsapp/calls`, or an inbound WhatsApp call id). A WhatsApp call forwarded to a `wss://` destination also ends automatically when that WebSocket closes. Idempotent: ending a call that already ended (or never connected) returns success with the call's current status. Final duration/cost are written asynchronously when the hangup event lands, so the call doc may briefly still show its prior status.