- Print
- DarkLight
- PDF
Get List of Call Center Rooms
- Print
- DarkLight
- PDF
Permissions required:
- For an admin:
view-livechat-rooms
- For an agent:
view-l-room
The authToken
of the authenticated user.
The userId
of the authenticated user.
List of agent information.
The status of the room. The value can be true or false.
The date and time when the room was created.
The date and time when the room was closed.
List of tag information.
The ID assigned to the call (opaque ID).
The visitor ID.
The direction of the call.
The name of the room.
Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items.
The number of items to return.
List of fields to order by, and in which direction. JSON object, with properties listed in desired order, with values of 1 for ascending, or -1 for descending. For example, sort = {"value": -1, "_id": 1}
This parameter accepts a JSON object with properties that have a value of 1 or 0 to include or exclude them in the response. For example, to only retrieve the usernames of users: fields = {"username": 1}
OK
{
"room": {
"_id": "kCJDd5peKiZnGJLPq",
"fname": "Mary",
"t": "l",
"v": {
"_id": "47Dajwh9DjpnTAugW",
"username": "guest-165",
"token": "8s7e9ony6ctl27e1qf8kue",
"status": "offline",
"lastMessageTs": "2021-07-09T20:20:58.755Z"
},
"departmentId": "CAJioQNAvLnYWTy8i",
"default": false,
"ro": false,
"sysMes": true,
"open": true,
"msgs": 7,
"ts": "2021-07-09T20:12:19.795Z",
"_updatedAt": "2021-07-09T20:21:07.334Z",
"lm": "2021-07-09T20:20:58.755Z",
"customFields": {
"salesforceCrmContactId": "0032y000009mtOIAAY"
},
"usersCount": 2,
"cl": false,
"departmentAncestors": [
"sriw2wmP2Zz2pPrre"
],
"lastMessage": {
"_id": "SgrsSm3HNGrG5xTmk",
"rid": "kCJDd5peKiZnGJLPq",
"msg": "d",
"token": "8s7e9ony6ctl27e1qf8kue",
"alias": "Mary",
"ts": "2021-07-09T20:20:58.755Z",
"u": {
"_id": "47Dajwh9DjpnTAugW",
"username": "guest-165",
"name": "Mary"
},
"_updatedAt": "2021-07-09T20:20:58.896Z",
"urls": [],
"mentions": [],
"channels": [],
"md": [
{
"type": "PARAGRAPH",
"value": [
{
"type": "PLAIN_TEXT",
"value": "d"
}
]
}
],
"newRoom": false,
"showConnecting": true
},
"metrics": {
"reaction": {
"fd": "2021-07-09T20:19:53.243Z",
"ft": 23.821,
"tt": 24.006
},
"response": {
"avg": 226.4365,
"fd": "2021-07-09T20:19:53.243Z",
"ft": 452.688,
"total": 2,
"tt": 452.873
},
"v": {
"lq": "2021-07-09T20:20:58.755Z"
},
"servedBy": {
"lr": "2021-07-09T20:19:53.077Z"
}
},
"servedBy": {
"_id": "XycfA5CetCPuEjqxw",
"username": "kim.jane",
"ts": "2021-07-09T20:19:29.422Z"
},
"waitingResponse": true
},
"success": true
}
Unauthorized
{
"status": "error",
"message": "You must be logged in to do this."
}
Forbidden
{
"success": false,
"error": "User does not have the permissions required for this action [error-unauthorized]"
}
{
"success": false,
"error": "unauthorized"
}