Get Departments by ID

Prev Next
Get
/api/v1/livechat/department.listByIds

Get a list of departments by department IDs. 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
Query parameters
ids
stringRequired

The department ID.

Responses
200

OK

Success Example
{
  "departments": [
    {
      "_id": "4LCeYmCHHnQ3EDBgf",
      "enabled": true,
      "name": "Chatbot Sales",
      "description": "",
      "showOnRegistration": false,
      "showOnOfflineForm": false,
      "requestTagBeforeClosingChat": false,
      "email": "[email protected]",
      "chatClosingTags": [],
      "offlineMessageChannelName": "",
      "abandonedRoomsCloseCustomMessage": "",
      "waitingQueueMessage": "",
      "departmentsAllowedToForward": "",
      "_updatedAt": "2021-07-15T15:11:16.856Z",
      "numAgents": 4,
      "ancestors": []
    },
    {
      "_id": "CAJioQNAvLnYWTy8i",
      "enabled": true,
      "name": "Support",
      "description": "",
      "showOnRegistration": true,
      "showOnOfflineForm": true,
      "requestTagBeforeClosingChat": false,
      "email": "[email protected]",
      "maxNumberSimultaneousChat": "",
      "waitingQueueMessage": "",
      "type": "d",
      "numAgents": 28,
      "_updatedAt": "2021-07-21T23:54:35.574Z",
      "ancestors": [
        "sriw2wmP2Zz2pPrre"
      ],
      "chatClosingTags": [],
      "abandonedRoomsCloseCustomMessage": "",
      "departmentsAllowedToForward": "",
      "offlineMessageChannelName": "",
      "visitorInactivityTimeoutInSeconds": "10",
      "parentId": "sriw2wmP2Zz2pPrre"
    },
    {
      "_id": "mHcx4rbi7htAmCCR5",
      "enabled": true,
      "name": "Chatbot Support",
      "description": "",
      "showOnRegistration": false,
      "showOnOfflineForm": false,
      "requestTagBeforeClosingChat": false,
      "email": "[email protected]",
      "chatClosingTags": [],
      "offlineMessageChannelName": "",
      "abandonedRoomsCloseCustomMessage": "",
      "waitingQueueMessage": "",
      "departmentsAllowedToForward": "",
      "_updatedAt": "2021-06-28T22:10:01.371Z",
      "numAgents": 3,
      "ancestors": [
        "sriw2wmP2Zz2pPrre"
      ],
      "parentId": "sriw2wmP2Zz2pPrre"
    }
  ],
  "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
string
_updatedAt
string
numAgents
integer
ancestors
Array of string
string
maxNumberSimultaneousChat
string
type
string
visitorInactivityTimeoutInSeconds
string
parentId
string
success
boolean
400

Bad Request

Example 1
{
  "success": false,
  "error": "The 'ids' param is required"
}
Example 2
{
  "success": false,
  "error": "The 'ids' param must be an array"
}
object
success
boolean
error
string
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