> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rocket.chat/llms.txt
> Use this file to discover all available pages before exploring further.
# Get List of 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 `viewAll` parameter to `true`.
- If a `department` is 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-room`
* `manage-livechat-tags`
## OpenAPI
````json GET /api/v1/livechat/tags
{
"openapi": "3.0.0",
"info": {
"version": "1.0.0",
"title": "Omnichannel"
},
"servers": [
{
"url": "https://apiexplorer.support.rocket.chat"
}
],
"tags": [
{
"name": "Omnichannel Users"
},
{
"name": "Omnichannel Agents"
},
{
"name": "Omnichannel Monitors"
},
{
"name": "Omnichannel Visitors"
},
{
"name": "Omnichannel Contacts"
},
{
"name": "Omnichannel Rooms"
},
{
"name": "Omnichannel Departments"
},
{
"name": "Omnichannel Custom Fields"
},
{
"name": "Omnichannel Business Hours"
},
{
"name": "Omnichannel Priorities"
},
{
"name": "Omnichannel Tags"
},
{
"name": "Omnichannel Units"
},
{
"name": "SLA Policies"
},
{
"name": "Canned Responses"
},
{
"name": "Omnichannel Transcript"
},
{
"name": "Omnichannel Statistics"
},
{
"name": "Omnichannel Agent Stats"
},
{
"name": "Omnichannel Dashboards"
},
{
"name": "Reports"
},
{
"name": "Omnichannel Inquiries"
},
{
"name": "Omnichannel Webhooks"
},
{
"name": "Livechat"
},
{
"name": "Livechat Appearance"
},
{
"name": "Livechat Triggers"
},
{
"name": "Livechat Messages"
},
{
"name": "Livechat Page Visited"
}
],
"paths": {
"/api/v1/livechat/tags": {
"get": {
"tags": [
"Omnichannel Tags"
],
"summary": "Get List of Tags",
"description": "\n\nRetrieves list of tags. Here are some important details to note when retrieving tags:\n- By default, only tags not linked to any department are returned.\n- To retrieve all tags in the workspace, set the `viewAll` parameter to `true`.\n- If a `department` is specified, the response includes both the tags associated with that department and those not linked to any department.\n\nAt least one of the following permissions is required:\n * `view-l-room`\n * `manage-livechat-tags`",
"operationId": "get-api-v1-livechat-tags",
"parameters": [
{
"$ref": "#/components/parameters/AuthToken"
},
{
"$ref": "#/components/parameters/UserId"
},
{
"$ref": "#/components/parameters/offset"
},
{
"$ref": "#/components/parameters/count"
},
{
"schema": {
"type": "string"
},
"in": "query",
"name": "text",
"description": "Filter the search result with the text."
},
{
"schema": {
"type": "string"
},
"in": "query",
"name": "department",
"description": "Enter the department ID."
},
{
"schema": {
"type": "boolean"
},
"in": "query",
"name": "viewAll",
"description": "Select whether you want to view all tags."
},
{
"schema": {},
"in": "query",
"name": "sort",
"description": "Sort tags in ascending (`1`) or descending (`-1`) order. The options are:\n * `name`: Sort by tag name. `sort={\"name\": 1}` (default) or `sort={\"name\": -1}`\n * `description`: Sort by tag description. `sort={\"description\": 1}` or `sort={\"description\": -1}`\n * `numDepartments`: Sort by number of departments associated with the tag.\n * `_createdAt`: Sort by date of tag creation.\n * `_updatedAt`: Sort by the update timestamp."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"tags": {
"type": "array",
"items": {
"type": "object",
"properties": {
"_id": {
"type": "string"
},
"name": {
"type": "string"
},
"numDepartments": {
"type": "integer"
},
"departments": {
"type": "array",
"items": {
"type": "string"
}
},
"_updatedAt": {
"type": "string"
},
"description": {
"type": "string"
}
}
}
},
"count": {
"type": "integer"
},
"offset": {
"type": "integer"
},
"total": {
"type": "integer"
},
"success": {
"type": "boolean"
}
}
},
"examples": {
"Success Example": {
"value": {
"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"
}
}
}
}
}
},
"401": {
"$ref": "#/components/responses/authorizationError"
},
"403": {
"$ref": "#/components/responses/permissionError"
}
}
}
}
},
"components": {
"parameters": {
"AuthToken": {
"name": "X-Auth-Token",
"in": "header",
"description": "The `authToken` of the authenticated user.",
"required": "true",
"schema": {
"type": "string"
},
"example": "RScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f"
},
"UserId": {
"name": "X-User-Id",
"in": "header",
"description": "The `userId` of the authenticated user.",
"required": "true",
"schema": {
"type": "string"
},
"example": "rbAXPnMktTFbNpwtJ"
},
"offset": {
"name": "offset",
"in": "query",
"required": "false",
"schema": {
"type": "integer"
},
"example": "50",
"description": "Number of items to \"skip\" in the query, i.e. requests return count items, skipping the first offset items. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more."
},
"count": {
"name": "count",
"in": "query",
"required": "false",
"schema": {
"type": "integer"
},
"example": "25",
"description": "The number of items to return. Refer to the [official documentation](https://developer.rocket.chat/apidocs/query-parameters#pagination) to learn more."
}
},
"responses": {
"authorizationError": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"status": {
"type": "string"
},
"message": {
"type": "string"
}
}
},
"examples": {
"Authorization Error": {
"value": {
"status": "error",
"message": "You must be logged in to do this."
}
}
}
}
}
},
"permissionError": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"success": {
"type": "boolean"
},
"error": {
"type": "string"
}
}
},
"examples": {
"Permission Error": {
"value": {
"success": "false",
"error": "User does not have the permissions required for this action [error-unauthorized]"
}
},
"Unauthorized": {
"value": {
"success": "false",
"error": "unauthorized"
}
}
}
}
}
}
}
}
}
````