Partner Connect (white-label)

For Sendexa partners: embed WhatsApp's "Continue with Facebook" signup on your own platform so your customers connect a WhatsApp Business Account without ever seeing Sendexa.

No Sendexa login for your customers

Your customer never sees Sendexa — they click your button, sign in with Facebook, pick a WhatsApp Business Account, and you're done.

Billed to your partner account

Every customer you connect becomes a sub-account under your Sendexa Partner account, billed on your consolidated wallet — same as any other sub-account.

You identify your own customers

Pass your own customer/user ID as externalRef. Sendexa creates a hidden sub-account the first time it sees that ID, and reuses it on every later call.

How it works

  1. Your backend calls POST /v1/partner/whatsapp/connect-sessions with your own customer ID.
  2. You get back a connectUrl, good for 10 minutes and one use.
  3. Show that URL to your customer — in an iframe, or open it as a popup.
  4. They click "Continue with Facebook" and pick or create a WhatsApp Business Account.
  5. The page posts a message back to your site when it's done, and the WhatsApp number is connected.
POST
/v1/partner/whatsapp/connect-sessions

Request Body

application/json
JSON
{
"externalRef": "your-customer-id"
}

Response

JSON
{
"success": true,
"data": {
"connectUrl": "https://cdn.sendexa.co/whatsapp-connect?token=wa_connect_…",
"expiresAt": "2026-01-01T10:10:00.000Z"
}
}

Implementation Examples

Bash
curl -X POST 'https://api.sendexa.co/v1/partner/whatsapp/connect-sessions' \
-H 'Authorization: Basic YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"externalRef": "your-customer-id"
}'

Embedding the connect URL

The connectUrl is a normal page — drop it in an iframe, or open it as a popup window. Either way, listen for its completion message:

HTML
<iframe
src="{connectUrl from the response above}"
width="360"
height="420"
style="border: none;"
></iframe>
<script>
window.addEventListener("message", (event) => {
if (event.data?.type !== "sendexa-wa-connect") return;
switch (event.data.status) {
case "success":
// the customer's WhatsApp number is now connected
break;
case "cancelled":
// they backed out of the Facebook flow
break;
case "error":
console.error(event.data.message);
break;
}
});
</script>