Connect WhatsApp numbers
Connects numbers from your own WhatsApp Business Account with your Meta access token. List them first with [Preview numbers](/docs/api-reference/whatsapp/previewWhatsappNumbers), then pass the ids you want.
Set up WhatsApp first. Connect a WhatsApp number in the dashboard or with Connect numbers. Included on every paid plan. See plans.
Your WhatsApp Business Account id, from WhatsApp Manager.
A Meta access token that never expires, with both WhatsApp permissions. Stored, never returned.
Meta's ids for the numbers to connect, as Preview numbers lists them.
Your Meta app's secret. Turns on replies. Stored, never returned.
curl -X POST 'https://backend.omnidim.io/api/v1/whatsapp/numbers' \ -H 'Authorization: Bearer YOUR_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "waba_id": "102938475610293", "access_token": "EAAG...", "phone_number_ids": [ "106540352242922" ], "app_secret": "3f9c..." }'
{ "data": [ { "id": 412, "phone_number": "+15551234567", "provider": "meta", "name": "string", "status": "active", "account_restriction": "string", "agent_id": 0, "quality_rating": "string", "messaging_limit": "string", "capabilities": { "types": [ "text" ], "reply_to": false, "window_enforced": false, "delivery_status": "push", "template_sync": false }, "receiving": false, "receiving_error": "string" } ], "failed": [ { "phone_number_id": "string", "message": "This WhatsApp number is already connected to another account. Disconnect it there first, then import it again. Contact support if you cannot access that account." } ] }
BearerAuthAuthorizationBearer <token>Bearer token authentication. Obtain your API key from the OmniDimension dashboard.
application/jsonwaba_id*stringYour WhatsApp Business Account id, from WhatsApp Manager.
access_token*stringA Meta access token that never expires, with both WhatsApp permissions. Stored, never returned.
phone_number_ids*array<string>Meta's ids for the numbers to connect, as Preview numbers lists them.
1 <= itemsapp_secret?stringYour Meta app's secret. Turns on replies. Stored, never returned.
Response body
application/jsonThe connected numbers, and any that failed.
application/jsondata?failed?List WhatsApp numbers
The WhatsApp numbers your API key can see, oldest first. Use it to find a number id, then pass that id to the other routes. Each number carries capabilities, which says what it can send. Archived numbers are left out.
Preview numbers to connect
Lists the numbers on your WhatsApp Business Account with their health, and connects nothing. The access token is checked first, against the same rules as connecting, so a preview that passes can connect.
