# POST /v2/stream/ticket

Group: WebSocket

Mint a single-use connection ticket, valid for 30 seconds. Authenticated, rate-limited and counted like any other /v2 call. No request body.

Plans: Business only (other plans get 403 ws_not_available on the ticket).

## Response

- `data`: `{ ticket: string; url: string; expiresInSeconds: number }`

## Errors

- 403 ws_not_available — your plan has no WebSocket access

Plus the common errors (https://sportsapi.app/markdown/en/docs.md#errors).

## Request

cURL:

```bash
curl -X POST -H "Authorization: Bearer sk_live_…" \
    "https://api.sportsapi.app/v2/stream/ticket"
```

## Example response

```json
$ curl -X POST -H "Authorization: Bearer sk_live_…" https://api.sportsapi.app/v2/stream/ticket

{ "data": { "ticket": "8373e1…", "url": "wss://api.sportsapi.app/?ticket=8373e1…", "expiresInSeconds": 30 } }
```

---

Base URL: https://api.sportsapi.app. Send your API key as `Authorization: Bearer <key>` on every /v2 request; keys are created in the dashboard (https://sportsapi.app/dashboard).
HTML: https://sportsapi.app/docs/websocket/stream-ticket · All docs: https://sportsapi.app/markdown/en/docs.md
