API referenceWhatsApp
POST /whatsapp/connect
Connect a number with an existing token (system user or test token) instead of Embedded Signup: reads the number and the WABA with it, subscribes the app to the WABA and registers the number (failures are reported in onboarding, not as errors). The token is stored encrypted. Emits account.connected
POST
BearerAuthheader
AuthorizationBearer <token>API key sk_...
application/json- body
accessToken*stringToken with whatsapp_business_management and whatsapp_business_messaging
phoneNumberId*stringCloud API phone number id
wabaId*stringWhatsApp Business Account id
pin?string6-digit two-step verification PIN (default: random)
Match
^\d{6}$register?booleanDefault
truesubscribe?booleanDefault
trueexternalId?stringLength
length <= 200{account, whatsapp}
application/json- response
account?whatsapp?curl -X POST 'https://example.com/api/v1/whatsapp/connect' \ -H 'Content-Type: application/json' \ -d '{ "accessToken": "string", "phoneNumberId": "string", "wabaId": "string"}'Example Response
{ "account": { "id": "string", "platform": "string", "accountName": "string", "platformAccountId": "string", "externalId": "string" }, "whatsapp": { "accountId": "string", "platform": "whatsapp", "accountName": "string", "phoneNumberId": "string", "wabaId": "string", "businessId": "string", "externalId": "string", "status": "string", "phoneNumber": { "displayPhoneNumber": "string", "verifiedName": "string", "qualityRating": "string", "messagingLimitTier": "string", "nameStatus": "string", "platformType": "string", "codeVerificationStatus": "string", "status": "string", "checkedAt": "2019-08-24T14:15:22Z", "throughput": null }, "onboarding": { "connection": "embedded_signup", "onboarding": "cloud_api", "subscribed": true, "subscribeError": "string", "registered": true, "registerError": "string", "registerSkipped": "string", "onboardedAt": "2019-08-24T14:15:22Z" } }}