:::endpoint POST /v1/admin/ticket-tags

A new label for the firm's [ticket tags](/docs/api/admin/ticket-tags).

Needs a firm. Our own staff name one with the `Propper-Workspace` header.

## Request

| Field   | Description |
| ------- | ----------- |
| `name`  | Up to 50 characters, unique within the firm. Required |
| `color` | `gray`, `red`, `orange`, `amber`, `emerald`, `cyan`, `blue`, `violet` or `pink`. Required |

```bash
curl -X POST "https://api.proppertrading.com/v1/admin/ticket-tags" \
  -H "Authorization: Bearer ptat_9f2c1a44_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f" \
  -H "Propper-Workspace: acme" \
  -H "Idempotency-Key: 1f3a5c7e-9b1d-4f3a-8c5e-7b9d1f3a5c7e" \
  -H "Content-Type: application/json" \
  -d '{"name": "Escalated", "color": "red"}'
```

## Response

`201`, with the tag:

```json
{
    "data": {
        "object": "ticket_tag",
        "id": "ttag_374cq5mcvhpn3rd5",
        "name": "Escalated",
        "color": "red",
        "count": 0
    },
    "meta": {
        "request_id": "req_01m50v0trp2w6yhccerd58arrg"
    }
}
```

## Errors

| Status | Code                      | Meaning                                                                         |
| ------ | ------------------------- | ------------------------------------------------------------------------------- |
| 400    | `workspace_required`      | Asked by our own staff without naming a firm                                    |
| 400    | `missing_idempotency_key` | A POST without an `Idempotency-Key` header                                      |
| 401    | `invalid_token`           | Not a token, or the secret does not match                                       |
| 401    | `revoked_token`           | Signed out here or from another device                                          |
| 401    | `expired_token`           | Ninety days without use, or a set expiry passed                                 |
| 403    | `admin_access_required`   | This account no longer helps run the environment                                |
| 403    | `insufficient_scope`      | This device does not hold `admin:write`                                         |
| 403    | `workspace_not_permitted` | The `Propper-Workspace` header names an environment this account cannot act in |
| 403    | `forbidden`               | Without `manage_tickets`                                                        |
| 422    | `validation_failed`       | No `name`, a name the firm already has, or an unknown `color`                   |