POST /whatsapp/numbers
Buy phoneNumber and connect it to the WABA of accountId (a connected WhatsApp account; its token is used): purchase (billing event number.purchase), POST /{waba}/phone_numbers, voice code request (SMS after WHATSAPP_OTP_VOICE_TIMEOUT_MIN), code captured from the carrier call, verify, register, new WhatsApp account (phone_number.provisioned). 403 number_limit_reached beyond the per-organization limit
BearerAuthAuthorizationBearer <token>API key sk_...
application/json- body
phoneNumber*stringE.164, from /whatsapp/numbers/available
accountId*stringConnected WhatsApp account
verifiedName*stringWhatsApp display name
country?string"US""CA"{number}
application/json- response
number?curl -X POST 'https://example.com/api/v1/whatsapp/numbers' \ -H 'Content-Type: application/json' \ -d '{ "phoneNumber": "string", "accountId": "string", "verifiedName": "string"}'{ "number": { "id": "string", "provider": "telnyx", "phoneNumber": "string", "countryCode": "string", "verifiedName": "string", "status": "purchasing", "wabaId": "string", "phoneNumberId": "string", "accountId": "string", "sourceAccountId": "string", "codeMethod": "VOICE", "codeRequestedAt": "2019-08-24T14:15:22Z", "codeAttempts": 0, "priceCents": 0, "currency": "string", "activatedAt": "2019-08-24T14:15:22Z", "lastProductionMessageAt": "2019-08-24T14:15:22Z", "releaseWarnedAt": "2019-08-24T14:15:22Z", "releaseAt": "2019-08-24T14:15:22Z", "releasedAt": "2019-08-24T14:15:22Z", "error": "string", "nextActionAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "lastCode": { "code": "string", "capturedAt": "string", "expiresAt": "string" } }}GET /whatsapp/numbers GET
Numbers bought by Postgale for this organization, newest first, with the organization's limit and how many it holds
GET /whatsapp/numbers/{id} GET
One bought number; lastCode is the code captured in the last 10 minutes (manual Embedded Signup fallback: choose voice call and type it)