Get
/api/v1/livechat/units
Permission required: manage-livechat-units
Header parameters
X-Auth-Token
stringRequired
The authToken
of the authenticated user.
ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
X-User-Id
stringRequired
The userId
of the authenticated user.
ExamplerbAXPnMktTFbNpwtJ
Query parameters
text
string
Enter some text to filter the results.
offset
integer
Number of items to "skip" in the query, i.e. requests return count items, skipping the first offset items. Refer to the official documentation to learn more.
Example50
Example25
sort
(object)
List of fields to order by, and in which direction. JSON object, with properties listed in desired order, with values of 1 for ascending, or -1 for descending. For example, sort = {"value": -1, "_id": 1}
. Refer to the official documentation to learn more.
Responses
200
Success Example
{
"units": [
{
"_id": "SB3Z7uuEvd3aKPjnE",
"name": "12345",
"visibility": "public",
"type": "u",
"numMonitors": 3,
"numDepartments": 3,
"_updatedAt": "2022-09-15T14:55:32.338Z"
},
{
"_id": "uiPBkzcau5hrWwBkG",
"name": "C",
"visibility": "public",
"type": "u",
"numMonitors": 1,
"numDepartments": 3,
"_updatedAt": "2022-08-29T20:18:07.442Z"
},
{
"_id": "jsNuTwygAAWFPkt8u",
"name": "Mtest",
"visibility": "public",
"type": "u",
"numMonitors": 1,
"numDepartments": 1,
"_updatedAt": "2022-09-15T11:44:32.103Z"
},
{
"_id": "LnM2rzbknjYSkkd5p",
"name": "Sales Unit",
"visibility": "public",
"type": "u",
"numMonitors": 1,
"numDepartments": 2,
"_updatedAt": "2022-09-15T11:44:15.721Z"
},
{
"_id": "y6TXZeTzn4mAxDhL2",
"name": "TestDept1",
"visibility": "public",
"type": "u",
"numMonitors": 4,
"numDepartments": 1,
"_updatedAt": "2022-08-30T09:55:19.240Z"
},
{
"_id": "xiAnkznAh4RSJ8DQT",
"name": "abc",
"visibility": "public",
"type": "u",
"numMonitors": 1,
"numDepartments": 3,
"_updatedAt": "2023-01-03T10:19:58.219Z"
},
{
"_id": "TGjc7wN84KxQup9cF",
"name": "business unit test",
"visibility": "public",
"type": "u",
"numMonitors": 3,
"numDepartments": 1,
"_updatedAt": "2022-11-21T11:16:01.698Z"
}
],
"count": 7,
"offset": 0,
"total": 7,
"success": true
}
object
units
Array of object
object
_id
string
name
string
visibility
string
type
string
numMonitors
integer
numDepartments
integer
_updatedAt
string
count
integer
offset
integer
total
integer
success
boolean
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}
object
status
string
message
string
403
Forbidden
Permission Error
{
"success": false,
"error": "User does not have the permissions required for this action [error-unauthorized]"
}
Unauthorized
{
"success": false,
"error": "unauthorized"
}
object
success
boolean
error
string