Fuselage
Livechat Send New Message
Send a new Livechat message
URL
Requires Auth
HTTP Method
/api/v1/livechat/message
no
POST

Payload

Argument
Example
Required
Description
token
iNKE8a6k6cjbqWhWd
Required
Visitor token.
rid
zRAeTszXor8CCPceB
Required
Room _id.
msg
sending livechat message..
Required
Message text.
_id
Optional
Message _id.
agent
Optional
Room agent.

Example payload

1
{
2
"token": "iNKE8a6k6cjbqWhWd",
3
"rid": "zRAeTszXor8CCPceB",
4
"msg": "sending livechat message.."
5
}
Copied!

Example Call

1
curl -X POST \
2
-H "Content-type:application/json" \
3
http://localhost:3000/api/v1/livechat/message \
4
-d '{"token": "iNKE8a6k6cjbqWhWd", "rid": "zRAeTszXor8CCPceB", "msg": "sending livechat message.."}'
Copied!

Example Result

1
{
2
"message": {
3
"_id": "ZKWP8LfGnRHQ3ozWa",
4
"msg": "sending livechat message..",
5
"u": {
6
"_id": "iNKE8a6k6cjbqWhWd",
7
"username": "guest-4",
8
"name": "Livechat Visitor"
9
},
10
"ls": "2018-09-14T13:31:33.201Z"
11
},
12
"success": true
13
}
Copied!
Export as PDF
Copy link
Edit on GitHub