Send New Livechat Message

Send a new livechat message to a visitor.

Body

Example Call

curl --location 'http://localhost:3000/api/v1/livechat/message' \
--header 'Content-Type: application/json' \
--data '{
    "token": "54fc5544030bcecda053311cb6b",
    "rid": "hGFwSKA28nRKut3pD",
    "msg": "Hello World!",
    "agent": {
        "agentId": "CkCPNcvsvCDfmWLqC",
        "username": "kim.jane"
    }
}'

Example Response

{
    "message": {
        "_id": "djsajdkscks787",
        "rid": "hGFwSKA28nRKut3pD",
        "msg": "Hello World!",
        "token": "54fc5544030bcecda053311cb6b98920bdf953f242c129d7b8065000b1f9b2e9",
        "alias": "Baek",
        "ts": "2023-10-31T13:14:29.804Z",
        "u": {
            "_id": "6523dc0ba2f73c7460e18d4d",
            "username": "guest-35",
            "name": "Baek"
        },
        "_updatedAt": "2023-10-31T13:14:29.960Z",
        "urls": [],
        "mentions": [],
        "channels": [],
        "md": [
            {
                "type": "PARAGRAPH",
                "value": [
                    {
                        "type": "PLAIN_TEXT",
                        "value": "Hello World!"
                    }
                ]
            }
        ]
    },
    "success": true
}

Last updated

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