Update Unit
- Print
- DarkLight
- PDF
Update Unit
- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Post
/api/v1/livechat/units/{id}
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
Path parameters
id
stringRequired
The unit ID that you want to update.
Body parameters
Example 1
{
"unitData": {
"name": "unitxx2",
"visibility": "private"
},
"unitMonitors": [
{
"monitorId": "GT67Tv6x5p5y5xZWN",
"username": "testerio"
}
],
"unitDepartments": [
{
"departmentId": "CgM4vfNNtj8t4QEMd"
}
]
}
object
unitData
objectRequired
The object containing the unit data.
name
string Required
The name of the unit that you are creating.
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.
username
string Required
The user name of the monitor.
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.
Responses
200
Success Example
{
"name": "unitxx2",
"visibility": "private",
"type": "u",
"numMonitors": 1,
"numDepartments": 1,
"_updatedAt": "2021-12-06T14:40:59.478Z",
"_id": "o5zNtKy7BcTMgyXtm",
"success": true
}
object
name
string
visibility
string
type
string
numMonitors
integer
numDepartments
integer
_updatedAt
string
_id
string
success
boolean
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?