Send Array of Messages

Send an array of messages to a visitor.

HTTP MethodURLRequires Auth

POST

/api/v1/livechat/messages

Body

KeyExample ValueDescription

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 updated

Rocket.Chat versions receive support for six months after release.