Get
/api/v1/livechat/agents/{agentId}/departments
Returns the departments associated with an agent.
Permission required: 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
agentId
stringRequired
The agent ID.
Responses
200
OK
Success Example
{
  "departments": [
    {
      "_id": "R34ZLL6wxDuk4S29G",
      "agentId": "XycfA5CetCPuEjqxw",
      "departmentId": "CAJioQNAvLnYWTy8i",
      "_updatedAt": "2021-06-29T16:09:12.897Z",
      "count": 0,
      "departmentEnabled": true,
      "order": 0,
      "username": "kim.baek"
    },
    {
      "_id": "4TnnwbRsBY2upkzjp",
      "agentId": "XycfA5CetCPuEjqxw",
      "departmentId": "GgYvrkAF63aeQmsh4",
      "_updatedAt": "2021-06-29T16:09:12.918Z",
      "count": 0,
      "departmentEnabled": true,
      "order": 0,
      "username": "kim.baek"
    },
    {
      "_id": "wJTwJsAxRcZ8nc9sB",
      "agentId": "XycfA5CetCPuEjqxw",
      "departmentId": "Yi87Ju7eTHiZQ7CJt",
      "_updatedAt": "2021-06-29T16:09:12.937Z",
      "count": 0,
      "departmentEnabled": false,
      "order": 0,
      "username": "kim.baek"
    },
    {
      "_id": "ccjbvLEREZ6vwjBFk",
      "agentId": "XycfA5CetCPuEjqxw",
      "departmentId": "sLYp3ry7CRizaP3rJ",
      "_updatedAt": "2021-06-29T16:09:12.956Z",
      "count": 0,
      "departmentEnabled": false,
      "order": 0,
      "username": "kim.baek"
    }
  ],
  "success": true
}object  
departments 
Array of object   
object  
_id
string    
agentId
string    
departmentId
string    
_updatedAt
string    
count
integer    
departmentEnabled
boolean    
order
integer    
username
string    
success
boolean    
401
Unauthorized
Authorization Error
{
  "status": "error",
  "message": "You must be logged in to do this."
}object  
status
string    
message
string