Skip to main content
Sends a WhatsApp message using an approved template. Template messages are required when initiating a new conversation or messaging outside the 24-hour session window.
This endpoint is rate-limited to 5 requests per second per user.

Endpoint

POST /user/whatsapp/send

Request

sender_id
integer
required
ID of the WhatsApp sender to send from. Use the Get senders endpoint to retrieve available senders.
template_id
integer
required
ID of the approved message template to use.
recipient_phone
string
required
Recipient’s phone number in international format (e.g., +1234567890).
recipient_name
string
Recipient’s name for conversation tracking. Maximum 255 characters.
variables
object
Key-value pairs for template variables. Keys should match the variable names in your template.
"variables": {
  "1": "John",
  "2": "January 15, 2026",
  "3": "2:00 PM"
}

Response

success
boolean
Whether the message was sent successfully.
conversation_id
integer
ID of the conversation (new or existing).
message_id
integer
ID of the conversation message record.
whatsapp_message_id
integer
ID of the WhatsApp message record.
message_sid
string
Twilio message SID for delivery tracking.
status
string
Initial delivery status (e.g., queued, sent).

Example

curl -X POST "https://portal.intellixent.ai/api/user/whatsapp/send" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sender_id": 12,
    "template_id": 45,
    "recipient_phone": "+1234567890",
    "recipient_name": "John Doe",
    "variables": {
      "1": "John",
      "2": "January 15, 2026",
      "3": "2:00 PM"
    }
  }'
200 Success
{
  "success": true,
  "conversation_id": 1234,
  "message_id": 567,
  "whatsapp_message_id": 890,
  "message_sid": "SMxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "status": "queued"
}
404 Sender not found
{
  "success": false,
  "error": "Sender not found or does not belong to you",
  "error_code": "SENDER_NOT_FOUND"
}
422 Template not approved
{
  "success": false,
  "error": "Template is not approved. Current status: pending",
  "error_code": "TEMPLATE_NOT_APPROVED"
}
402 Insufficient balance
{
  "success": false,
  "error": "Insufficient balance. Please top up your account.",
  "error_code": "INSUFFICIENT_BALANCE"
}
After a template message is sent successfully, a 24-hour messaging window opens. During this window you can send freeform messages without needing a template.