WhatsApp and SMS channels send and receive messages through the Twilio account of the customer. These endpoints cover two things: connecting a WhatsApp number with Meta’s Embedded Signup, as the Connect WhatsApp wizard in AnswerPal does, and the callbacks Twilio uses to bring in incoming messages and delivery updates. You do not call the callbacks yourself; they are described so you know what happens to a message. Channels themselves, also WhatsApp and SMS channels, are managed on the Channels page.
/api/whatsapp-signup/config/api/whatsapp-signup/startstate for the Meta step./api/whatsapp-signup/active{ "flow": null }./api/whatsapp-signup/{flowId}/api/whatsapp-signup/{flowId}/meta-callback/api/whatsapp-signup/{flowId}/cancel/api/webhooks/twilio/sms/inbound/api/webhooks/twilio/sms/status/api/webhooks/twilio/whatsapp/inbound/api/webhooks/twilio/whatsapp/statusGET .../config tells whether the signup is available. 2. POST .../start creates the flow and a state. 3. The browser opens Meta’s signup dialog with the Meta settings from config; there the customer chooses or creates the WhatsApp Business Account and the number. 4. The browser sends the result with state to POST .../{flowId}/meta-callback. 5. AnswerPal registers the number as a WhatsApp sender in the customer’s Twilio account and waits until Meta and Twilio approve it; poll GET .../{flowId} (AnswerPal checks about every 5 minutes). 6. When the sender is online, AnswerPal creates an active WhatsApp channel named WhatsApp +number, and channelId is filled.409 SubaccountMissing. An account has at most one running signup: start resumes it instead of making a second one. A number that is already a WhatsApp sender of another channel is refused; a number of an SMS channel of the same account can be used, so WhatsApp and SMS share one number.expiresAt (60 minutes after start; resuming extends it, up to 24 hours after the signup began). After the Meta step, registration and approval may take up to 48 hours; after that the flow fails with ReviewTimeout or RegistrationTimedOut.flowId (integer)statusAwaitingMeta (waiting for Meta’s dialog), MetaCompleted, RegisteringSender, PendingReview (Meta or Twilio still checks the number), and the end states Active, Failed, Cancelled and Expired.senderAddress (the number in E.164 format), wabaId, displayNamechannelIdActive.lastErrorCode, lastErrorProviderRejected, DisplayNameRequired, WabaMismatch, SenderAlreadyRegistered, ReviewTimeout.expiresAt, updatedAtStart answers { "flow": {...}, "state": "..." }; state is null when the resumed flow is already past the Meta step. Resuming a flow that waits for Meta gives a new state and makes the previous one invalid.
state (string, required)state of the last start. It can be used once.wabaId (string, required)phoneNumber (string, required)displayName (string, required)businessPortfolioId (string, optional)The answer is the flow, now MetaCompleted. Sending the same result again after it was accepted returns the current flow.
enabled, metaAppId, metaConfigId and metaPartnerSolutionId: the public IDs of Meta’s dialog; they are null when the signup is not available. No secret is returned.
Start, meta-callback and cancel answer 409 with { "code": "...", "message": "..." }. Codes: SignupDisabled, SubaccountMissing, SignupBusy (another start runs; try again), FlowChanged (the flow changed meanwhile; read it again), FlowNotFound, FlowNotAwaitingMeta, InvalidState, StateAlreadyUsed, FlowExpired, InvalidSender, InvalidDisplayName, InvalidWaba, InvalidBusinessPortfolio, SenderAlreadyRegistered, SenderSignupInProgress (another signup claims the number), SharedSenderRolloutPending and WabaMismatch (the Twilio account already uses another WhatsApp Business Account). On meta-callback an unknown flow also answers 409 FlowNotFound; reading or cancelling an unknown flow answers 404.
POST /api/whatsapp-signup/start
Authorization: Bearer <token>
200 OK
{
"flow": {
"flowId": 87,
"status": "AwaitingMeta",
"senderAddress": null,
"wabaId": null,
"channelId": null,
"lastErrorCode": null,
"lastError": null,
"expiresAt": "2026-12-01T11:05:00+00:00",
"updatedAt": "2026-12-01T10:05:00+00:00",
"displayName": null
},
"state": "eyJmIjo4Nywi..."
} POST /api/whatsapp-signup/87/meta-callback
Authorization: Bearer <token>
Content-Type: application/json
{
"state": "eyJmIjo4Nywi...",
"wabaId": "102030405060708",
"phoneNumber": "+32 470 00 00 33",
"displayName": "Example Support",
"businessPortfolioId": "908070605040302"
}
200 OK
{
"flowId": 87,
"status": "MetaCompleted",
"senderAddress": "+32470000033",
"wabaId": "102030405060708",
"displayName": "Example Support",
...
} GET /api/whatsapp-signup/87
Authorization: Bearer <token>
200 OK
{
"flowId": 87,
"status": "Active",
"senderAddress": "+32470000033",
"wabaId": "102030405060708",
"channelId": 61,
"lastErrorCode": null,
"lastError": null,
"expiresAt": "2026-12-01T11:05:00+00:00",
"updatedAt": "2026-12-01T13:40:12+00:00",
"displayName": "Example Support"
} 409 Conflict
{
"code": "SenderAlreadyRegistered",
"message": "..."
} AnswerPal sets these URLs on the number at Twilio itself, when a WhatsApp number is connected or an SMS channel is set up, and adds a token per channel to the URL for incoming messages. Every callback must carry a valid Twilio signature, made with the auth token of the Twilio account the number belongs to. The body is form-encoded (anything else gives 400) and at most 128 KB (413 above that); at most 600 callbacks per minute come in per source address (429 above that). AnswerPal stores the callback first and processes it right after, so the answer comes quickly.
AccountSid, MessageSid (or SmsSid), From, To, Body, ProfileName, WaId, NumMedia, MediaUrl0… and MediaContentType0…To (whatsapp:+number on the WhatsApp route, +number on the SMS route) and the channel type of the route. Otherwise the answer is 403 and no ticket is made.Open, subject WhatsApp or SMS with the sender’s name or number); a closed ticket is not reopened. The sender becomes or updates an end user. Then topic detection and the automatic replies of the channel run as for any message.STOP, STOPALL, UNSUBSCRIBE, CANCEL, END, QUIT, REVOKE or OPTOUT records that the number no longer wants SMS; START, YES or UNSTOP records that it does again. Case and punctuation around the word do not matter. The message still appears on the ticket, and AnswerPal sends no reply of its own. On WhatsApp these words are ordinary text.<Response></Response>, application/xml): Twilio sends nothing back. A repeated delivery of the same message also gets 200 and is processed once.AccountSid, MessageSid (or SmsSid), MessageStatus (or SmsStatus) and ErrorCode.accepted, queued, sending, sent, delivered, read, or failed and undelivered, which mark the message as failed with Twilio’s error code. An update never moves a message back. When Twilio reports that the recipient unsubscribed, the opt-out is recorded.POST /api/webhooks/twilio/sms/inbound?<channel token>
Content-Type: application/x-www-form-urlencoded
AccountSid=AC00000000000000000000000000000001
&MessageSid=SM00000000000000000000000000000002
&From=%2B32470000044
&To=%2B3290000055
&Body=Can+I+move+my+appointment+to+Friday%3F
&NumMedia=0
200 OK
Content-Type: application/xml
<?xml version="1.0" encoding="UTF-8"?><Response></Response> POST /api/webhooks/twilio/whatsapp/status?<token>
Content-Type: application/x-www-form-urlencoded
AccountSid=AC00000000000000000000000000000001
&MessageSid=SM00000000000000000000000000000003
&MessageStatus=undelivered
&ErrorCode=63016
204 No Content The signup endpoints need a bearer token with the role Configurator or Administrator. The four callbacks take no bearer token; the Twilio signature protects them, and only Twilio can make it. The access line of each endpoint above is the reference.
200 OK, 204 No Content400 Bad Request401 Unauthorized, 403 Forbidden404 Not Found409 Conflictcode and message, see above.413 Payload Too Large, 429 Too Many Requests500 Internal Server ErrorNo. AnswerPal sets them on the number when it connects a WhatsApp number or sets up an SMS channel. The callbacks only work with Twilio's signature, so they cannot be called by hand.
Yes, when both channels belong to the same account. A number that is already a WhatsApp sender of another channel cannot be connected again.
The number is recorded as opted out of SMS and the message still appears on the ticket. A later START opts it in again. AnswerPal itself sends no reply to these words.
The number, the Twilio account and the channel type must match exactly one active channel. Check that the channel is active and its connection is ready on the Channels page.
AnswerPal: AI-powered customer service solutions to elevate your support and communication effortlessly.
For all support, sales, and partnership inquiries, email us at info@answerpal.eu
AnswerPal
Bisschoppenhoflaan 380
2100 Antwerp
Belgium
+32.36416685
BE 0862.692.858