Numbers
Which numbers you can send from, and how to write phone numbers in each place.
Most endpoints live under one of your WhatsApp numbers: /v1/numbers/{phone_number}/…. A token can act on a number only if the number belongs to an organization the token has a role in. Otherwise the call answers 403.
Find your numbers
GET/v1/meReference →
curl -X GET "$WAPIU_API/v1/me" \ -H "Authorization: Bearer $WAPIU_TOKEN"| Field | Description |
|---|---|
sub | The ID of the caller. |
email | The caller's email, or null for a client-credentials token. |
tenants | The organizations you belong to: id, domain and your roles there. |
owned_numbers | Every number you can use in {phone_number}. |
To list the numbers of one organization, with their display names:
GET/v1/tenants/{tenant_id}/numbersReference →
curl -X GET "$WAPIU_API/v1/tenants/0f8e2c4a-1b3d-4e5f-8a9b-0c1d2e3f4a5b/numbers" \ -H "Authorization: Bearer $WAPIU_TOKEN"{
"tenant_id": "0f8e2c4a-1b3d-4e5f-8a9b-0c1d2e3f4a5b",
"data": [
{ "phone_number": "393401234567", "name": "Acme Store", "state": "active", "root_channel_id": null }
]
}An organization with no numbers answers 200 with an empty data.
Phone number formats
| Where | Format | Example |
|---|---|---|
{phone_number} in a path | Country code and number, digits only | 393401234567 |
recipient when you send | E.164, with the + | +393331112222 |
receiver of a configured message | Country code and number, digits only, 6 to 15 | 393331112222 |