List phone numbers
List all WhatsApp phone numbers purchased by the authenticated user. By default, released numbers are excluded.
API key authentication - use your Zernio API key as a Bearer token
In: header
Query Parameters
Filter by status (by default excludes released numbers)
"provisioning" | "active" | "suspended" | "releasing" | "released"Filter by profile
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.whatsappphonenumbers.getWhatsAppPhoneNumbers();console.log(data);{
"numbers": [
{
"_id": "string",
"phoneNumber": "string",
"country": "string",
"status": "pending_payment",
"profileId": {},
"provisionedAt": "2019-08-24T14:15:22Z",
"metaPreverifiedId": "string",
"metaVerificationStatus": "string",
"createdAt": "2019-08-24T14:15:22Z"
}
]
}{
"error": "Unauthorized"
}Send WhatsApp conversion event POST
Forward a WhatsApp Business Messaging conversion event (`LeadSubmitted`, `Purchase`, `AddToCart`, `InitiateCheckout`, `ViewContent`) to Meta's Conversions API with `action_source = business_messaging` and `messaging_channel = whatsapp`. The endpoint looks up the originating CTWA click ID (`ctwa_clid`) captured on the first inbound message of the conversation and replays it on every event so Meta can attribute the conversion back to the Click-to-WhatsApp ad that drove the chat. Configuration prerequisites on the WhatsApp account metadata: - `metaCapiDatasetId`: the Meta Pixel/Dataset ID linked to the WABA. - `connectedFacebookPageId`: the Facebook Page paired with the WhatsApp Business number. Identify the conversation by either `conversationId` (preferred) or `phoneE164` (digits only, no `+`). At least one is required. If the conversation has no captured `ctwa_clid`, the request returns 422 because there is nothing to attribute. Token and dataset coupling: the WhatsApp account's accessToken must have access to the configured `metaCapiDatasetId`. By default a WABA's system-user token is scoped to the WABA's own Business Manager and cannot post to a pixel owned by a different Business; Meta returns code 100 in that case. Either share the dataset with the WhatsApp app's Business in BM, or use a dataset already in the same Business as the WABA.
Purchase phone number POST
Initiate purchasing a WhatsApp phone number. Payment-first flow: the user does not pick a specific number. The system either creates a Stripe Checkout Session (first number) or increments the existing subscription quantity and provisions inline (subsequent numbers). Requires a paid plan. The maximum number of phone numbers is determined by the user's plan.