# Send Session Message

To send a session message directly triggered from backend can be sent using the following API

```
curl --location --request POST 'https://gateway.konverse.ai/ironman/api/v1/whatsapp/sessionMessage/text' \
--header 'x-app-id: <your app id>' \
--header 'x-api-key: <your app key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "to": "91XXXXXXXX",
    "message": {
        "text": "<message>"
    }
}'
```

To send a file/attachment in a session directly triggered from backend can be sent using the following API

```
curl --location --request POST 'https://gateway.konverse.ai/ironman/api/v1/whatsapp/sessionMessage/attachment' \
--header 'x-app-id: <your app id>' \
--header 'x-api-key: <your app key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "to": "91XXXXXXXX",
    "attachment": {
        "url": "<https://link-url-file>",
        "mime": "<mimetypes>",
        "filename": "<name of your file>",
        "caption": "Caption for your file>"
      }
}'
```

#### Supported Mime-Types <a href="#supported-files" id="supported-files"></a>

| Media      | Supported Content-Types                                                                                                                                                                                                                       |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `audio`    | <p><code>audio/aac</code>, <code>audio/mp4</code>, <code>audio/amr</code>, <code>audio/mpeg</code>,<br><code>audio/ogg; codecs=opus</code></p><p><br></p><p><strong>Note:</strong> The base <code>audio/ogg</code> type is not supported.</p> |
| `document` | Any valid MIME-type.                                                                                                                                                                                                                          |
| `image`    | `image/jpeg`, `image/png`                                                                                                                                                                                                                     |
| `sticker`  | `image/webp`                                                                                                                                                                                                                                  |
| `video`    | <p><code>video/mp4</code>, <code>video/3gpp</code></p><p><br></p><p><strong>Notes:</strong></p><ul><li>Only H.264 video codec and AAC audio codec is supported.</li><li>Only videos with a single audio stream are supported.</li></ul>       |


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developer.konverse.ai/messaging-channels/whatsapp/sending-whatsapp-session-message.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
