---
title: "Send text"
description: "Send plain text messages and replies on WhatsApp."
---

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

# Send text

Use text for everyday replies and short updates while the customer can still receive free-form messages.

## At a glance

| Item | Detail |
| --- | --- |
| `type` | `text` |
| Channel support | Official and unofficial ([matrix](/api/channel-support)) |
| Body field | Prefer `content.body`; `content.text` (string or `{ "body": "..." }`) is accepted for compatibility |
| URL preview | Set preview behavior in `content` when the body includes a URL (provider-dependent) |
| Reply | Optional `content.reply_to.id` and `content.reply_to.participant` |

:::info
Outside the 24-hour customer service window on official channels, use an approved [template message](/getting-started/send-template) for business-initiated outreach.
:::

## Request body

| Field | Required | Description |
| --- | --- | --- |
| `channel_id` | Yes | Sender channel ID |
| `to` | Yes | Recipient in international format (e.g. `6281234567890`) |
| `type` | Yes | `text` |
| `content.body` or `content.text` | Yes | Message text |

## Example

### cURL

```bash
curl -X POST "https://api.wazapin.com/v1/messages" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
"channel_id": "wzp_abc123",
"to": "6281234567890",
"type": "text",
"content": {
  "body": "Hello! Your order has been shipped."
}
  }'
```
### TypeScript

```typescript
import { WazapinClient, textMessage } from "@wazapin/sdk";

const wazapin = new WazapinClient({ apiKey: process.env.WAZAPIN_API_KEY! });

await wazapin.messages.send(
  textMessage({
channel_id: "wzp_abc123",
to: "6281234567890",
body: "Hello! Your order has been shipped.",
  }),
);
```
### Python

```python
import requests

requests.post(
"https://api.wazapin.com/v1/messages",
headers={"X-Api-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
json={
    "channel_id": "wzp_abc123",
    "to": "6281234567890",
    "type": "text",
    "content": {"body": "Hello! Your order has been shipped."},
},
timeout=30,
).raise_for_status()
```

### Quoted reply

### cURL

```bash
curl -X POST "https://api.wazapin.com/v1/messages" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
"channel_id": "wzp_abc123",
"to": "6281234567890",
"type": "text",
"content": {
  "body": "Thanks, we received your question.",
  "reply_to": {
    "id": "wamid.HBgL..."
  }
}
  }'
```
### TypeScript

```typescript
await wazapin.messages.send(
  textMessage({
channel_id: "wzp_abc123",
to: "6281234567890",
body: "Thanks, we received your question.",
reply_to: { id: "wamid.HBgL..." },
  }),
);
```
### Python

```python
import requests

requests.post(
"https://api.wazapin.com/v1/messages",
headers={"X-Api-Key": "YOUR_API_KEY", "Content-Type": "application/json"},
json={
    "channel_id": "wzp_abc123",
    "to": "6281234567890",
    "type": "text",
    "content": {
        "body": "Thanks, we received your question.",
        "reply_to": {"id": "wamid.HBgL..."},
    },
},
timeout=30,
).raise_for_status()
```

:::info
When the user replies, see [Handle inbound text](/guides/handle-inbound-text) or [Handle interactive replies](/guides/handle-interactive-replies).
:::

Source: https://docs.wazapin.id/getting-started/send-text/index.mdx
