List phone calls
Your PSTN voice calls (inbound + outbound), newest first. Cursor
pagination: pass the returned nextCursor as before for the next
page. For a history that also includes WhatsApp calls, use
GET /v1/calls.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Query Parameters
Value in
- "ringing"
- "answered"
- "ended"
- "failed"
Value in
- "inbound"
- "outbound"
Exact filter: calls involving this number (typically one of your DIDs). E.164, leading + optional.
date-time1 <= value <= 20050Response 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.listVoiceCalls();console.log(data);{ "calls": [ { "_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" } ], "nextCursor": "2019-08-24T14:15:22Z"}Get a call (any channel)
Channel-agnostic call detail: works for both WhatsApp and regular phone (PSTN) calls, so any row from `GET /v1/calls` can be opened without branching on `channel`. Returns the full call including transcript segments, with `contactId`/`contactName` set when the counterparty matches a CRM contact.
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.