> For the complete documentation index, see [llms.txt](https://docs.channel360.co.za/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.channel360.co.za/api-usage/reply-to-a-customer/send-a-text-reply.md).

# Send a text reply

Reply to a customer with a plain text message.

Send a text message to a customer who has written to you in the last 24 hours.

## Before you start

* The customer's app user ID (`<APP_USER_ID>`), from the `message:appUser` webhook event. See [Reply to a customer](/api-usage/reply-to-a-customer.md).

## Send the reply

`POST` `/org/<ORG_ID>/whatsapp/appuser/<APP_USER_ID>/reply`

| Field  | Required | What to put                          |
| ------ | -------- | ------------------------------------ |
| `text` | Yes      | The text of the message.             |
| `type` | No       | Leave it out, or set it to `"text"`. |

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X POST "https://channel360.co.za/v1.1/org/<ORG_ID>/whatsapp/appuser/<APP_USER_ID>/reply" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello World"
  }'
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const response = await fetch(
  "https://channel360.co.za/v1.1/org/<ORG_ID>/whatsapp/appuser/<APP_USER_ID>/reply",
  {
    method: "POST",
    headers: {
      Authorization: "Bearer <API_KEY>",
      "Content-Type": "application/json"
    },
    body: JSON.stringify({ text: "Hello World" })
  }
);

console.log(await response.json());
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

response = requests.post(
    "https://channel360.co.za/v1.1/org/<ORG_ID>/whatsapp/appuser/<APP_USER_ID>/reply",
    headers={
        "Authorization": "Bearer <API_KEY>",
        "Content-Type": "application/json",
    },
    json={"text": "Hello World"},
)

print(response.json())
```

{% endtab %}
{% endtabs %}

## Check it worked

The API returns `201` with the message that was sent:

```json
{ "messages": [ { "type": "text", "text": "Hello World" } ] }
```

The real response includes more fields on the message, such as its `_id`.

If it fails, see the error table on [Reply to a customer](/api-usage/reply-to-a-customer.md#what-can-go-wrong).

## Next

{% content-ref url="/pages/jz4KOq3pj3oHSszPwn3O" %}
[Send a media reply](/api-usage/reply-to-a-customer/send-a-media-reply.md)
{% endcontent-ref %}
