sendTextMessageToActiveChat
Sends a text message to an active chat.
HTTP POST /livechat/:domain/sendTextMessageToActiveChat/:chatId
Â
Path Variables:
Name | Mandatory | Type | Description |
---|---|---|---|
domain | NO | STRING | Unique domain identifier |
chatId | yes | string | Unique chat identifier |
Authorization: see Authentication mechanisms
Request Body:
Type: JSON
Name | Mandatory | Type | Description |
---|---|---|---|
text | YES | STRING | Text message to send in chat |
nickname | no | string | User nickname |
Response:
Type: JSON
Name | Type | Description |
---|---|---|
result | BOOLEAN | If true, the service response was performed correctly |
error | NULL / STRING | Contains the error description if an error has occurred in the request |
Example:
Request
http://<hostname>:<port>/livechat/default/sendTextMessageToActiveChat/CHAT_DEFAULT_966afd14-9bdc-4246-84f7-035d6eb54d9a
Request body
{
"text": "This is a new message from API",
"nickname":"Lando Calrissian"
}
Response
{
"result": true,
"error": null
}
Â