Skip to content

Accounts

List the WhatsApp phone numbers connected to your Watzy account. You'll need an account_id from this endpoint when sending messages.

GET /api/v1/accounts

Returns all active WhatsApp accounts (phone numbers) linked to your API key.

Request

http
GET /api/v1/accounts HTTP/1.1
Authorization: Bearer wzy_your_key_here

Response

json
{
  "data": [
    {
      "id": 1,
      "phone_number_id": "123456789012345",
      "display_phone_number": "+1 555 123 4567",
      "waba_id": "987654321098765",
      "status": "active"
    },
    {
      "id": 2,
      "phone_number_id": "543210987654321",
      "display_phone_number": "+44 20 1234 5678",
      "waba_id": "987654321098765",
      "status": "active"
    }
  ]
}

Response fields

FieldTypeDescription
idintegerUse this as account_id when sending messages
phone_number_idstringMeta's internal phone number ID
display_phone_numberstringHuman-readable phone number
waba_idstringWhatsApp Business Account ID
statusstringactive or inactive

Example — curl

bash
curl https://whatsapp-backend.developnetwork.net/api/v1/accounts \
  -H "Authorization: Bearer wzy_your_key_here"

Example — JavaScript

js
const res = await fetch('https://whatsapp-backend.developnetwork.net/api/v1/accounts', {
  headers: { 'Authorization': 'Bearer wzy_your_key_here' },
})
const { data: accounts } = await res.json()

// Pick the first account's id for sending messages
const accountId = accounts[0].id

Built with ❤️ on top of the WhatsApp Business API.