Accounts
Overview
Section titled “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
Section titled “List Accounts”Retrieve all connected WhatsApp accounts.
GET /api/accountsResponse
Section titled “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
Section titled “Get Account”Retrieve a single account.
GET /api/accounts/{id}Response
Section titled “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
Section titled “Create Account”Connect a new WhatsApp Business account.
POST /api/accountsRequest Body
Section titled “Request Body”{ "name": "Support Line", "phone_number_id": "123456789", "business_account_id": "987654321", "access_token": "EAAxxxx...", "webhook_verify_token": "your_custom_verify_token"}Response
Section titled “Response”{ "status": "success", "data": { "id": "uuid", "name": "Support Line", "status": "pending", "created_at": "2024-01-01T00:00:00Z" }}Update Account
Section titled “Update Account”Update account settings.
PUT /api/accounts/{id}Request Body
Section titled “Request Body”{ "name": "Customer Support", "access_token": "EAAyyyy..."}Delete Account
Section titled “Delete Account”Remove a WhatsApp account connection.
DELETE /api/accounts/{id}Test Connection
Section titled “Test Connection”Verify the account connection with Meta.
POST /api/accounts/{id}/testResponse
Section titled “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
Section titled “Account Status”| Status | Description |
|---|---|
pending | Account created, awaiting verification |
active | Account is connected and working |
disconnected | Connection lost, needs reconnection |
suspended | Account suspended by Meta |
Quality Rating
Section titled “Quality Rating”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 |