> For the complete documentation index, see [llms.txt](https://docs.360dialog.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.360dialog.com/docs/messaging/message-types/text.md).

# Text

This page describes text messages on the WhatsApp Business Platform.

Text messages contain only a text body and an optional link preview.

![](https://3527970750-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4sMxKjL6eJRvZn6jeG-887967055%2Fuploads%2F9ydHP5rwfN0H9lOtR400%2Ftext.png?alt=media\&token=03d4ca42-c302-4d97-be53-ffcd147d3dcb)

### Text Message Request

Use the messages endpoint to send a text message to a WhatsApp user.

<mark style="color:orange;">`POST`</mark> `https://waba-v2.360dialog.io/messages`

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `D360-API-KEY`     |

**Body Example**

```json
{
  "messaging_product": "whatsapp",
  "recipient_type": "individual",
  "to": "<WHATSAPP_USER_PHONE_NUMBER>",
  "type": "text",
  "text": {
    "preview_url": <ENABLE_LINK_PREVIEW>,
    "body": "<BODY_TEXT>"
  }
}
```

**Response**

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

```json
{
  "contacts": [
    {
      "input": "text",
      "wa_id": "text"
    }
  ],
  "messages": [
    {
      "id": "text",
      "message_status": "accepted"
    }
  ],
  "messaging_product": "text"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "error": "Invalid request"
}
```

{% endtab %}
{% endtabs %}

### Link preview

The WhatsApp client can attempt to generate a preview for the first URL in the message body, provided it begins with `http://` or `https://`. If multiple URLs are included, only the first will be rendered as a preview. If omitted or if a preview cannot be retrieved, the URL will be displayed as a clickable link instead.

### Formatting in Text Messages <a href="#formatting" id="formatting"></a>

WhatsApp allows some formatting in messages. To format all or part of a message, use these formatting symbols:

| Formatting         | Symbol                   | Example                          |
| ------------------ | ------------------------ | -------------------------------- |
| **Bold**           | Asterisk (\*)            | Your total is \*$10.50\*.        |
| *Italics*          | Underscore (\_)          | Welcome to \_WhatsApp\_!         |
| ~~Strike-through~~ | Tilde (\~)               | This is \~better\~ best!         |
| `Code`             | Three backticks (\`\`\`) | \`\`\`print 'Hello World';\`\`\` |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.360dialog.com/docs/messaging/message-types/text.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
