Create a Unit

Permission required: manage-livechat-units

Body Parameters

Example Call

curl --location --request POST 'localhost:3000/api/v1/livechat/units' \
--header 'x-Auth-token: jx-CrbeqbxPimsZr1UAhO3NsJdU8yB0MVoXkGOKQ3xL' \
--header 'x-user-id: 6vHSSqdBHdm2R4gfi' \
--header 'Content-Type: application/json' \
--data '{
	"unitData": {
        "name": "unitxx2",
        "visibility": "public"
    },
    "unitMonitors": [{
        "monitorId": "GT67Tv6x5p5y5xZWN",
        "username": "testerio"
    }],
    "unitDepartments": [{
        "departmentId": "CgM4vfNNtj8t4QEMd"
    }]
}'

Example Response

{
    "name": "unitxx2",
    "visibility": "public",
    "type": "u",
    "numMonitors": 1,
    "numDepartments": 1,
    "_updatedAt": "2021-12-06T14:30:27.744Z",
    "_id": "o5zNtKy7BcTMgyXtm",
    "success": true
}

Change Log

Last updated

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