> For the complete documentation index, see [llms.txt](https://docs.oneroute.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.oneroute.io/whatsapp-api/endpoints/send-session-message.md).

# Send Session Message

## Send WhatsApp Session Message

<mark style="color:green;">`POST`</mark> `https://api.oneroute.io/api/public/conversation/text`

This API only works when you have received a Whatsapp message from the customer in the last 24 hours.

#### Headers

| Name   | Type   | Description                 |
| ------ | ------ | --------------------------- |
| apiKey | string | API Key for authentication. |

#### Request Body

| Name    | Type   | Description                                                                       |
| ------- | ------ | --------------------------------------------------------------------------------- |
| from    | string | Whatsapp number you are sending from. Must be connected to a channel on OneRoute. |
| to      | string | Whatsapp number to send the message to. Must be a valid Whatsapp number.          |
| message | string | The message to send to the customer.                                              |

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

```
{
    "data": {
        "id": "c5cb6663-19fb-4551-abee-ddab2d7355d8",
        "content": "Hello :)",
        "contentType": "TEXT",
        "sender": {
            "name": "covid2020",
            "authUser": true,
            "lastActivity": "2021-06-03T14:37:24.684Z"
        },
        "externalId": "gBGHI0kFNWAgTwIJQFXbLV4JUIzD",
        "conversation_id": "65763b7f-b9a1-4370-b2ca-9cacfb0d65c2",
        "updatedAt": "2021-06-03T14:37:25.664Z",
        "createdAt": "2021-06-03T14:37:25.664Z",
        "subject": null,
        "imageUrl": null,
        "videoUrl": null,
        "documentUrl": null,
        "audioUrl": null,
        "quoted_message_id": null
    },
    "message": "Message sent to customer",
    "success": true
}
```

{% endtab %}

{% tab title="401 " %}

```
{
    "data": null,
    "message": "Invalid API Key",
    "success": false
}
```

{% endtab %}
{% endtabs %}

### Example Request Payload

```
{
    "from": "234XXXXXXXXXX",
    "message":"Session message",
    "to": "234XXXXXXXXX"
}
```
