Links

Get Departments by Unit ID

Gives departments included in a specific unit ID.
This endpoint has been renamed to Get Departments by Unit Id as from Rocket.Chat 5.0
HTTP Method
URL
Requires Auth
GET
api/v1/livechat/departments.by-unit/:unitId
yes

Path Variables

Key
Example Value
Description
unitId*
sriw2wmP2Zz2pPrre
The unit ID.

Example Call

curl --location --request GET 'http://localhost:3000///api/v1/livechat/departments.by-unit/:unitId \
--header 'X-Auth-Token: myauth-token' \
--header 'X-User-Id: myuser-name'

Example Response

{
"departments": [
{
"_id": "Yi87Ju7eTHiZQ7CJt",
"enabled": false,
"name": "Customer Success",
"description": "TEST",
"showOnRegistration": false,
"showOnOfflineForm": true,
"requestTagBeforeClosingChat": false,
"email": "[email protected]",
"maxNumberSimultaneousChat": "",
"waitingQueueMessage": "TEST",
"type": "d",
"numAgents": 13,
"_updatedAt": "2021-06-28T22:10:01.360Z",
"ancestors": [
"sriw2wmP2Zz2pPrre"
],
"chatClosingTags": [],
"abandonedRoomsCloseCustomMessage": "",
"departmentsAllowedToForward": "",
"offlineMessageChannelName": "",
"visitorInactivityTimeoutInSeconds": "",
"parentId": "sriw2wmP2Zz2pPrre"
},
{
"_id": "CAJioQNAvLnYWTy8i",
"enabled": true,
"name": "Support",
"description": "",
"showOnRegistration": true,
"showOnOfflineForm": true,
"requestTagBeforeClosingChat": false,
"email": "[email protected]",
"maxNumberSimultaneousChat": "",
"waitingQueueMessage": "",
"type": "d",
"numAgents": 24,
"_updatedAt": "2021-06-28T22:10:01.373Z",
"ancestors": [
"sriw2wmP2Zz2pPrre"
],
"chatClosingTags": [],
"abandonedRoomsCloseCustomMessage": "",
"departmentsAllowedToForward": "",
"offlineMessageChannelName": "",
"visitorInactivityTimeoutInSeconds": "10",
"parentId": "sriw2wmP2Zz2pPrre"
},
{
"_id": "Z2KWYBJQFR7AzfmQL",
"enabled": false,
"name": "Support Email",
"description": "testing emails",
"showOnRegistration": false,
"showOnOfflineForm": false,
"requestTagBeforeClosingChat": false,
"email": "[email protected]",
"chatClosingTags": [],
"offlineMessageChannelName": "",
"maxNumberSimultaneousChat": "",
"visitorInactivityTimeoutInSeconds": "30",
"abandonedRoomsCloseCustomMessage": "",
"waitingQueueMessage": "",
"departmentsAllowedToForward": [
"qajzu7WaBRoQBpq6Z",
"4LCeYmCHHnQ3EDBgf"
],
"type": "d",
"numAgents": 5,
"_updatedAt": "2021-06-28T22:10:01.347Z",
"ancestors": [
"sriw2wmP2Zz2pPrre"
],
"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"
}
],
"count": 4,
"offset": 0,
"total": 4,
"success": true
}
Last modified 3mo ago
Rocket.Chat versions receive support for six months after release.