:::endpoint POST /v1/admin/payouts/{payout}/ticket

Open a ticket with the trader about this payout and link it. It starts
waiting on the trader, assigned to whoever opened it, and the assistant stays
off on it: a conversation about whether somebody gets paid is not one to hand
to a model by accident. The trader is told the way any reply tells them: the
bell, a toast, and an email when they are offline.

A trader has one open ticket at a time, so this is refused when they have
one; link that one instead. The [tab Ticket](/docs/api/admin/payout-ticket)
names it in `open_ticket`.

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

## Request

| Field     | Description |
| --------- | ----------- |
| `subject` | Up to 150 characters. Required. The website suggests "Your payout #5SWBWV" |
| `message` | The first message, up to 5000 characters. Required |

```bash
curl -X POST "https://api.proppertrading.com/v1/admin/payouts/po_pk2jjt25cw5swbwv/ticket" \
  -H "Authorization: Bearer ptat_9f2c1a44_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f" \
  -H "Propper-Workspace: acme" \
  -H "Idempotency-Key: 3c9e1f7a-2b4d-4e6f-8a1c-5d7b9e0f2a4c" \
  -H "Content-Type: application/json" \
  -d '{"subject": "Your payout #5SWBWV", "message": "Hi, we are checking your payout and will get back to you shortly."}'
```

## Response

`201`, with the [tab Ticket](/docs/api/admin/payout-ticket):

```json
{
    "data": {
        "object": "payout_ticket",
        "ticket": {
            "id": "tkt_6ssjvhjwbbdd4hpw",
            "subject": "Your payout #5SWBWV",
            "status": "awaiting_trader",
            "open": true,
            "priority": "normal",
            "assignee": "Ios Tester",
            "created_at": "2026-10-15T21:33:00+00:00",
            "last_message_at": "2026-10-15T21:33:00+00:00",
            "total": 1,
            "messages": [
                {
                    "id": "tmsg_phfqqynvxuq8neve",
                    "from": "admin",
                    "author": "Ios Tester",
                    "body": "Hi, we are checking your payout and will get back to you shortly.",
                    "image": false,
                    "internal": false,
                    "created_at": "2026-10-15T21:33:00+00:00"
                }
            ]
        },
        "trader_gone": false,
        "open_ticket": {
            "id": "tkt_6ssjvhjwbbdd4hpw",
            "subject": "Your payout #5SWBWV"
        }
    },
    "meta": {
        "request_id": "req_01m50qq5gyp2rma6v0612c8yng"
    }
}
```

## 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_payouts` and `manage_tickets`                                                                  |
| 404    | `resource_not_found`      | No payout with that id in this firm                                             |
| 409    | `trader_gone`             | The trader deleted their account, so there is nobody to write to                |
| 409    | `trader_has_open_ticket`  | The trader has an open ticket already                                           |
| 422    | `validation_failed`       | No `subject` or `message`, or one that is too long                              |