Zernio
Zernio
API Reference

Voice & Calling

Calls

List phone callsGETPlace an outbound phone callPOSTGet a phone callGETHang up a live callPOSTBlind-transfer a live callPOSTGet a call recordingGETEstimate call costGET

Browser Softphone

Mint a browser softphone sessionPOSTDial from the browser softphonePOST

Number Setup

Enable phone calling on a numberPOSTDisable phone calling on a numberDELETEAttach a number to a SIP trunkPOSTDetach a number from its SIP trunkDELETE

SIP Trunks

List SIP trunksGETCreate a SIP trunkPOSTGet a SIP trunkGETDelete a SIP trunkDELETERotate a SIP trunk's passwordPOST
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
Voice & Calling

Enable phone calling on a number

Turns on regular phone (PSTN) calling for one of your numbers and configures how inbound calls are handled. Inbound calls route to forwardTo: your own AI voice agent (Vapi/Retell), a phone, or a SIP endpoint. Optional extras: voicemail, business-hours windows, an IVR menu, a caller blocklist, recording, and transcription. A number can also be voice-enabled with no forward (outbound-only).

Idempotent, and doubles as the settings update: only fields present in the body are written. Omitting forwardTo preserves the current destination; sending an empty string clears it.


POST
/v1/phone-numbers/{id}/voice

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

In: header

Path Parameters

id*string

Phone number record ID (from GET /v1/phone-numbers).

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

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.enableVoiceOnNumber({  path: {    id: 'abc123',  },  body: {    forwardTo: 'string',    recordingEnabled: false,    transcriptionEnabled: false,  },});console.log(data);
{  "enabled": true,  "phoneNumber": "string",  "pstnForwardTo": "string",  "recordingEnabled": true,  "transcriptionEnabled": true,  "transcriptionLanguage": "auto",  "voicemailEnabled": true,  "voicemailGreeting": "string",  "businessHoursEnabled": true,  "businessHoursTimezone": "string",  "businessHours": [    {      "day": 0,      "open": "string",      "close": "string"    }  ],  "blockedCallers": [    "string"  ],  "forwardCallerId": "business",  "ivrEnabled": true,  "ivrPrompt": "string",  "ivrOptions": [    {      "digit": "string",      "forwardTo": "string",      "label": "string"    }  ]}
Was this page helpful?

Dial from the browser softphone

Step 2 of the browser softphone handshake: places an outbound call whose answered leg is bridged to the browser registered with the credential from `POST /v1/voice/calls/web`. The call runs through the normal outbound lane, so it is logged as outbound (from = your number, to = target) and recorded per the number's settings.

Disable phone calling on a number

Turns off PSTN calling for the number. The stored forward destination and settings are preserved, so re-enabling restores the prior config.

forwardTo?string

tel:+E164, sip:..., or wss://... destination for inbound calls. Empty string clears the forward (outbound-only); omitted preserves the current one.

recordingEnabled?boolean
transcriptionEnabled?boolean
transcriptionLanguage?string

Value in

  • "auto"
  • "en"
  • "es"
voicemailEnabled?boolean

Voicemail is taken when there's no live destination. Default on.

voicemailGreeting?string

Custom spoken greeting; empty string restores the default.

Lengthlength <= 1000
businessHoursEnabled?boolean

Outside the windows, inbound skips the forward and goes to voicemail. Off = 24/7.

businessHoursTimezone?string

IANA timezone the windows are evaluated in.

Lengthlength <= 64
businessHours?array<>
Itemsitems <= 21
blockedCallers?array<string>

E.164 numbers rejected before answer. Replaces the whole list; bare 10-digit values are normalized as US numbers.

Itemsitems <= 1000
forwardCallerId?string

Caller ID on the forwarded leg: your number (business) or the original caller's (caller).

Value in

  • "business"
  • "caller"
ivrEnabled?boolean

IVR menu (supersedes the plain forward within business hours).

ivrPrompt?string
Lengthlength <= 1000
ivrOptions?array<>
Itemsitems <= 12