Skip to content

Latest commit

 

History

History
52 lines (42 loc) · 1.56 KB

File metadata and controls

52 lines (42 loc) · 1.56 KB
description
Gives a list of units

List of Unit

{% hint style="info" %} This endpoint has been renamed to get-units.md as from Rocket.Chat 5.0 {% endhint %}

URL Requires Auth HTTP Method
api/v1/livechat/units.list YES GET

Headers

Argument Example Required Description
X-User-Id myuser-name Required Your username hash (returned after you log in through the API)
X-Auth-Token myauth-token Required Your token (returned after you log in through the API)

Example Call

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

Result

{
    "units": [
        {
            "_id": "sriw2wmP2Zz2pPrre",
            "name": "Support",
            "visibility": "public",
            "type": "u",
            "numMonitors": 3,
            "numDepartments": 4,
            "_updatedAt": "2021-06-28T22:10:01.295Z"
        }
    ],
    "count": 1,
    "offset": 0,
    "total": 1,
    "success": true
}