Get Livechat Queue

Get
/api/v1/livechat/queue

Permission required: view-l-room

Changelog

Version Description
2.4.0 Added
Header parameters
X-Auth-Token
stringRequired

The authToken of the authenticated user.

ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired

The userId of the authenticated user.

ExamplerbAXPnMktTFbNpwtJ
Query parameters
departmentId
string

The department ID.

agentId
string

The agent ID.

includeOfflineAgents
string

Whether you want to include offline agents or not.

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
count
integer

The number of items to return. Refer to the official documentation to learn more.

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
{
  "queue": [
    {
      "chats": 1,
      "user": {
        "_id": "CaevAPDbXN252kyXa",
        "username": "marcos.defendi",
        "status": "online"
      },
      "department": {
        "_id": "457diLwcQMmdpaTjo",
        "name": "Department 1"
      }
    },
    {
      "chats": 2,
      "user": {
        "_id": "CaevAPDbXN252kyXa",
        "username": "marcos.defendi",
        "status": "online"
      },
      "department": {
        "_id": "5mt9oEtQxuMMH23Co",
        "name": "Department 2"
      }
    }
  ],
  "count": 2,
  "offset": 0,
  "total": 2,
  "success": true
}
Expand All
object
queue
Array of object
object
chats
integer
user
object
_id
string
username
string
status
string
department
object
_id
string
name
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