> ## Documentation Index
> Fetch the complete documentation index at: https://docs.intellixent.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Send freeform

> Send a free-text WhatsApp message within an active 24-hour session.

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.

<Warning>
  Freeform messages can only be sent during an active 24-hour messaging window. If the session has expired, send a [template message](/api-reference/whatsapp/send-template) first to re-initiate the conversation.
</Warning>

<Note>
  This endpoint is rate-limited to **5 requests per second** per user.
</Note>

## Endpoint

`POST /user/whatsapp/send-freeform`

## Request

<ParamField body="sender_id" type="integer" required>
  ID of the WhatsApp sender to send from. Use the [Get senders](/api-reference/whatsapp/get-senders) endpoint to retrieve available senders.
</ParamField>

<ParamField body="recipient_phone" type="string" required>
  Recipient's phone number in international format (e.g., `+1234567890`).
</ParamField>

<ParamField body="message" type="string" required>
  Message content to send. Maximum 4096 characters.
</ParamField>

## Response

<ResponseField name="success" type="boolean">Whether the message was sent successfully.</ResponseField>
<ResponseField name="conversation_id" type="integer">ID of the conversation.</ResponseField>
<ResponseField name="message_id" type="integer">ID of the conversation message record.</ResponseField>
<ResponseField name="whatsapp_message_id" type="integer">ID of the WhatsApp message record.</ResponseField>
<ResponseField name="message_sid" type="string">Twilio message SID for delivery tracking.</ResponseField>

<ResponseField name="session_status" type="object">
  Updated session status after sending.

  <Expandable title="Session status properties">
    <ResponseField name="is_open" type="boolean">Whether the 24-hour window is open.</ResponseField>
    <ResponseField name="can_send_freeform" type="boolean">Whether freeform messages can be sent now.</ResponseField>
    <ResponseField name="requires_template" type="boolean">Whether a template message is required.</ResponseField>
    <ResponseField name="message" type="string">Human-readable description of the session state.</ResponseField>
    <ResponseField name="minutes_remaining" type="integer">Minutes remaining in the 24-hour window.</ResponseField>
    <ResponseField name="expires_at" type="string">ISO 8601 timestamp when the session expires.</ResponseField>
  </Expandable>
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  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."
    }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://portal.intellixent.ai/api/user/whatsapp/send-freeform', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      sender_id: 12,
      recipient_phone: '+1234567890',
      message: 'Thank you for your inquiry! Our team will get back to you within 2 hours.'
    })
  });

  const data = await response.json();
  console.log(data.session_status.minutes_remaining);
  ```
</CodeGroup>

```json 200 Success theme={null}
{
  "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"
  }
}
```

```json 403 Session expired theme={null}
{
  "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."
  }
}
```

```json 503 Sender offline theme={null}
{
  "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](/api-reference/whatsapp/send-template) to re-initiate the conversation.
4. Each new customer message resets the 24-hour timer.
