Get Departments by Unit Id

Gives departments included in a specific unit ID.

HTTP MethodURLRequires Auth



Permission required: manage-livechat-units

Path Variables

KeyExample ValueDescription



The unit ID.

Query Parameters

This endpoint supports the optional count and offset Pagination parameters.

Example Call

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

Example Response

    "departments": [
            "_id": "MfvRXBwEWY6tTwqFh",
            "enabled": true,
            "name": "C",
            "description": "test dept",
            "showOnRegistration": true,
            "showOnOfflineForm": true,
            "requestTagBeforeClosingChat": true,
            "email": "",
            "chatClosingTags": [
                "please add a tag"
            "offlineMessageChannelName": "",
            "maxNumberSimultaneousChat": "2",
            "visitorInactivityTimeoutInSeconds": "0",
            "abandonedRoomsCloseCustomMessage": "closed",
            "waitingQueueMessage": "please wait!",
            "departmentsAllowedToForward": "",
            "_updatedAt": "2022-12-14T14:44:51.923Z",
            "numAgents": 5,
            "ancestors": [
            "parentId": "TGjc7wN84KxQup9cF",
            "fallbackForwardDepartment": "KgCzEB2gWngKp9JF3"
    "count": 1,
    "offset": 0,
    "total": 1,
    "success": true

Last updated

Rocket.Chat versions receive support for six months after release.