:::endpoint GET /v1/admin/tickets/options

Who and what a ticket can be given: the firm's agents, its
[support teams](/docs/api/admin/support-teams) with their members, and its
[ticket tags](/docs/api/admin/ticket-tags) with how many tickets carry each.
The filter menu of the [list](/docs/api/admin/tickets) and the pickers of
[assign](/docs/api/admin/ticket-assign) and [tag](/docs/api/admin/ticket-tags-set)
all read these. A firm has a handful of each, so everything comes in one answer.

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

## Request

```bash
curl "https://api.proppertrading.com/v1/admin/tickets/options" \
  -H "Authorization: Bearer ptat_9f2c1a44_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f" \
  -H "Propper-Workspace: acme"
```

## Response

```json
{
    "data": {
        "object": "ticket_options",
        "agents": [
            {
                "id": "usr_j6kqhf86ecs4v9hk",
                "name": "Alison Koss",
                "avatar_url": null,
                "me": false
            },
            {
                "id": "usr_pj68ba8tmrbb7fxb",
                "name": "Ios Tester",
                "avatar_url": null,
                "me": true
            }
        ],
        "teams": [
            {
                "id": "team_cmhg8847tuqg3mq6",
                "name": "Payouts desk",
                "members": [
                    {
                        "id": "usr_pj68ba8tmrbb7fxb",
                        "name": "Ios Tester"
                    }
                ],
                "open": 1,
                "mine": true
            }
        ],
        "tags": [
            {
                "id": "ttag_kr5xp9kr8ykuz5mr",
                "name": "Billing",
                "color": "amber",
                "count": 0
            },
            {
                "id": "ttag_6fjgbatb6fxzafc8",
                "name": "Payout",
                "color": "emerald",
                "count": 17
            }
        ]
    },
    "meta": {
        "request_id": "req_01m50ttwzzq3gpmdh3qvmp8vcx"
    }
}
```

| Field          | Description |
| -------------- | ----------- |
| `agents`       | The firm's own account and everybody on its team, active ones only, by name. `me` marks you |
| `teams`        | Every team by name, with its `members`, the tickets it holds that are `open`, and whether you are on it (`mine`) |
| `tags`         | Every tag by name, with its `color` and how many tickets carry it (`count`) |

## Errors

| Status | Code                      | Meaning                                                                         |
| ------ | ------------------------- | ------------------------------------------------------------------------------- |
| 400    | `workspace_required`      | Asked by our own staff without naming a firm                                    |
| 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:read`                                          |
| 403    | `workspace_not_permitted` | The `Propper-Workspace` header names an environment this account cannot act in |
| 403    | `forbidden`               | Without `view_tickets`                                                          |