Send WhatsApp OTP Code

For businesses running their own OTP engine — your own generation, storage, expiry and verification — who only need Sendexa to solve WhatsApp's delivery problem.

You keep the code

Sendexa never generates, stores, hashes or checks the code — it's yours end to end. This endpoint only delivers it.

Delivers outside the window

A plain WhatsApp text is classified MARKETING and silently dropped once the 24-hour conversation window is closed. This wraps your code in an approved AUTHENTICATION template so it goes through regardless.

Your WABA, or ours

Uses your connected WhatsApp Business Account and approved AUTHENTICATION template if you have one, falling back to Sendexa's platform number otherwise.

POST
/v1/whatsapp/send-otp

Request Body

application/json
JSON
{
"to": "233240000000",
"code": "482913"
}

Response

JSON
{
"success": true,
"message": "Code delivered via WhatsApp",
"data": {
"messageId": "exa_wa_123456789_abc123def"
}
}

Implementation Examples

Bash
curl -X POST 'https://api.sendexa.co/v1/whatsapp/send-otp' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic YOUR_API_TOKEN' \
-d '{
"to": "233240000000",
"code": "482913"
}'