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.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
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.purchasePhoneNumber({ body: { profileId: 'profile_abc123', },});console.log(data);{ "message": "string", "checkoutUrl": "http://example.com"}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.)
Resolve a number claim
Resolves a `claimId` from a keyless search or purchase into the selection it carries (country, number type, area and exact number) priced at today's rate. The dashboard calls it when a person lands from a `claimUrl`. The number is not held, so buying it can still fail with 409 PHONE_NUMBER_UNAVAILABLE.