Release phone number
Release a purchased phone number. This will:
- Disconnect any linked WhatsApp social account
- Decrement the Stripe subscription quantity (or cancel if last number)
- Release the number from Telnyx
- Mark the number as released
API key authentication - use your Zernio API key as a Bearer token
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.whatsappphonenumbers.releaseWhatsAppPhoneNumber({ path: { phoneNumberId: 'phonenumber_abc123', },});console.log(data);{
"message": "string",
"phoneNumber": {
"id": "string",
"phoneNumber": "string",
"status": "string",
"releasedAt": "2019-08-24T14:15:22Z"
}
}{
"error": "Unauthorized"
}{
"error": "Not found"
}Get phone number GET
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.)
Check a country's availability + address constraint GET
Pre-purchase check, so you can warn BEFORE a customer invests in KYC (regulated review is async, 1-3 days). Tells you whether we have deliverable inventory, and what address the customer needs: - `addressConstraint: geo` → the registered address MUST be in one of the returned `areas` (the only place we have stock). A different-area address passes pre-approval but the number can never be assigned. - `addressConstraint: country` → any in-country address works. - `addressConstraint: none` → field-only / instant country, no address. Call this before starting the KYC form for regulated countries.