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.
API key authentication - use your Zernio API key as a Bearer token
In: header
Path Parameters
Phone number record ID (from GET /v1/phone-numbers).
tel:+E164, sip:..., or wss://... destination for inbound calls. Empty string clears the forward (outbound-only); omitted preserves the current one.
"auto" | "en" | "es"Voicemail is taken when there's no live destination. Default on.
Custom spoken greeting; empty string restores the default.
length <= 1000Outside the windows, inbound skips the forward and goes to voicemail. Off = 24/7.
IANA timezone the windows are evaluated in.
length <= 64items <= 21E.164 numbers rejected before answer. Replaces the whole list; bare 10-digit values are normalized as US numbers.
items <= 1000Caller ID on the forwarded leg: your number (business) or the original caller's (caller).
"business" | "caller"IVR menu (supersedes the plain forward within business hours).
length <= 1000items <= 12Response 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"
}
]
}{
"error": "Unauthorized"
}Disable phone calling on a number DELETE
Turns off PSTN calling for the number. The stored forward destination and settings are preserved, so re-enabling restores the prior config.
Hang up a live call POST
Hangs up a live call on demand. 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.