Skip to main content

WhatsApp Direct Send

Direct Send lets you send utility and authentication messages as plain text outside the 24-hour customer service window. You do not need a pre-approved template.

Use the existing Send Message endpoint. Add the optional content.category field to a standard text message request.

CategoryAvailabilityUse for
utilityGenerally available to eligible WABAsOrder, appointment and account updates
authenticationAlpha at Meta. Enrolled WABAs onlyOne-time passcodes and verification codes

A bulk request can mix valid and invalid messages. Exotel accepts the valid ones and returns an error per invalid item (HTTP 207). Delivery callbacks include template_category set to utility or authentication.


Prerequisites​

  • Cloud API number only. Direct Send does not support on-prem WhatsApp numbers.
  • WABA eligibility. Meta controls eligibility per business portfolio or WABA. Check WhatsApp Manager for a banner that shows whether your account is eligible.
    • Utility: Generally available to business portfolios with a messaging limit of 100,000 or unlimited. If your account is not eligible, express interest with Meta.
    • Authentication: Only accounts Meta has enrolled can use it. Express interest with Meta to be considered.
  • Exotel credentials. Get your API key, API token, and Account SID from the Exotel Dashboard.

Send a utility message​

The examples use the Singapore base URL. Use the base URL for your region (see Endpoint).

curl -sS -u "<API_KEY>:<API_TOKEN>" \
-X POST "https://api.exotel.com/v2/accounts/<ACCOUNT_SID>/messages" \
-H "Content-Type: application/json" \
-d '{
"whatsapp": {
"messages": [
{
"from": "+91XXXXXXXXXX",
"to": "+91YYYYYYYYYY",
"status_callback": "https://your-domain.com/whatsapp/webhook",
"custom_data": "order-4821-shipped",
"content": {
"recipient_type": "individual",
"type": "text",
"category": "utility",
"text": { "body": "Your order 4821 has shipped. Reference 4821." }
}
}
]
}
}'

Exotel returns HTTP 202 and a sid. A 202 means Exotel queued the message — not that it was delivered. Delivery status arrives at your status_callback URL.

{
"request_id": "b434e927a5844175b23059cd96feea3d",
"method": "POST",
"http_code": 202,
"metadata": { "total": 1, "success": 1, "failed": 0 },
"response": {
"whatsapp": {
"messages": [
{
"code": 202,
"error_data": null,
"status": "success",
"data": { "sid": "2FdiiEQUosckPhpZfuVwfjxiSlc16a4" }
}
]
}
}
}

Send an authentication message​

warning

Authentication is in alpha at Meta. Confirm that Meta enrolled your WABA before you send. Otherwise Meta treats it as a session text, which fails with error 30018 if the recipient has not messaged you in the last 24 hours.

Use the same request as utility, with two changes:

  • Set content.category to authentication.
  • Set to to the recipient phone number in E.164 format — not a WhatsApp user ID.
caution

Do not put the passcode in custom_data. Exotel returns custom_data in every callback and GET response.

curl -sS -u "<API_KEY>:<API_TOKEN>" \
-X POST "https://api.exotel.com/v2/accounts/<ACCOUNT_SID>/messages" \
-H "Content-Type: application/json" \
-d '{
"whatsapp": {
"messages": [
{
"from": "+91XXXXXXXXXX",
"to": "+91YYYYYYYYYY",
"status_callback": "https://your-domain.com/whatsapp/webhook",
"custom_data": "login-req-1234",
"content": {
"recipient_type": "individual",
"type": "text",
"category": "authentication",
"text": { "body": "482913 is your verification code. Do not share it with anyone." }
}
}
]
}
}'

Send multiple messages in one request​

Add each message as an item in whatsapp.messages. Exotel returns HTTP 207 Multi-Status. Each valid item gets a sid; each invalid item gets its own error code. You can send up to 100 messages per request, the same limit as Bulk Messages.

curl -sS -u "<API_KEY>:<API_TOKEN>" \
-X POST "https://api.exotel.com/v2/accounts/<ACCOUNT_SID>/messages" \
-H "Content-Type: application/json" \
-d '{
"whatsapp": {
"messages": [
{
"from": "+91XXXXXXXXXX",
"to": "+91YYYYYYYYYY",
"status_callback": "https://your-domain.com/whatsapp/webhook",
"custom_data": "bulk-valid",
"content": {
"recipient_type": "individual",
"type": "text",
"category": "utility",
"text": { "body": "Your appointment moved to 3 PM." }
}
},
{
"from": "+91XXXXXXXXXX",
"to": "+91YYYYYYYYYY",
"status_callback": "https://your-domain.com/whatsapp/webhook",
"content": {
"recipient_type": "individual",
"type": "text",
"category": "marketing",
"text": { "body": "Big sale today!" }
}
}
]
}
}'

In this example, item 1 gets a sid. Item 2 returns error code 1002 because marketing is not a supported category.


Check message status​

curl -sS -u "<API_KEY>:<API_TOKEN>" \
"https://api.exotel.com/v2/accounts/<ACCOUNT_SID>/messages/<MESSAGE_SID>" \
| jq '.response | {sid, custom_data, status}'

Reference​

Endpoint​

All requests use HTTP Basic Auth (api_key:api_token) over HTTPS.

POST /v2/accounts/{account_sid}/messages
RegionBase URL
Singapore (SGP)https://api.exotel.com
Mumbai (MUM)https://api.in.exotel.com

Top-level message object​

ParameterTypeRequiredDescription
fromStringYesYour WhatsApp Cloud API number in E.164 format
toStringYesRecipient phone number in E.164 format
contentObjectYesMessage content object — see below
status_callbackStringNoURL that receives delivery status updates
custom_dataStringNoYour own metadata; returned in callbacks and GET responses

