# Material tags

## Get all tags

> The API gives the ability to get all material tags. It is possible to filter tags by name using the 'name' query parameter.

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PublicMaterialTagDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the material tag"},"name":{"type":"string","description":"Name of the material tag"},"color":{"type":"string","description":"Color code for the tag (hex format)"},"created_at":{"type":"string","description":"Timestamp when the tag was created","format":"date-time"},"updated_at":{"type":"string","nullable":true,"description":"Timestamp when the tag was last updated","format":"date-time"}},"required":["id","name","color","created_at"]}}},"paths":{"/api/v1/public/material-tags":{"get":{"description":"The API gives the ability to get all material tags. It is possible to filter tags by name using the 'name' query parameter.","operationId":"PublicMaterialTagController_getAll_v1","parameters":[{"name":"name","required":false,"in":"query","description":"Tag name","schema":{"type":"string"}},{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PublicMaterialTagDto"}}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"Get all tags","tags":["Material tags"]}}}}
```

## Create tag

> The API gives the ability to create a new material tag.

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PublicMaterialTagCreateDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the material tag"},"color":{"type":"string","description":"Color code for the tag (hex format)"}},"required":["name","color"]},"PublicMaterialTagDto":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Unique identifier of the material tag"},"name":{"type":"string","description":"Name of the material tag"},"color":{"type":"string","description":"Color code for the tag (hex format)"},"created_at":{"type":"string","description":"Timestamp when the tag was created","format":"date-time"},"updated_at":{"type":"string","nullable":true,"description":"Timestamp when the tag was last updated","format":"date-time"}},"required":["id","name","color","created_at"]}}},"paths":{"/api/v1/public/material-tags":{"post":{"description":"The API gives the ability to create a new material tag.","operationId":"PublicMaterialTagController_create_v1","parameters":[{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicMaterialTagCreateDto"}}}},"responses":{"201":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicMaterialTagDto"}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"Create tag","tags":["Material tags"]}}}}
```

## Delete a tag

> The API gives the ability to delete an existing material tag.

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"MessageDto":{"type":"object","properties":{"message":{"type":"string","description":"Message returned from API confirming the operation"}},"required":["message"]}}},"paths":{"/api/v1/public/material-tags/{tag_id}":{"delete":{"description":"The API gives the ability to delete an existing material tag.","operationId":"PublicMaterialTagController_delete_v1","parameters":[{"name":"tag_id","required":true,"in":"path","description":"Tag ID","schema":{"type":"string"}},{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageDto"}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"Delete a tag","tags":["Material tags"]}}}}
```

## Update tag

> The API gives the ability to update an existing material tag.

```json
{"openapi":"3.0.0","info":{"title":"Public API","version":"1.0"},"security":[{"PublicApiKey":[]}],"components":{"securitySchemes":{"PublicApiKey":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PublicMaterialTagUpdateDto":{"type":"object","properties":{"name":{"type":"string","description":"Name of the material tag"},"color":{"type":"string","description":"Color code for the tag (hex format)"}}},"MessageDto":{"type":"object","properties":{"message":{"type":"string","description":"Message returned from API confirming the operation"}},"required":["message"]}}},"paths":{"/api/v1/public/material-tags/{tag_id}":{"patch":{"description":"The API gives the ability to update an existing material tag.","operationId":"PublicMaterialTagController_update_v1","parameters":[{"name":"tag_id","required":true,"in":"path","description":"Tag ID","schema":{"type":"string"}},{"name":"x-tenant-id","in":"header","description":"Tenant id (uuid v4)","required":false,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicMaterialTagUpdateDto"}}}},"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageDto"}}}},"429":{"description":"Returned when the rate limit is exceeded","headers":{"X-RateLimit-Limit":{"description":"Maximum number of allowed requests during the current window","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Remaining number of requests before throttling occurs","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Number of seconds until the rate limit window resets","schema":{"type":"integer"}}}}},"summary":"Update tag","tags":["Material tags"]}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hesh.app/manuals/public-api/material-tags.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
