WhatsApp accounts API

Connect WhatsApp Business Accounts and phone numbers, check their health. 9 ops: list_whatsapp_accounts, get_whatsapp_account, get_connect_config, get_whatsapp_onboarding, connect_whatsapp_account, register_phone_number, check_account_health, sync_whatsapp_account, disconnect_whatsapp_account.

Connect WhatsApp Business Accounts and phone numbers, check their health.

List WhatsApp accounts · POST /api/v1/list_whatsapp_accounts · scope accounts:read or GET …?input=

The WhatsApp Business Accounts this organization sends from, each with its phone numbers, connection status, Meta review and verification state and the latest health check. Includes the sandbox account (mode sandbox). Use a phone number's `id` as phone_number_id in send_message.

curl -X POST https://getwabi.dev/api/v1/list_whatsapp_accounts \  -H "Authorization: Bearer wabi_…"

Get a WhatsApp account · POST /api/v1/get_whatsapp_account · scope accounts:read or GET …?input=

One WhatsApp Business Account with its numbers, status, Meta review and verification state, webhook subscription, latest health check and recent Meta account events.

curl -X POST https://getwabi.dev/api/v1/get_whatsapp_account \  -H "Authorization: Bearer wabi_…" \  -H "Content-Type: application/json" \  -d '{"account_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'

Get connect options · POST /api/v1/get_connect_config · scope accounts:read or GET …?input=

How to connect a WhatsApp Business Account here: whether Meta's Embedded Signup is available (with the app id and configuration id the browser flow needs), the steps for a manual connect with a system user token, the permissions the token needs, and the managed webhook URL.

curl -X POST https://getwabi.dev/api/v1/get_connect_config \  -H "Authorization: Bearer wabi_…"

Get the connect wizard state · POST /api/v1/get_whatsapp_onboarding · scope accounts:read or GET …?input=

Where this organization is in connecting WhatsApp: connect an account → register a number → send a test message → done. Each step is read from the data, so the wizard resumes where it stopped. Returns the current step, the account and numbers involved, the latest test message, the connect options and a hint naming the op for the next step.

curl -X POST https://getwabi.dev/api/v1/get_whatsapp_onboarding \  -H "Authorization: Bearer wabi_…"

connect_whatsapp_account

writeowner or admin

Connect a WhatsApp account · POST /api/v1/connect_whatsapp_account · scope accounts:write

Connects (or reconnects) the organization's own WhatsApp Business Account. method embedded_signup takes the `code` from Meta's Embedded Signup in the browser (plus the waba_id and phone_number_id it reported); method manual takes a waba_id and a system user access_token with whatsapp_business_management and whatsapp_business_messaging. Checks the token, reads the account and its numbers, subscribes the account's webhooks (no server to run), and stores the token encrypted. Reconnecting the same WABA keeps all history. Numbers not yet registered come back pending: call register_phone_number next. Errors say whether Meta, your setup or we must act (controlled_by).

curl -X POST https://getwabi.dev/api/v1/connect_whatsapp_account \  -H "Authorization: Bearer wabi_…" \  -H "Content-Type: application/json" \  -d '{"method":"embedded_signup"}'

register_phone_number

writeowner or admin

Register a phone number · POST /api/v1/register_phone_number · scope accounts:write

Registers a connected number for the Cloud API with its 6-digit two-step verification PIN (for a number that has none yet, this sets it: keep it safe). Needed once after connecting a number that is pending. Returns the number and its account, now connected.

curl -X POST https://getwabi.dev/api/v1/register_phone_number \  -H "Authorization: Bearer wabi_…" \  -H "Content-Type: application/json" \  -d '{"phone_number_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10","pin":"pin"}'

Check account health · POST /api/v1/check_account_health · scope accounts:write

Runs the connectivity and permissions health check on a WhatsApp account: access token and permissions, webhook subscription, Meta's account review and business verification, and for each number its registration, quality rating, messaging limit and display name. Each check says ok, warning or error, who controls it (meta: Meta's decision, setup: fixable by you, platform: ours) and the fix. repair: true re-subscribes missing webhooks (admin). Stores the result on the account.

curl -X POST https://getwabi.dev/api/v1/check_account_health \  -H "Authorization: Bearer wabi_…" \  -H "Content-Type: application/json" \  -d '{"account_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'

Sync a WhatsApp account · POST /api/v1/sync_whatsapp_account · scope accounts:write

Re-reads a WhatsApp account and its numbers from Meta (name, review and verification status, quality, messaging limits, display names). Webhooks keep these current; use it after changing something in Meta Business Suite.

curl -X POST https://getwabi.dev/api/v1/sync_whatsapp_account \  -H "Authorization: Bearer wabi_…" \  -H "Content-Type: application/json" \  -d '{"account_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'

disconnect_whatsapp_account

writeowner or admin

Disconnect a WhatsApp account · POST /api/v1/disconnect_whatsapp_account · scope accounts:write

Stops using a WhatsApp Business Account: unsubscribes its webhooks, revokes the stored token and marks it and its numbers disconnected. Messages, contacts and conversations are kept, and connecting it again restores everything. Nothing changes at Meta: the account and numbers stay the customer's.

curl -X POST https://getwabi.dev/api/v1/disconnect_whatsapp_account \  -H "Authorization: Bearer wabi_…" \  -H "Content-Type: application/json" \  -d '{"account_id":"6f1c2e0a-4b7d-4c2e-9a51-0d3b8e7f9a10"}'