> For the complete documentation index, see [llms.txt](https://help.reekolect.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.reekolect.ai/api-references/whatsapp-cloud-api/post-send-message-api.md). Agents can also search and read this documentation through its [MCP server](https://help.reekolect.ai/~gitbook/mcp).

# POST Send Message API

Use this API to send a WhatsApp message.

#### API Endpoint

{% code overflow="wrap" %}

```
<https://api.v7.express-chat.com/whatsapp-automation/wa/send-message?apiKey=*API KEY*>

```

{% endcode %}

#### Request Headers

| Header       | Value            |
| ------------ | ---------------- |
| apiKey       | \*API KEY\*      |
| Content-Type | application/json |

{% tabs %}
{% tab title="Plain Text Messages" %}
**Request Body**

```json
{
    "userName": "Test",
    "wa_id": "910987654321",
    "type": "text",
    "message": {
        "text": "hi"
    }
}

```

**Parameters**

| Parameter      | Type   | Description                                                                                                                        |
| -------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------- |
| userName       | string | The name of the user to whom the message is being sent.                                                                            |
| wa\_id         | string | The WhatsApp number of the user to whom the message is being sent. The number must contain the country code without the plus sign. |
| type           | string | The type of message being sent (e.g., text, image).                                                                                |
| message.text   | string | message that needs to sent                                                                                                         |
| message.label  | string | <p>The caption you want to send along with the image<br>(optional) Only if type is image</p>                                       |
| message.source | string | <p>The image link<br>(optional)<br>Only if type is image</p>                                                                       |

**Example**

{% code overflow="wrap" %}

```
curl --location 'https://api.v7.express-chat.com/whatsapp-automation/wa/send-message?apiKey=*API KEY*' \
--header 'apiKey: *API KEY*' \
--header 'Content-Type: application/json' \
--data '{
    "userName": "Test",
    "wa_id": "918859170007",
    "type": "text",
    "message": {
        "text": "hi"
    }
}'

```

{% endcode %}
{% endtab %}

{% tab title="Media Messages" %}
**Request Body**

```json
{
    "userName": "Test",
    "wa_id": "910987654321",
    "type": "image",
    "message": {
        "source": "https://imgv3.fotor.com/images/blog-cover-image/part-blurry-image.jpg",
        "label": "hey",
    }
}
```

**Parameters**

| Parameter      | Type   | Description                                                                                                                        |
| -------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------- |
| userName       | string | The name of the user to whom the message is being sent.                                                                            |
| wa\_id         | string | The WhatsApp number of the user to whom the message is being sent. The number must contain the country code without the plus sign. |
| type           | string | The type of message being sent (e.g., text, image, document).                                                                      |
| message.source | string | The URL of the media being sent.                                                                                                   |
| message.label  | string | The text to attach to the media.                                                                                                   |
| message.type   | string | The type of media being sent (e.g., image, document).                                                                              |

**Example**

{% code overflow="wrap" %}

```
curl --location '<https://api.v7.Reekolect.com/whatsapp-automation/wa/send-message?apiKey=*API KEY*>' \\\\
--header 'apiKey: *API KEY*' \\\\
--header 'Content-Type: application/json' \\\\
--data '{
    "userName": "Test",
    "wa_id": "910987654321",
    "type": "image",
    "message": {
        "source": "<https://imgv3.fotor.com/images/blog-cover-image/part-blurry-image.jpg>",
        "label": "hey",
        "type": "image"
    }
}'

```

{% endcode %}
{% endtab %}
{% endtabs %}

### Error Codes

Refer to the [official documentation](https://developers.facebook.com/docs/whatsapp/on-premises/errors) for more information on error codes.


---

# 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://help.reekolect.ai/api-references/whatsapp-cloud-api/post-send-message-api.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.
