Fuselage
Register a new Livechat visitor
URL
Requires Auth
HTTP Method
/api/v1/livechat/visitor
no
POST

Example payload

1
{
2
"visitor": {
3
"name": "Livechat Visitor",
4
"email": "[email protected]",
5
"token": "iNKE8a6k6cjbqWhWd",
6
"phone": "55 51 5555-5555",
7
"customFields": [{
8
"key": "address",
9
"value": "Rocket.Chat street",
10
"overwrite": true
11
}]
12
}
13
}
Copied!

Example Call

1
curl -X POST \
2
-H "Content-type:application/json" \
3
http://localhost:3000/api/v1/livechat/visitor \
4
-d '{"visitor": {"name": "Livechat Visitor", "email": "[email protected]", "token": "iNKE8a6k6cjbqWhWd", "phone": "55 51 5555-5555", "customFields": [{ "key": "address", "value": "Rocket.Chat street", "overwrite": true }] }}'
Copied!

Example Result

1
{
2
"visitor": {
3
"_id": "sGtcfEYz852uguxaS",
4
"username": "guest-7",
5
"_updatedAt": "2018-09-21T16:12:32.808Z",
6
"token": "iNKE8a6k6cjbqWhWd",
7
"phone": [
8
{
9
"phoneNumber": "55 51 5555-5555"
10
}
11
],
12
"visitorEmails": [
13
{
14
"address": "[email protected]"
15
}
16
],
17
"name": "Livechat Visitor",
18
"livechatData": {
19
"address": "Rocket.Chat street"
20
}
21
},
22
"success": true
23
}
Copied!
Export as PDF
Copy link
Edit on GitHub