Mint a browser softphone session
Step 1 of the two-step browser softphone handshake. Mints a WebRTC
session (token + credential) the browser registers with the
@telnyx/webrtc SDK. Once registered, call
POST /v1/voice/calls/web/dial with the returned credentialId to
place the call. The split avoids bridging to a browser that has not
finished registering. The token lives ~1 hour (it must outlive the
whole call, not just the handshake).
API key authentication - use your Zernio API key as a Bearer token
In: header
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.createVoiceWebSession();console.log(data);{
"success": true,
"token": "string",
"credentialId": "string",
"expiresAt": "2019-08-24T14:15:22Z",
"sdk": "@telnyx/webrtc"
}{
"error": "Unauthorized"
}Place an outbound phone call POST
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.
Estimate call cost GET
Pre-call cost estimate for a PSTN call: the carrier leg plus optional recording and transcription add-ons. Same billing formula as the post-call invoice, so the quote and the final charge can't disagree. The per-minute figure is deliberately conservative (the real cost comes from the settled carrier record after the call), so estimates trend slightly over the actual invoice. Parity endpoint of `GET /v1/whatsapp/calls/estimate`, minus the Meta line (PSTN calls have no separate Meta bill, so `totalCostUSD` equals `billableCostUSD`).