Get phone number
Retrieve the current status of a purchased phone number. Poll this to
track Meta pre-verification (US sync path) and, for regulated (Tier 3/4)
numbers, the async lifecycle: pending_regulatory → active (or
regulatory_declined). When a regulated number has an Onfido ID step,
onfidoVerificationUrl appears here once the order is placed. Forward
it to the end user. (Or subscribe to the whatsapp.number.* webhooks
instead of polling.)
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Path Parameters
Phone number record ID
Response Body
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.phonenumbers.getPhoneNumber({ path: { id: 'abc123', },});console.log(data);{ "phoneNumber": { "id": "string", "phoneNumber": "string", "status": "pending_payment", "country": "string", "metaPreverifiedId": "string", "metaVerificationStatus": "string", "onfidoVerificationUrl": "string", "endUserFirstName": "string", "endUserLastName": "string", "regulatoryDeclineReason": "string", "provisionedAt": "2019-08-24T14:15:22Z", "sipTrunkId": "string" }}List phone numbers
List all phone numbers purchased by the authenticated user. By default, released numbers are excluded. Connected (bring-your-own) WhatsApp numbers are returned in the separate `connected` array; they are not billed and have no provisioning lifecycle.
Purchase phone number
Payment-first: the system provisions a number and auto-assigns it, unless you pass `phoneNumber` to buy one exact number from `GET /v1/phone-numbers/available`. With usage-based billing active and a payment method on file, the number provisions inline and bills per month on your usage-based invoice (there is no checkout redirect). No payment method on file returns `402 PAYMENT_REQUIRED`; a regulated country returns `202` with `status: "kyc_required"` and a `kycUrl`. The monthly price is the one `GET /v1/phone-numbers/countries` quotes for that country and `numberType` at the time of purchase, and it is stamped on the number: later rate-card changes never move a number you already own. Requires usage-based billing (the Usage plan). The maximum number of phone numbers is determined by the user's plan.