WhatsApp APIAPI
WhatsApp: list the numbers
List the workspace WhatsApp numbers connected through Meta's official API and get the id that goes in numberId when sending.
Updated on
GET /whatsapp/numbers returns the workspace WhatsApp numbers. The id of each one goes in numberId when sending templates and messages.
List the numbers
GET https://api.xbase.app/api/external/v1/whatsapp/numberscurl https://api.xbase.app/api/external/v1/whatsapp/numbers \
-H "Authorization: Bearer $XBASE_API_KEY"Response 200:
[
{
"id": "6d1f3c2a-4b5e-4f60-9a7b-8c9d0e1f2a3b",
"phone": "5511999990000",
"name": "Customer service",
"status": "ACTIVE"
}
]| Field | Type | Description |
|---|---|---|
id | text | Number id at XBASE. Goes in numberId |
phone | text or null | Sending number, digits only, with the country code |
name | text or null | Display name of the number |
status | text | ACTIVE sends. INACTIVE is disconnected: sends through it return 422 NUMBER_DISCONNECTED |
The list comes in the order the numbers were connected. A number removed in WhatsApp API → Numbers does not show up.
Errors
| Status | code | When |
|---|---|---|
| 401 | INVALID_API_KEY | No key, wrong key format, nonexistent or revoked key |
| 403 | MISSING_SCOPE | The key does not have the whatsapp:send scope |
See the full format in Errors.