Links

Send Array of Messages

Send an array of messages to a visitor.
HTTP Method
URL
Requires Auth
POST
/api/v1/livechat/messages
yes

Body

Key
Example Value
Description
visitor*
"visitor": { "token": "54fc5544030bcecda0e9"}
The vistor token.
messages*
"messages": [{"msg": "test" }, { "msg": "hello"} ]
The array of messages.

Example Call

curl --location 'http://localhost:3000/api/v1/livechat/messages' \
--header 'X-Auth-Token: Y97tM4GkYjgaH_fIO5dwBitQQvm3yp-AptYzGQZMX6e' \
--header 'X-User-Id: CkCPNcvsvCDfmWLqC' \
--header 'Content-Type: application/json' \
--data '{
"visitor": {"token": "54fc5544030bcecda053311cb6b98920b"},
"messages": [{"msg": "test" },
{ "msg": "hello"} ]
}'

Example Response

{
"messages": [
{
"username": "guest-35",
"msg": "test",
"ts": "2023-10-31T08:41:29.724Z"
},
{
"username": "guest-35",
"msg": "hello",
"ts": "2023-10-31T08:41:29.725Z"
}
],
"success": true
}
Last modified 26d ago
Deprecation for cloud services and apps is now extended to November 20, 2023. Rocket.Chat versions receive support for six months after release.