Create Unit
- Print
- DarkLight
- PDF
Create Unit
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Post
/api/v1/livechat/units
Create a unit to group departments. Permission required: manage-livechat-units
Changelog
Version | Description |
---|---|
4.2.0 | Added |
Header parameters
X-Auth-Token
stringRequired
The authToken
of the authenticated user.
ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired
The userId
of the authenticated user.
ExamplerbAXPnMktTFbNpwtJ
Body parameters
Example 1
{
"unitData": {
"name": "unitxx2",
"visibility": "public"
},
"unitMonitors": [
{
"monitorId": "GT67Tv6x5p5y5xZWN",
"username": "testerio"
}
],
"unitDepartments": [
{
"departmentId": "CgM4vfNNtj8t4QEMd"
}
]
}
object
unitData
objectRequired
The object containing the unit information.
name
string Required
The name of the unit that you are creating.
Exampleunitxx2
visibility
string Required
The visibility of the unit. For example, public
or private
.
unitMonitors
Array of object Required
The object containing the unit monitors information.
object
monitorId
string Required
The monitor ID that you want to add to the unit.
ExampleGT67Tv6x5p5y5xZWN
username
string Required
The user name of the monitor.
Exampletesterio
unitDepartments
Array of object Required
The object containing the department information.
object
departmentId
string Required
The department ID that you want to add to the unit.
ExampleCgM4vfNNtj8t4QEMd
Responses
200
Success Example
{
"name": "unitxx2",
"visibility": "public",
"type": "u",
"numMonitors": 1,
"numDepartments": 1,
"_updatedAt": "2021-12-06T14:30:27.744Z",
"_id": "o5zNtKy7BcTMgyXtm",
"success": true
}
object
name
string
visibility
string
type
string
numMonitors
integer
numDepartments
integer
_updatedAt
string
_id
string
success
boolean
400
Bad Request
Example 1
{
"success": false,
"error": "Match error: Expected object, got undefined"
}
object
success
boolean
error
string
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}
object
status
string
message
string
403
Forbidden
Example 1
{
"success": false,
"error": "User does not have the permissions required for this action [error-unauthorized]"
}
Example 2
{
"success": false,
"error": "unauthorized"
}
object
success
boolean
error
string
Was this article helpful?