# Ticket tags

> Assign and remove tags from tickets.

Source: https://tickos.dev/docs/ticket-tags

Tags let you categorize tickets within an inbox. A ticket can have multiple tags. Tag ids start with tag_. The {id} path parameter is the ticket id; SUP- client ids are also accepted (see Tickets > Identifiers).

## GET /v1/tickets/{id}/tags -- List ticket tags

Permission: read. Returns all tags assigned to the ticket.

```json
{
  "data": [ { "id": "tag_7g8h...", "name": "Billing", "color": "#22c55e" } ],
  "count": 1
}
```

## POST /v1/tickets/{id}/tags -- Assign a tag

Permission: write. Body: { "tag_id": "tag_..." }. The tag must belong to an inbox of your workspace (404 otherwise). Returns 201 with { "success": true }, or 409 if the tag is already assigned. Triggers automation rules subscribed to tag_assigned.

```bash
curl https://api.tickos.dev/v1/tickets/{id}/tags \
  -H 'Authorization: Bearer sk_your_api_key' \
  -H 'Content-Type: application/json' \
  -d '{ "tag_id": "tag_7g8h..." }'
```

## DELETE /v1/tickets/{id}/tags -- Remove a tag

Permission: write. The tag is sent in the JSON request body: { "tag_id": "tag_..." } (400 if missing). Returns 200 with { "success": true }, also when the tag was not assigned to the ticket.

```bash
curl -X DELETE https://api.tickos.dev/v1/tickets/{id}/tags \
  -H 'Authorization: Bearer sk_your_api_key' \
  -H 'Content-Type: application/json' \
  -d '{ "tag_id": "tag_7g8h..." }'
```
