Send message
Reply to the customer in a chat, as you.
POST https://cotlet.dev/api/v1/livechat/chats/{chat_id}/messages
write Confirm
Sends a message to the customer in one chat, under your agent name. Pass canned_response to send the text of a canned response with its variables filled in. By default you confirm each call; you can switch that off for this tool.
Parameters
| Name | Type | Description |
|---|---|---|
| chat_id string required | string | Chat ID from list_chats or list_archived_chats. |
| body string required | string | Message text. |
| canned_response string | string | Response ID from list_canned_responses. Replaces body. |
Request
curl -X POST https://cotlet.dev/api/v1/livechat/chats/PJ0MRSHTDG/messages \
-H "Authorization: Bearer $COTLET_API_KEY" \
-H "Content-Type: application/json" \
-d '{"body":"Hi Lena, thanks for writing. Could you send me your order number so I can check the delivery?"}' result = client.call("livechat", "send_message", {"chat_id":"PJ0MRSHTDG","body":"Hi Lena, thanks for writing. Could you send me your order number so I can check the delivery?"}) const result = await cotlet.call('livechat', 'send_message', {"chat_id":"PJ0MRSHTDG","body":"Hi Lena, thanks for writing. Could you send me your order number so I can check the delivery?"}); cotlet call livechat send_message --data '{"chat_id":"PJ0MRSHTDG","body":"Hi Lena, thanks for writing. Could you send me your order number so I can check the delivery?"}' Example response
{
"chat_id": "PJ0MRSHTDG",
"event_id": "ev_5530",
"status": "sent",
"sent_at": "2026-10-17T07:02:00+02:00"
}