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

# Send message

> Send a freeform WhatsApp message

### Body parameters

<ParamField body="agentId" type="string" required>
  Agent sending the message. Must be a UUID of a WHATSAPP-channel agent
</ParamField>

<ParamField body="toNumber" type="string" required>
  Destination number, E.164 — e.g. `+919876543210`
</ParamField>

<ParamField body="content" type="string" required>
  Message text
</ParamField>

<ParamField body="contentType" type="string" default="text">
  Content type of the message
</ParamField>

<ParamField body="campaignId" type="string">
  Campaign reference, for attributing the message to a campaign
</ParamField>

<ParamField body="campaignAttemptId" type="string">
  Campaign attempt reference
</ParamField>

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://api.agentic-os.com/api/v1/channels/whatsapp/messages \
    -H "Authorization: Bearer $AGENTIC_OS_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{ "agentId": "AGENT_ID", "toNumber": "+919876543210", "content": "Hello!" }'
  ```

  ```python Python theme={null}
  requests.post(
      "https://api.agentic-os.com/api/v1/channels/whatsapp/messages",
      headers={"Authorization": f"Bearer {API_KEY}"},
      json={"agentId": "AGENT_ID", "toNumber": "+919876543210", "content": "Hello!"},
  )
  ```
</CodeGroup>

### Response

```json theme={null}
{ "messageId": "wamid.HBg...", "status": "sent" }
```

<Callout type="info">
  Freeform messages are only deliverable within 24 hours of the user's last
  message. Outside that window, use
  [Send template](/docs/api-reference/whatsapp/send-template).
</Callout>
