Get Available Departments by Unit Id

Prev Next
Get
/api/v1/livechat/units/{unitId}/departments/available
Premium tag

Permission required: manage-livechat-units

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
unitId
stringRequired

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

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

Example25
text
string

Filter the result with the text.

onlyMyDepartments
boolean

Whether you want the result for the departments that you are part of.

Responses
200
Success Example
{
  "departments": [
    {
      "_id": "64181a0728384134ed600dcc",
      "enabled": false,
      "name": "Missing Money",
      "description": "",
      "showOnRegistration": false,
      "showOnOfflineForm": false,
      "requestTagBeforeClosingChat": false,
      "email": "[email protected]",
      "chatClosingTags": [],
      "offlineMessageChannelName": "Livestream",
      "abandonedRoomsCloseCustomMessage": "",
      "waitingQueueMessage": "",
      "departmentsAllowedToForward": [],
      "fallbackForwardDepartment": "",
      "_updatedAt": "2023-11-29T12:48:03.843Z",
      "numAgents": 3,
      "type": "d",
      "ancestors": [
        "6567236571f856761e61c9a2"
      ],
      "parentId": "6567236571f856761e61c9a2"
    }
  ],
  "count": 1,
  "offset": 0,
  "total": 1,
  "success": true
}
Expand All
object
departments
Array of object
object
_id
string
enabled
boolean
name
string
description
string
showOnRegistration
boolean
showOnOfflineForm
boolean
requestTagBeforeClosingChat
boolean
email
string
chatClosingTags
Array of object
object
offlineMessageChannelName
string
abandonedRoomsCloseCustomMessage
string
waitingQueueMessage
string
departmentsAllowedToForward
Array of object
object
fallbackForwardDepartment
string
_updatedAt
string
numAgents
integer
type
string
ancestors
Array of string
string
parentId
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
Tags