Get
/api/v1/livechat/tags
Retrieves list of tags. Here are some important details to note when retrieving tags:
- By default, only tags not linked to any department are returned.
- To retrieve all tags in the workspace, set the
viewAllparameter totrue. - If a
departmentis specified, the response includes both the tags associated with that department and those not linked to any department.
At least one of the following permissions is required:
view-l-roommanage-livechat-tags
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
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
text
string
Filter the search result with the text.
department
string
Enter the department ID.
viewAll
boolean
Select whether you want to view all tags.
sort
Sort tags in ascending (1) or descending (-1) order. The options are:
name: Sort by tag name.sort={"name": 1}(default) orsort={"name": -1}description: Sort by tag description.sort={"description": 1}orsort={"description": -1}numDepartments: Sort by number of departments associated with the tag._createdAt: Sort by date of tag creation._updatedAt: Sort by the update timestamp.
Responses
200
OK
Success Example
{
"tags": [
{
"_id": "nNJntq2n6GBdR8JC4",
"name": "331",
"numDepartments": 2,
"departments": [
"kxL4qaa29SMpy3ZXG",
"WRY3EFGAT9Xh5NFBv"
],
"_updatedAt": "2022-11-28T07:17:31.973Z",
"description": "xfgh"
},
{
"_id": "bhA8DPhSdeBEJ2C94",
"name": "QA-Passed",
"numDepartments": 0,
"departments": [],
"_updatedAt": "2022-08-30T12:14:54.173Z"
},
{
"_id": "b8mvKqZXiAw36pDqE",
"name": "VoIP",
"description": "voip test",
"numDepartments": 0,
"departments": [],
"_updatedAt": "2022-03-01T06:27:43.113Z"
},
{
"_id": "GR6zxTM5PMHxGwud6",
"name": "t1",
"description": "test1",
"numDepartments": 1,
"departments": [
"kxL4qaa29SMpy3ZXG"
],
"_updatedAt": "2023-01-04T14:02:29.038Z"
}
],
"count": 4,
"offset": 0,
"total": 4,
"success": true
}object
tags
Array of object
object
_id
string
name
string
numDepartments
integer
departments
Array of string
string
_updatedAt
string
description
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