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

Parameters: send_message
NameTypeDescription
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
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?"}'
Python
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?"})
Node.js
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?"});
CLI
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

JSON

{
  "chat_id": "PJ0MRSHTDG",
  "event_id": "ev_5530",
  "status": "sent",
  "sent_at": "2026-10-17T07:02:00+02:00"
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.