Send an array of messages to a visitor.
HTTP Method | URL | Requires Auth |
---|---|---|
POST | /api/v1/livechat/messages | yes |
Key | Example Value | Description |
---|---|---|
visitor * | "visitor": { "token": "54fc5544030bcecda0e9"} | The vistor token. |
messages * | "messages": [{"msg": "test" }, { "msg": "hello"} ] | The array of messages. |
{% code overflow="wrap" %}
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"} ]
}'
{% endcode %}
{
"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
}