Phone numbers
The WhatsApp number a customer connected. Send with the Whitelabel WhatsApp Cloud API id.
GET /api/v1/phone-numbers
Authorization: Bearer $VITRAL_WHATSAPP_API_KEYScope phone_numbers:read. The response is { "data": [ ...stored rows ] } with no pagination and no customerId query. Filter in your process.
| Field | Use |
|---|---|
id |
phoneNumberId on send, templates filter, and the conversation window. |
waPhoneNumberId |
Meta’s phone number id. Webhook data.value.metadata.phone_number_id matches this. |
customerId |
The customer from the setup link. Null if the customer was deleted, or if the number was connected without a setup link. |
connectionType |
coexistence or dedicated when setup recorded the path. Null for older rows and for a headless finalize that omitted it while both types were allowed. |
status |
ACTIVE, INACTIVE, BANNED, PENDING_VERIFICATION. Send requires ACTIVE. |
maxMessagesPerSecond |
Token-bucket cap. Default 80. Create and patch accept integers 1–500 (phone_numbers:write). |
botPauseMinutesOnEcho |
Minutes a WhatsApp Business app reply pauses tenant bots on this number. Null uses the deployment default (30). 0 disables the pause. PATCH accepts an integer 0–1440 or null (phone_numbers:write). Whitelabel WhatsApp Cloud API records the pause and does not block sends. See Human takeover. |
GET /api/v1/phone-numbers/:id is the same row. A missing id is 404. An id on another tenant is 403 Phone number does not belong to this tenant.
GET /api/v1/phone-numbers/:id/status returns { id, status, isVerified, qualityRating }.
POST /api/v1/phone-numbers/:id/register with { "pin": "123456" } (scope phone_numbers:write) calls Meta register. Meta 133010 is HTTP 422 PHONE_NOT_REGISTERED. Meta 133016 is HTTP 429 REGISTER_RATE_LIMITED. Other Graph failures are rethrown. A coexistence number (connectionType: "coexistence", or a number Graph currently reports as is_on_biz_app) is 400 VALIDATION_ERROR and Meta register is not called. If that Graph read fails, the response is 503 REGISTER_GRAPH_UNAVAILABLE and Meta register is not called. A dedicated number Graph reports with is_on_biz_app: false is still registered. A sync row by itself does not block register. Coexistence numbers stay on the WhatsApp Business app.
GET /api/v1/phone-numbers/:id/coexistence-sync (scope phone_numbers:read) returns the contact and history sync row for that number. 404 when the number has no sync row. The body is the sync state only: statuses, Meta request_ids, counters (phase, progress, chunks, messagesStored, contactsStored), and the 24-hour deadline (windowExpiresAt). History and contact webhooks fill those counters. It never includes a token.
POST /api/v1/phone-numbers/:id/coexistence-sync (scope phone_numbers:write) enqueues the sync job again. queued is false when both syncs were already requested, the 24-hour window has closed, the last attempt was under 60 seconds ago, or COEXISTENCE_SYNC_ENABLED is false. A FAILED side that never stored a request id can be tried once more from this call while the window is open. Finalizing coexistence setup again after the window has closed starts a new sync. A second finalize while the window is still open leaves the row as it is. See Coexistence sync.
POST /api/v1/phone-numbers/:id/check-connection (same write scope) runs finish-binding for that phone’s WABA. It does not call register again when the phone is already stored. It does not open a new coexistence sync window and it does not call Meta smb_app_data. A phone with no sync row is recorded only when createdAt is still inside 24 hours.
A plan can limit how many numbers are connected (ACTIVE or PENDING_VERIFICATION). Over that limit, create, a PATCH back to one of those statuses, register, Embedded Signup and hosted setup return 402 PHONE_NUMBER_LIMIT (hosted setup: errorCode phone_number_limit) before Meta register is called. INACTIVE and BANNED numbers do not count. Tenants without a plan limit are not affected.
A number can belong to one tenant. Embedded Signup that tries to store a waPhoneNumberId already on a different tenant returns 400 VALIDATION_ERROR with message This WhatsApp phone number is already bound to another tenant.
Disconnect events can set status to INACTIVE (BANNED stays BANNED). See phone.disconnected.
This API does not call Meta POST /<phone-number-id>/deregister.