Content object​

ParameterTypeRequiredDescription
recipient_typeStringYesMust be "individual"
typeStringYesMust be "text" for Direct Send. Media types are not supported.
categoryStringNo"utility" or "authentication" (not case-sensitive). Omit for a standard session message.
text.bodyStringYesMessage text. 1–1,024 Unicode code points.
text.preview_urlBooleanNoMust not be true for Direct Send. Use false or omit.
caution

Do not put offers or discounts in a utility message. Meta can limit or block Direct Send for your WABA. Send promotions on approved marketing templates.

Messages without category​

A request without content.category sends a standard WhatsApp session message. A session text needs an open 24-hour customer window and reports template_category: "service". Approved type: "template" messages work as before.

Delivery callback​

Exotel posts to status_callback for each status change. The payload includes template_category and returns custom_data as sent.

{
"whatsapp": {
"messages": [
{
"callback_type": "dlr",
"sid": "2FdiiEQUosckPhpZfuVwfjxiSlc16a4",
"from": "+919876500001",
"to": "+919876543210",
"exo_status_code": 30002,
"exo_detailed_status": "EX_MESSAGE_DELIVERED",
"description": "Message delivered",
"timestamp": "2026-10-26T13:05:11.000+05:30",
"custom_data": "order-4821",
"template_category": "utility"
}
]
}
}

Limits and rules​

  • Body limit is 1–1,024 Unicode code points, not bytes. Most characters count as one, but a character written with a combining mark counts as more than one — नमस्ते is 6 — and so do emoji built from several code points, such as 👨‍👩‍👧 (5) and 🇮🇳 (2).
  • Direct Send supports text messages only. Media types are not supported.
  • Direct Send has no separate fee. Exotel charges each message at your current utility or authentication rate matching the category.
  • Do not add content.category to type: "template" messages. Any non-blank category triggers the Direct Send path, and Exotel rejects a template with a category (error 1002). Templates carry their own category from WhatsApp Manager.
  • Do not delete templates named auto_generated_… from your template list. Meta creates these from your Direct Send messages. This is expected behaviour.

Error reference​

Rejected immediately (HTTP 400, 500 or 207)​

Exotel does not queue the message and does not issue a sid. In bulk requests, Exotel returns HTTP 207 with an error for each failing item. A request with more than 100 messages is rejected as a whole with HTTP 400.

CodeError messageCause and resolution
1002content.category must be utility or authenticationCategory value not supported (e.g. "marketing"). Use "utility" or "authentication".
1002Direct Send requires content.type=textcontent.category is set but type is not "text" (e.g. image, template). Set type: "text", or remove content.category to send a template.
1002Direct Send does not support preview_url=truetext.preview_url is true. Remove it or set it to false.
1002Direct Send requires cloud WhatsApp numberfrom is an on-prem number. Use a WhatsApp Cloud API number.
1002authentication Direct Send requires phone toAuthentication message addressed by WhatsApp user ID. Set to to the recipient phone number.
1012Direct Send body must be 1-1024 characterstext.body is empty or longer than 1,024 code points.
1012Direct Send body is requiredtext.body is missing.
1012Not more than 100 whatsapp messages are allowed in requestMore than 100 items in whatsapp.messages. Exotel rejects the whole request with HTTP 400. Split it into batches of 100 or fewer.
1004Could not verify the WhatsApp number for Direct Send, please retryHTTP 500. Temporary error in Exotel while checking the from number. Retry the failed item only. In a bulk request the other items may already be queued, so resending the whole request sends them twice.

Always read the per-item code and error_data. When every item fails, the HTTP status is taken from the first failed item only.

Reported on the callback​

Exotel accepts these messages (HTTP 202 with a sid). The failure arrives at your status_callback URL.

CodeDetailed statusDescriptionCause and resolution
30006EX_SETUP_ERROR"The 'category' value requires Direct Send, which isn't enabled for this account."Meta has not enabled Direct Send for your WABA. Use an approved template, or request enablement from Meta.
30018EX_REENGAGEMENT_ERROR"More than 24 hours passed"For category: "authentication": your WABA is not enrolled in Meta's authentication Direct Send alpha, so Meta ignores the category and treats the message as a normal session text. Session texts need an open 24-hour window, so the message fails with 30018 if the recipient hasn't messaged you in the last 24 hours. If the window is open, it is delivered as a session message. Ask Meta to enroll the WABA in the alpha, or send an approved authentication template.
30022EX_TEMPLATE_ERRORGenerated template paused by MetaMeta paused the auto-generated template due to quality or policy signals. Check WABA health and message content, then retry.
30008EX_RATE_LIMIT_HIT"Spam Rate of number breached"Meta rate-limited the number for spam (Meta error 131048). Remove offers from utility text. Send promotions on approved marketing templates.

Troubleshooting​

SymptomCauseFix
Exotel returns 202 but message does not arriveA 202 means Exotel queued the message; a failure can still arrive on the callback.Read the callback for the sid. Use the error code tables above.
Authentication message fails with 30018WABA is not in the Meta authentication alpha, and no 24-hour window is open.Ask Meta to enroll your WABA, or send an approved authentication template.
Utility messages fail with 30008 or 30022Meta flagged the content or traffic as marketing, or paused the generated template.Remove offers from utility messages. Send promotions on approved marketing templates.
A template message fails with 1002The request includes content.category.Remove content.category from template messages.
Exotel returns HTTP 500Temporary error in Exotel.Retry the failed item only. In a bulk request the other items may already be queued, so resending the whole request sends them twice.