Skip to content

Accounts

Overview

Accounts represent your WhatsApp Business API connections. Each account is linked to a phone number registered with Meta’s WhatsApp Business Platform.

List Accounts

Retrieve all connected WhatsApp accounts.

Terminal window
GET /api/accounts

Response

{
"status": "success",
"data": {
"items": [
{
"id": "uuid",
"name": "Main Business",
"phone_number": "+1234567890",
"phone_number_id": "123456789",
"business_account_id": "987654321",
"status": "active",
"created_at": "2024-01-01T00:00:00Z"
}
]
}
}

Get Account

Retrieve a single account.

Terminal window
GET /api/accounts/{id}

Response

{
"status": "success",
"data": {
"id": "uuid",
"name": "Main Business",
"phone_number": "+1234567890",
"phone_number_id": "123456789",
"business_account_id": "987654321",
"access_token": "EAAxxxx...",
"webhook_verify_token": "your_verify_token",
"status": "active",
"quality_rating": "GREEN",
"messaging_limit": "TIER_1K",
"created_at": "2024-01-01T00:00:00Z"
}
}

Create Account

Connect a new WhatsApp Business account.

Terminal window
POST /api/accounts

Request Body

{
"name": "Support Line",
"phone_number_id": "123456789",
"business_account_id": "987654321",
"access_token": "EAAxxxx...",
"webhook_verify_token": "your_custom_verify_token"
}

Response

{
"status": "success",
"data": {
"id": "uuid",
"name": "Support Line",
"status": "pending",
"created_at": "2024-01-01T00:00:00Z"
}
}

Update Account

Update account settings.

Terminal window
PUT /api/accounts/{id}

Request Body

{
"name": "Customer Support",
"access_token": "EAAyyyy..."
}

Delete Account

Remove a WhatsApp account connection.

Terminal window
DELETE /api/accounts/{id}

Test Connection

Verify the account connection with Meta.

Terminal window
POST /api/accounts/{id}/test

Response

{
"status": "success",
"data": {
"connected": true,
"phone_number": "+1234567890",
"display_phone_number": "(123) 456-7890",
"verified_name": "Your Business Name",
"quality_rating": "GREEN"
}
}

Account Status

StatusDescription
pendingAccount created, awaiting verification
activeAccount is connected and working
disconnectedConnection lost, needs reconnection
suspendedAccount suspended by Meta

Quality Rating

Meta assigns quality ratings based on message performance:

RatingDescription
GREENHigh quality, no issues
YELLOWSome issues, review messages
REDLow quality, account at risk