Skip to content

Accounts

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

Retrieve all connected WhatsApp accounts.

Terminal window
GET /api/accounts
{
"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"
}
]
}
}

Retrieve a single account.

Terminal window
GET /api/accounts/{id}
{
"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"
}
}

Connect a new WhatsApp Business account.

Terminal window
POST /api/accounts
{
"name": "Support Line",
"phone_number_id": "123456789",
"business_account_id": "987654321",
"access_token": "EAAxxxx...",
"webhook_verify_token": "your_custom_verify_token"
}
{
"status": "success",
"data": {
"id": "uuid",
"name": "Support Line",
"status": "pending",
"created_at": "2024-01-01T00:00:00Z"
}
}

Update account settings.

Terminal window
PUT /api/accounts/{id}
{
"name": "Customer Support",
"access_token": "EAAyyyy..."
}

Remove a WhatsApp account connection.

Terminal window
DELETE /api/accounts/{id}

Verify the account connection with Meta.

Terminal window
POST /api/accounts/{id}/test
{
"status": "success",
"data": {
"connected": true,
"phone_number": "+1234567890",
"display_phone_number": "(123) 456-7890",
"verified_name": "Your Business Name",
"quality_rating": "GREEN"
}
}

| Status | Description | |--------|-------------| | pending | Account created, awaiting verification | | active | Account is connected and working | | disconnected | Connection lost, needs reconnection | | suspended | Account suspended by Meta |

Meta assigns quality ratings based on message performance:

| Rating | Description | |--------|-------------| | GREEN | High quality, no issues | | YELLOW | Some issues, review messages | | RED | Low quality, account at risk |