Skip to content

Send a live chat message

post/live-chat
Any key

Send a live chat message to an existing conversation of a chatbot. The message can be sent as a human agent (role: 'human'), as an assistant response (role: 'assistant') or as a user message (role: 'user').

Role behavior:

  • 'human' (default): The message is sent as a human agent, and the AI bot stops answering so it does not interfere. In the website widget the conversation then goes to the agent. On WhatsApp, WhatsApp Web, Instagram, Messenger, Telegram and LINE the bot pauses for the integration's auto-off time after the last human message (30 minutes by default), and not at all if auto-off is turned off; use /bot-control to take over for longer. The name and avatar parameters are used for the human agent's identity.
  • 'assistant': The message is sent as an AI assistant response. The AI bot continues to operate normally. The name and avatar parameters are ignored.
  • 'user': The message is sent as a user message. The AI bot continues to operate normally. The name and avatar parameters are ignored.

If you want to take over the conversation as a human agent, use the default 'human' role. If you want to send assistant responses without stopping the AI bot, use the 'assistant' role.

Minimum API key access level: Full.

Request body

Sending 2 of 7 fields
Required
chatbotIdstring
The unique identifier of the chatbot.
conversationIdstring
The unique identifier of the conversation. It must be an existing conversation of the chatbot.

Only these fields are sent (application/json).

Try it · POST /live-chat
curl 'https://api.chat-data.com/api/v2/live-chat' \  -H "Authorization: Bearer $CHAT_DATA_API_KEY" \  -H 'Content-Type: application/json' \  -d '{  "chatbotId": "6650f1c2a9e4b83d2c7a1f05",  "conversationId": "3f2b8c1e-9a4d-4e7b-8c2a-5d1e6f7a8b9c"}'
Loading…

Responses

Successful response.

Content type: application/json

FieldDescription
statusstringOne of: success.
emailed_offline_messagebooleanWhether an offline email (and SMS, when configured) was triggered because the user was offline. This only happens when the role is 'human', the user is offline and the conversation's lead has an email address. It does not confirm delivery; no email is sent when the workspace has no email credits left.
is_user_onlinebooleanWhether the user is currently online in the conversation.
deliveryobjectOnly present when the conversation came from WhatsApp, WhatsApp Web, Instagram, Messenger, Telegram or LINE and role is human or assistant. The message is stored either way; this tells whether it was handed to the platform.
delivery.channelstringThe platform of the conversation (its source).
delivery.statestringaccepted: the message was handed to the platform (this does not confirm delivery). skipped (WhatsApp only): not sent because the conversation's previous message is more than 24 hours old (send a template message instead). failed: the send failed, including Instagram and Messenger messages sent more than 7 days after the previous message.
delivery.reasonstringWhy the message was skipped or failed. Absent when state is accepted. One of: outside_24h_window, send_failed, send_error.
delivery.errorstringThe platform's error message, when there is one. Absent when state is accepted.

Example

{  "status": "success",  "emailed_offline_message": false,  "is_user_online": true,  "delivery": {    "channel": "Whatsapp",    "state": "accepted"  }}

Last updated November 12, 2026