Get
/api/v1/livechat/department/{_id}/agents
Get the agents of a specific department. At least one of the following permissions is required:
view-livechat-departments
view-l-room
Header parameters
X-Auth-Token
stringRequired
The authToken
of the authenticated user.
ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired
The userId
of the authenticated user.
ExamplerbAXPnMktTFbNpwtJ
Path parameters
_id
stringRequired
The department ID.
Query parameters
offset
integer
Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items. Refer to the official documentation to learn more.
Example50
Example25
sort
(object)
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}
. Refer to the official documentation to learn more.
Responses
200
OK
Success Example
{
"agents": [
{
"_id": "SWugWdHhcTX4G2NAP",
"agentId": "rocket.cat",
"departmentId": "BiqbQav59HD2LzXEY",
"_updatedAt": "2021-07-14T14:58:01.013Z",
"count": 17,
"departmentEnabled": true,
"order": 0,
"username": "rocket.cat"
}
],
"count": 1,
"offset": 0,
"total": 1,
"success": true
}
object
agents
Array of object
object
_id
string
agentId
string
departmentId
string
_updatedAt
string
count
integer
departmentEnabled
boolean
order
integer
username
string
count
integer
offset
integer
total
integer
success
boolean
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}
object
status
string
message
string
403
Forbidden
Permission Error
{
"success": false,
"error": "User does not have the permissions required for this action [error-unauthorized]"
}
Unauthorized
{
"success": false,
"error": "unauthorized"
}
object
success
boolean
error
string