OverviewProductsPlatformsAPI ReferenceResources
Phone Numbers

Request the WhatsApp verification code for a number

POSThttps://zernio.com/api/v1/phone-numbers/{id}/whatsapp/request-code

Starts (or restarts) WhatsApp verification of a Zernio-hosted number. Used to connect WhatsApp on a number bought for calls or SMS.

Zernio adds the number to Meta's pre-verified pool when needed and asks Meta to send the verification code, which Zernio captures on the number itself.

/v1/whatsapp/phone-numbers/{id}/request-code is a deprecated alias with the same contract.

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Path parameters

idstringRequired

Phone number record ID (from GET /v1/phone-numbers).

Body

application/json
Optional parameters1 field
methodstringOne of SMS | VOICE

Delivery method for the code. Omit to let Zernio pick (SMS when the number can receive it, else VOICE).

Responses

Success· the request worked

Errors· the request failed

How it behaves

When Meta refuses the number (Meta error 136021)

  • A number that is already live (active or suspended) is left untouched and keeps working for calls and SMS. The call answers 409 number_not_whatsapp_eligible; buy a new number with WhatsApp enabled instead.
  • A number that was never live (still verifying) is replaced at no extra cost with a WhatsApp-eligible number on the same record, answered as 200 with replaced: true.
POST/v1/phone-numbers/{id}/whatsapp/request-code
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.phonenumbers.requestPhoneNumberWhatsAppCode({  path: {    id: 'abc123',  },  body: {    method: 'SMS',  },});console.log(data);
{  "message": "string",  "method": "SMS",  "alreadyVerified": true,  "replaced": true,  "newPhoneNumber": "string"}
OpenAPI specification
Was this page helpful?