> For the complete documentation index, see [llms.txt](https://glu.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://glu.gitbook.io/docs/api-reference/organisation-api/tag.md).

# Tag

Tags are assigned to contacts to help organize and segment them. Tags can be used to create targeted marketing campaigns, personalize communication, and gain insights into customer behavior. Each tag belongs to an organisation and has a name, some tags are system defined and cannot be modified or assigned manually.

## List all tags

> Returns a list of tags. The tags are returned in descending order by creation date.

```json
{"openapi":"3.1.0","info":{"title":"Glu","version":"1.0.0"},"tags":[{"name":"Tag","description":"Tags are assigned to contacts to help organize and segment them. Tags can be used to create targeted marketing campaigns, personalize communication, and gain insights into customer behavior. Each tag belongs to an organisation and has a name, some tags are system defined and cannot be modified or assigned manually."}],"servers":[{"url":"https://api.glu.io","description":"Production API"}],"security":[{"x_api_key":[]}],"components":{"securitySchemes":{"x_api_key":{"type":"apiKey","description":"Value for the x-api-key header parameter.","name":"x-api-key","in":"header"}},"schemas":{"Tag-tag.read":{"type":"object","description":"Tags are assigned to contacts to help organize and segment them. Tags can be used to create targeted marketing campaigns, personalize communication, and gain insights into customer behavior. Each tag belongs to an organisation and has a name, some tags are system defined and cannot be modified or assigned manually.","properties":{"id":{"readOnly":true,"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"name":{"type":"string"},"systemDefined":{"default":false,"type":"boolean"}},"required":["name"]},"Error.jsonld":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["integer","null"],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"},"description":{"readOnly":true,"type":["string","null"]}}},"Error":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["integer","null"],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"}}}}},"paths":{"/tags":{"get":{"operationId":"api_tags_get_collection","tags":["Tag"],"responses":{"200":{"description":"Tag collection","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Tag-tag.read"}}}}},"403":{"description":"Forbidden","content":{"application/ld+json":{"schema":{"$ref":"#/components/schemas/Error.jsonld"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"links":{}}},"summary":"List all tags","description":"Returns a list of tags. The tags are returned in descending order by creation date.","parameters":[{"name":"page","in":"query","description":"The collection page number","required":false,"deprecated":false,"schema":{"type":"integer","default":1},"style":"form","explode":true}]}}}}
```

## Retrieve a tag

> Retrieve a tag

```json
{"openapi":"3.1.0","info":{"title":"Glu","version":"1.0.0"},"tags":[{"name":"Tag","description":"Tags are assigned to contacts to help organize and segment them. Tags can be used to create targeted marketing campaigns, personalize communication, and gain insights into customer behavior. Each tag belongs to an organisation and has a name, some tags are system defined and cannot be modified or assigned manually."}],"servers":[{"url":"https://api.glu.io","description":"Production API"}],"security":[{"x_api_key":[]}],"components":{"securitySchemes":{"x_api_key":{"type":"apiKey","description":"Value for the x-api-key header parameter.","name":"x-api-key","in":"header"}},"schemas":{"Tag-tag.read":{"type":"object","description":"Tags are assigned to contacts to help organize and segment them. Tags can be used to create targeted marketing campaigns, personalize communication, and gain insights into customer behavior. Each tag belongs to an organisation and has a name, some tags are system defined and cannot be modified or assigned manually.","properties":{"id":{"readOnly":true,"type":"integer"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"name":{"type":"string"},"systemDefined":{"default":false,"type":"boolean"}},"required":["name"]},"Error.jsonld":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["integer","null"],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"},"description":{"readOnly":true,"type":["string","null"]}}},"Error":{"type":"object","description":"A representation of common errors.","properties":{"title":{"readOnly":true,"description":"A short, human-readable summary of the problem.","type":["string","null"]},"detail":{"readOnly":true,"description":"A human-readable explanation specific to this occurrence of the problem.","type":["string","null"]},"status":{"type":["integer","null"],"default":400},"instance":{"readOnly":true,"description":"A URI reference that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.","type":["string","null"]},"type":{"readOnly":true,"description":"A URI reference that identifies the problem type","type":"string"}}}}},"paths":{"/tags/{id}":{"get":{"operationId":"api_tags_id_get","tags":["Tag"],"responses":{"200":{"description":"Tag resource","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Tag-tag.read"}}}},"403":{"description":"Forbidden","content":{"application/ld+json":{"schema":{"$ref":"#/components/schemas/Error.jsonld"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"links":{}},"404":{"description":"Not found","content":{"application/ld+json":{"schema":{"$ref":"#/components/schemas/Error.jsonld"}},"application/problem+json":{"schema":{"$ref":"#/components/schemas/Error"}},"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"links":{}}},"summary":"Retrieve a tag","description":"Retrieve a tag","parameters":[{"name":"id","in":"path","description":"Tag identifier","required":true,"deprecated":false,"schema":{"type":"string"},"style":"simple","explode":false}]}}}}
```
