Fuselage
Livechat Room Info
Get the Livechat room data or open a new room.
URL
Requires Auth
HTTP Method
/api/v1/livechat/room
no
GET

Query Parameters

Argument
Example
Required
Description
token
iNKE8a6k6cjbqWhWd
Required
The visitor token.
rid
kCJDd5peKiZnGJLPq
Optional
The room _id.
agentId
XycfA5CetCPuEjqxw
Optional
The agent id.

Example Call

1
curl http://localhost:3000/api/v1/livechat/room?token=8s7e9ony6ctl27e1qf8kue&rid=kCJDd5peKiZnGJLPq&agentId=XycfA5CetCPuEjqxw
Copied!

Example Result

1
{
2
"room": {
3
"_id": "kCJDd5peKiZnGJLPq",
4
"fname": "Mary",
5
"t": "l",
6
"v": {
7
"_id": "47Dajwh9DjpnTAugW",
8
"username": "guest-165",
9
"token": "8s7e9ony6ctl27e1qf8kue",
10
"status": "offline",
11
"lastMessageTs": "2021-07-09T20:20:58.755Z"
12
},
13
"departmentId": "CAJioQNAvLnYWTy8i",
14
"default": false,
15
"ro": false,
16
"sysMes": true,
17
"open": true,
18
"msgs": 7,
19
"ts": "2021-07-09T20:12:19.795Z",
20
"_updatedAt": "2021-07-09T20:21:07.334Z",
21
"lm": "2021-07-09T20:20:58.755Z",
22
"customFields": {
23
"salesforceCrmContactId": "0032y000009mtOIAAY"
24
},
25
"usersCount": 2,
26
"cl": false,
27
"departmentAncestors": [
28
"sriw2wmP2Zz2pPrre"
29
],
30
"lastMessage": {
31
"_id": "SgrsSm3HNGrG5xTmk",
32
"rid": "kCJDd5peKiZnGJLPq",
33
"msg": "d",
34
"token": "8s7e9ony6ctl27e1qf8kue",
35
"alias": "Mary",
36
"ts": "2021-07-09T20:20:58.755Z",
37
"u": {
38
"_id": "47Dajwh9DjpnTAugW",
39
"username": "guest-165",
40
"name": "Mary"
41
},
42
"_updatedAt": "2021-07-09T20:20:58.896Z",
43
"urls": [],
44
"mentions": [],
45
"channels": [],
46
"md": [
47
{
48
"type": "PARAGRAPH",
49
"value": [
50
{
51
"type": "PLAIN_TEXT",
52
"value": "d"
53
}
54
]
55
}
56
],
57
"newRoom": false,
58
"showConnecting": true
59
},
60
"metrics": {
61
"reaction": {
62
"fd": "2021-07-09T20:19:53.243Z",
63
"ft": 23.821,
64
"tt": 24.006
65
},
66
"response": {
67
"avg": 226.4365,
68
"fd": "2021-07-09T20:19:53.243Z",
69
"ft": 452.688,
70
"total": 2,
71
"tt": 452.873
72
},
73
"v": {
74
"lq": "2021-07-09T20:20:58.755Z"
75
},
76
"servedBy": {
77
"lr": "2021-07-09T20:19:53.077Z"
78
}
79
},
80
"servedBy": {
81
"_id": "XycfA5CetCPuEjqxw",
82
"username": "faria.masood",
83
"ts": "2021-07-09T20:19:29.422Z"
84
},
85
"waitingResponse": true
86
},
87
"newRoom": false,
88
"success": true
89
}
Copied!
Export as PDF
Copy link
Edit on GitHub