> For the complete documentation index, see [llms.txt](https://docs.truedat.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.truedat.io/v8.8/api-integrations/link-manager-apis/tags.md).

# Tags

## List all tags

> Returns a list of all tags, optionally filtered by query parameters.

```json
{"openapi":"3.0.0","info":{"title":"td-lm","version":"Truedat 8.8.0"},"paths":{"/api/tags":{"get":{"description":"Returns a list of all tags, optionally filtered by query parameters.","operationId":"TdLmWeb.TagController.index","parameters":[{"description":"Filter by tag value fields. The optional `value` parameter is a JSON object that filters tags where the `value` field matches the provided keys.\nCommon filter keys:\n  - `target_type` (string): e.g., \"ingest\", \"data_field\"\n  - `type` (string): e.g., \"business_concept\", \"technical\"\n  - `expandable` (string): e.g., \"true\" or \"false\"\nYou can also use any other key present in the tag's `value` object.\nExample: `{\"target_type\": \"ingest\", \"type\": \"business_concept\"}`\n","explode":true,"in":"query","name":"value","required":false,"schema":{"additionalProperties":true,"type":"object"},"style":"deepObject"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagListResponse"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmUnauthorizedResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"List all tags","tags":["Tags"]}}},"components":{"schemas":{"TagListResponse":{"additionalProperties":false,"properties":{"data":{"description":"List of tags","items":{"$ref":"#/components/schemas/TagObject"},"type":"array"}},"required":["data"],"title":"TagListResponse","type":"object"},"TagObject":{"additionalProperties":false,"properties":{"id":{"description":"Tag ID","type":"integer"},"value":{"$ref":"#/components/schemas/TagValue"}},"required":["id","value"],"title":"TagObject","type":"object"},"TagValue":{"additionalProperties":true,"description":"Dynamic value of a tag","properties":{"expandable":{"description":"Optional expandable flag","nullable":true,"type":"string"},"target_type":{"description":"Target resource type","type":"string"},"type":{"description":"Tag type","type":"string"}},"required":["target_type","type"],"title":"TagValue","type":"object"},"TdLmUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmUnauthorizedResponse","type":"object"},"TdLmInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmInternalServerErrorResponse","type":"object"}}}}
```

## Create a new tag

> Creates a new tag with the provided value.

```json
{"openapi":"3.0.0","info":{"title":"td-lm","version":"Truedat 8.8.0"},"paths":{"/api/tags":{"post":{"description":"Creates a new tag with the provided value.","operationId":"TdLmWeb.TagController.create","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagRequest"}}},"description":"Tag data","required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagShowResponse"}}},"description":"Created"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmBadRequestResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmForbiddenResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmUnprocessableEntityResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Create a new tag","tags":["Tags"]}}},"components":{"schemas":{"TagRequest":{"additionalProperties":false,"properties":{"tag":{"additionalProperties":false,"description":"Tag data","properties":{"value":{"additionalProperties":true,"description":"Dynamic value of the tag","properties":{"expandable":{"description":"Optional expandable flag","nullable":true,"type":"string"},"target_type":{"description":"Target resource type","type":"string"},"type":{"description":"Tag type","type":"string"}},"required":["target_type","type"],"type":"object"}},"required":["value"],"type":"object"}},"required":["tag"],"title":"TagRequest","type":"object"},"TagShowResponse":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/TagObject"}},"required":["data"],"title":"TagShowResponse","type":"object"},"TagObject":{"additionalProperties":false,"properties":{"id":{"description":"Tag ID","type":"integer"},"value":{"$ref":"#/components/schemas/TagValue"}},"required":["id","value"],"title":"TagObject","type":"object"},"TagValue":{"additionalProperties":true,"description":"Dynamic value of a tag","properties":{"expandable":{"description":"Optional expandable flag","nullable":true,"type":"string"},"target_type":{"description":"Target resource type","type":"string"},"type":{"description":"Tag type","type":"string"}},"required":["target_type","type"],"title":"TagValue","type":"object"},"TdLmBadRequestResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmBadRequestResponse","type":"object"},"TdLmUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmUnauthorizedResponse","type":"object"},"TdLmForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmForbiddenResponse","type":"object"},"TdLmUnprocessableEntityResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmUnprocessableEntityResponse","type":"object"},"TdLmInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmInternalServerErrorResponse","type":"object"}}}}
```

## Search tags

> Search tags using filters in the request body.

```json
{"openapi":"3.0.0","info":{"title":"td-lm","version":"Truedat 8.8.0"},"paths":{"/api/tags/search":{"post":{"description":"Search tags using filters in the request body.","operationId":"TdLmWeb.TagController.search","parameters":[],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagSearchRequest"}}},"description":"Search filters","required":false},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagListResponse"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmUnauthorizedResponse"}}},"description":"Unauthorized"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Search tags","tags":["Tags"]}}},"components":{"schemas":{"TagSearchRequest":{"additionalProperties":false,"description":"Search filters for tags. Can filter by value fields (e.g., target_type).","properties":{"value":{"additionalProperties":true,"description":"Filter by tag value fields","type":"object"}},"title":"TagSearchRequest","type":"object"},"TagListResponse":{"additionalProperties":false,"properties":{"data":{"description":"List of tags","items":{"$ref":"#/components/schemas/TagObject"},"type":"array"}},"required":["data"],"title":"TagListResponse","type":"object"},"TagObject":{"additionalProperties":false,"properties":{"id":{"description":"Tag ID","type":"integer"},"value":{"$ref":"#/components/schemas/TagValue"}},"required":["id","value"],"title":"TagObject","type":"object"},"TagValue":{"additionalProperties":true,"description":"Dynamic value of a tag","properties":{"expandable":{"description":"Optional expandable flag","nullable":true,"type":"string"},"target_type":{"description":"Target resource type","type":"string"},"type":{"description":"Tag type","type":"string"}},"required":["target_type","type"],"title":"TagValue","type":"object"},"TdLmUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmUnauthorizedResponse","type":"object"},"TdLmInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmInternalServerErrorResponse","type":"object"}}}}
```

## Get a tag by ID

> Returns a single tag by its ID.

```json
{"openapi":"3.0.0","info":{"title":"td-lm","version":"Truedat 8.8.0"},"paths":{"/api/tags/{id}":{"get":{"description":"Returns a single tag by its ID.","operationId":"TdLmWeb.TagController.show","parameters":[{"description":"Tag ID","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagShowResponse"}}},"description":"OK"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Get a tag by ID","tags":["Tags"]}}},"components":{"schemas":{"TagShowResponse":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/TagObject"}},"required":["data"],"title":"TagShowResponse","type":"object"},"TagObject":{"additionalProperties":false,"properties":{"id":{"description":"Tag ID","type":"integer"},"value":{"$ref":"#/components/schemas/TagValue"}},"required":["id","value"],"title":"TagObject","type":"object"},"TagValue":{"additionalProperties":true,"description":"Dynamic value of a tag","properties":{"expandable":{"description":"Optional expandable flag","nullable":true,"type":"string"},"target_type":{"description":"Target resource type","type":"string"},"type":{"description":"Tag type","type":"string"}},"required":["target_type","type"],"title":"TagValue","type":"object"},"TdLmUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmUnauthorizedResponse","type":"object"},"TdLmForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmForbiddenResponse","type":"object"},"TdLmInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmInternalServerErrorResponse","type":"object"}}}}
```

## Update a tag

> Updates an existing tag with new data.

```json
{"openapi":"3.0.0","info":{"title":"td-lm","version":"Truedat 8.8.0"},"paths":{"/api/tags/{id}":{"put":{"description":"Updates an existing tag with new data.","operationId":"TdLmWeb.TagController.update","parameters":[{"description":"Tag ID","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagRequest"}}},"description":"Tag data","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagShowResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmBadRequestResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmForbiddenResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmUnprocessableEntityResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Update a tag","tags":["Tags"]}}},"components":{"schemas":{"TagRequest":{"additionalProperties":false,"properties":{"tag":{"additionalProperties":false,"description":"Tag data","properties":{"value":{"additionalProperties":true,"description":"Dynamic value of the tag","properties":{"expandable":{"description":"Optional expandable flag","nullable":true,"type":"string"},"target_type":{"description":"Target resource type","type":"string"},"type":{"description":"Tag type","type":"string"}},"required":["target_type","type"],"type":"object"}},"required":["value"],"type":"object"}},"required":["tag"],"title":"TagRequest","type":"object"},"TagShowResponse":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/TagObject"}},"required":["data"],"title":"TagShowResponse","type":"object"},"TagObject":{"additionalProperties":false,"properties":{"id":{"description":"Tag ID","type":"integer"},"value":{"$ref":"#/components/schemas/TagValue"}},"required":["id","value"],"title":"TagObject","type":"object"},"TagValue":{"additionalProperties":true,"description":"Dynamic value of a tag","properties":{"expandable":{"description":"Optional expandable flag","nullable":true,"type":"string"},"target_type":{"description":"Target resource type","type":"string"},"type":{"description":"Tag type","type":"string"}},"required":["target_type","type"],"title":"TagValue","type":"object"},"TdLmBadRequestResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmBadRequestResponse","type":"object"},"TdLmUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmUnauthorizedResponse","type":"object"},"TdLmForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmForbiddenResponse","type":"object"},"TdLmUnprocessableEntityResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmUnprocessableEntityResponse","type":"object"},"TdLmInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmInternalServerErrorResponse","type":"object"}}}}
```

## Delete a tag

> Permanently deletes a tag.

```json
{"openapi":"3.0.0","info":{"title":"td-lm","version":"Truedat 8.8.0"},"paths":{"/api/tags/{id}":{"delete":{"description":"Permanently deletes a tag.","operationId":"TdLmWeb.TagController.delete","parameters":[{"description":"Tag ID","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Tag deleted"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmForbiddenResponse"}}},"description":"Forbidden"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Delete a tag","tags":["Tags"]}}},"components":{"schemas":{"TdLmUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmUnauthorizedResponse","type":"object"},"TdLmForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmForbiddenResponse","type":"object"},"TdLmInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmInternalServerErrorResponse","type":"object"}}}}
```

## Update a tag

> Updates an existing tag with new data.

```json
{"openapi":"3.0.0","info":{"title":"td-lm","version":"Truedat 8.8.0"},"paths":{"/api/tags/{id}":{"patch":{"description":"Updates an existing tag with new data.","operationId":"TdLmWeb.TagController.update (2)","parameters":[{"description":"Tag ID","in":"path","name":"id","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagRequest"}}},"description":"Tag data","required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagShowResponse"}}},"description":"OK"},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmBadRequestResponse"}}},"description":"Bad Request"},"401":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmUnauthorizedResponse"}}},"description":"Unauthorized"},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmForbiddenResponse"}}},"description":"Forbidden"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmUnprocessableEntityResponse"}}},"description":"Unprocessable Entity"},"500":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TdLmInternalServerErrorResponse"}}},"description":"Internal Server Error"}},"summary":"Update a tag","tags":["Tags"]}}},"components":{"schemas":{"TagRequest":{"additionalProperties":false,"properties":{"tag":{"additionalProperties":false,"description":"Tag data","properties":{"value":{"additionalProperties":true,"description":"Dynamic value of the tag","properties":{"expandable":{"description":"Optional expandable flag","nullable":true,"type":"string"},"target_type":{"description":"Target resource type","type":"string"},"type":{"description":"Tag type","type":"string"}},"required":["target_type","type"],"type":"object"}},"required":["value"],"type":"object"}},"required":["tag"],"title":"TagRequest","type":"object"},"TagShowResponse":{"additionalProperties":false,"properties":{"data":{"$ref":"#/components/schemas/TagObject"}},"required":["data"],"title":"TagShowResponse","type":"object"},"TagObject":{"additionalProperties":false,"properties":{"id":{"description":"Tag ID","type":"integer"},"value":{"$ref":"#/components/schemas/TagValue"}},"required":["id","value"],"title":"TagObject","type":"object"},"TagValue":{"additionalProperties":true,"description":"Dynamic value of a tag","properties":{"expandable":{"description":"Optional expandable flag","nullable":true,"type":"string"},"target_type":{"description":"Target resource type","type":"string"},"type":{"description":"Tag type","type":"string"}},"required":["target_type","type"],"title":"TagValue","type":"object"},"TdLmBadRequestResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmBadRequestResponse","type":"object"},"TdLmUnauthorizedResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmUnauthorizedResponse","type":"object"},"TdLmForbiddenResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmForbiddenResponse","type":"object"},"TdLmUnprocessableEntityResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmUnprocessableEntityResponse","type":"object"},"TdLmInternalServerErrorResponse":{"properties":{"errors":{"properties":{"detail":{"type":"string"}},"type":"object"}},"title":"TdLmInternalServerErrorResponse","type":"object"}}}}
```
