whatsapp phone numbers
Purchase phone number
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.
AuthorizationBearer <token>
API key authentication - use your Zernio API key as a Bearer token
In: header
profileIdstring
Profile to associate the number with
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.purchaseWhatsAppPhoneNumber({ body: { profileId: 'profile_abc123', },});console.log(data);{
"message": "string",
"checkoutUrl": "http://example.com"
}Empty
{
"error": "Unauthorized"
}Empty