Skip to main content
Sends a freeform (free-text) WhatsApp message to a recipient. Unlike template messages, freeform messages can contain any text but require an active 24-hour messaging window — meaning the recipient must have sent a message to your WhatsApp number within the last 24 hours.
Freeform messages can only be sent during an active 24-hour messaging window. If the session has expired, send a template message first to re-initiate the conversation.
This endpoint is rate-limited to 5 requests per second per user.

Endpoint

POST /user/whatsapp/send-freeform

Request

sender_id
integer
required
ID of the WhatsApp sender to send from. Use the Get senders endpoint to retrieve available senders.
recipient_phone
string
required
Recipient’s phone number in international format (e.g., +1234567890).
message
string
required
Message content to send. Maximum 4096 characters.

Response

success
boolean
Whether the message was sent successfully.
conversation_id
integer
ID of the conversation.
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.
session_status
object
Updated session status after sending.

Example

curl -X POST "https://portal.intellixent.ai/api/user/whatsapp/send-freeform" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "sender_id": 12,
    "recipient_phone": "+1234567890",
    "message": "Thank you for your inquiry! Our team will get back to you within 2 hours."
  }'
200 Success
{
  "success": true,
  "conversation_id": 1234,
  "message_id": 567,
  "whatsapp_message_id": 890,
  "message_sid": "SMxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  "session_status": {
    "is_open": true,
    "can_send_freeform": true,
    "requires_template": false,
    "message": "Session open (23 hr 45 min remaining). Unlimited free-form messages allowed.",
    "minutes_remaining": 1425,
    "expires_at": "2026-02-25T10:30:00+00:00"
  }
}
403 Session expired
{
  "success": false,
  "error": "The 24-hour messaging window is closed. Customer must reply first, or use a template message.",
  "error_code": "SESSION_EXPIRED",
  "session_status": {
    "is_open": false,
    "can_send_freeform": false,
    "requires_template": true,
    "message": "Session expired. Send a template or wait for customer to reply."
  }
}
503 Sender offline
{
  "success": false,
  "error": "Sender is not online. Current status: Offline",
  "error_code": "SENDER_OFFLINE"
}

24-hour messaging window

  1. When a customer sends a message to your WhatsApp number, a 24-hour window opens.
  2. During this window, you can send freeform messages freely.
  3. After the window expires, use a template message to re-initiate the conversation.
  4. Each new customer message resets the 24-hour timer.