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": {
"accounts": [
{
"id": "893c5d88-b4b6-4b2a-bf3b-9a8bb698a3e7",
"name": "Main Business Support",
"app_id": "10987654321",
"phone_id": "123456789",
"business_id": "987654321",
"webhook_verify_token": "a1b2c3d4e5f6g7h8i9j0",
"api_version": "v21.0",
"is_default_incoming": true,
"is_default_outgoing": true,
"auto_read_receipt": true,
"business_calling_enabled": true,
"status": "active",
"has_access_token": true,
"has_app_secret": true,
"created_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_by_name": "John Doe",
"updated_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"updated_by_name": "John Doe",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
]
}
}

Retrieve a single account.

Terminal window
GET /api/accounts/{id}
{
"status": "success",
"data": {
"id": "893c5d88-b4b6-4b2a-bf3b-9a8bb698a3e7",
"name": "Main Business Support",
"app_id": "10987654321",
"phone_id": "123456789",
"business_id": "987654321",
"webhook_verify_token": "a1b2c3d4e5f6g7h8i9j0",
"api_version": "v21.0",
"is_default_incoming": true,
"is_default_outgoing": true,
"auto_read_receipt": true,
"business_calling_enabled": true,
"status": "active",
"has_access_token": true,
"has_app_secret": true,
"created_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_by_name": "John Doe",
"updated_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"updated_by_name": "John Doe",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
}

Connect a new WhatsApp Business account.

Terminal window
POST /api/accounts
FieldTypeRequiredDescription
namestringYesReadable name for the account
phone_idstringYesMeta’s WhatsApp Phone Number ID
business_idstringYesMeta’s WhatsApp Business Account ID (WABA ID)
access_tokenstringYesMeta Graph API permanent access token
app_idstringNoMeta App ID
app_secretstringNoMeta App Secret for validating webhook signatures
webhook_verify_tokenstringNoCustom token for webhook verification (auto-generated if omitted)
api_versionstringNoMeta API Version (defaults to v21.0)
is_default_incomingbooleanNoMark as the default account for incoming messages
is_default_outgoingbooleanNoMark as the default account for outgoing messages
auto_read_receiptbooleanNoAutomatically send read receipts for incoming messages
business_calling_enabledbooleanNoEnable calling features for this phone number
{
"name": "Customer Support Line",
"phone_id": "123456789",
"business_id": "987654321",
"access_token": "EAAxxxx...",
"app_id": "10987654321",
"app_secret": "meta_app_secret_123",
"webhook_verify_token": "your_custom_verify_token",
"api_version": "v21.0",
"is_default_incoming": true,
"is_default_outgoing": true,
"auto_read_receipt": true,
"business_calling_enabled": true
}
{
"status": "success",
"data": {
"id": "893c5d88-b4b6-4b2a-bf3b-9a8bb698a3e7",
"name": "Customer Support Line",
"app_id": "10987654321",
"phone_id": "123456789",
"business_id": "987654321",
"webhook_verify_token": "your_custom_verify_token",
"api_version": "v21.0",
"is_default_incoming": true,
"is_default_outgoing": true,
"auto_read_receipt": true,
"business_calling_enabled": true,
"status": "active",
"has_access_token": true,
"has_app_secret": true,
"created_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_by_name": "John Doe",
"updated_by_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"updated_by_name": "John Doe",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
}

Update account settings. Partial updates are supported.

Terminal window
PUT /api/accounts/{id}

Supports the same fields as Create Account.

{
"name": "Customer Support (Primary)",
"access_token": "EAAyyyy...",
"business_calling_enabled": false
}

Returns the updated account object.

Remove a WhatsApp account connection.

Terminal window
DELETE /api/accounts/{id}
{
"status": "success",
"data": {
"message": "Account deleted successfully"
}
}

Verify the account credentials with Meta Graph API. This validates both Phone ID and Business ID configurations.

Terminal window
POST /api/accounts/{id}/test
{
"status": "success",
"data": {
"success": true,
"display_phone_number": "+1234567890",
"verified_name": "Your Business Name",
"quality_rating": "GREEN",
"messaging_limit_tier": "TIER_1K",
"code_verification_status": "VERIFIED",
"account_mode": "LIVE",
"is_test_number": false
}
}

Subscribe the WhatsApp Business Account to receive real-time webhooks (messages, status updates) from Meta. Run this after adding or re-verifying a number.

Terminal window
POST /api/accounts/{id}/subscribe
{
"status": "success",
"data": {
"success": true,
"message": "App subscribed to webhooks successfully. You should now receive incoming messages."
}
}

Retrieve the public business profile for this WhatsApp phone number from Meta Graph API.

Terminal window
GET /api/accounts/{id}/business_profile
{
"status": "success",
"data": {
"messaging_product": "whatsapp",
"address": "123 Business Rd, Suite 100, San Francisco, CA 94103",
"description": "We offer premium business messaging solutions.",
"vertical": "PROF_SERVICES",
"email": "support@example.com",
"websites": [
"https://example.com",
"https://support.example.com"
],
"profile_picture_url": "https://pps.whatsapp.net/v/t61.24694-24/...",
"about": "Helping you automate WhatsApp support."
}
}

Update the public WhatsApp business profile details on Meta’s server.

Terminal window
PUT /api/accounts/{id}/business_profile
FieldTypeDescription
messaging_productstringMust be "whatsapp"
addressstringBusiness street address
descriptionstringBusiness profile description
verticalstringIndustry classification (e.g. PROF_SERVICES, RETAIL, HOTEL, etc.)
emailstringCustomer support email address
websitesarrayList of website URLs (max 2)
aboutstringWhatsApp status text / about section
{
"messaging_product": "whatsapp",
"address": "123 Business Rd, Suite 200, San Francisco, CA 94103",
"description": "Premium customer automation platform.",
"vertical": "RETAIL",
"email": "contact@example.com",
"websites": [
"https://example.com"
],
"about": "Available for support."
}

Returns the updated business profile object.

Upload a new profile picture for the WhatsApp business account. The image will be uploaded to Meta Graph API.

Terminal window
POST /api/accounts/{id}/business_profile/photo

Must be sent as multipart/form-data.

ParameterTypeRequiredDescription
filefileYesThe image file to upload (JPEG or PNG, recommended 640x640 resolution)
{
"status": "success",
"data": {
"message": "Profile picture updated successfully",
"handle": "45678901234567"
}
}
StatusDescription
activeAccount is connected and working
suspendedAccount suspended by Meta

Meta assigns quality ratings based on message performance:

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