:::endpoint POST /v1/admin/tickets/{ticket}/close

End the ticket without claiming the trader got their answer: a conversation
that went nowhere, a duplicate, a question somebody else answered. No line
goes into the thread. When the trader did get their answer,
[resolve](/docs/api/admin/ticket-resolve) it instead, because only resolved is
counted as answered.

Closed is final, like resolved, and never reopens: a trader with a new
question opens a new ticket. After it, the only change a ticket takes is its
[tags](/docs/api/admin/ticket-tags-set).

Answers with the [ticket](/docs/api/admin/ticket), now `closed`, with
`closed_at` and `closed_by` set.

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

## Request

```bash
curl -X POST "https://api.proppertrading.com/v1/admin/tickets/tkt_wm9qfkgsnpfhtzfj/close" \
  -H "Authorization: Bearer ptat_9f2c1a44_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f" \
  -H "Propper-Workspace: acme" \
  -H "Idempotency-Key: 5d7f9b1c-3e5a-4c7e-8b9d-1f3a5c7e9b0d"
```

## Response

The [ticket](/docs/api/admin/ticket), now `closed`.

## 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 `view_tickets` and `manage_tickets`                                     |
| 404    | `resource_not_found`      | No ticket with that id in this firm                                             |
| 409    | `ticket_ended`            | The ticket was already resolved or closed                                       |