> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ticktock.bet/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> Interactive reference for the Ticktock CS2 API

## Overview

A single resource surface at `/cs2/v1/*` plus sport-agnostic introspection at `/v1/*`. Same URL for everyone — your scopes determine which fields come back. Future sports land at `/{sport}/v1/*`.

<Note>
  **Base URL:** `https://ticktock.bet` (apex) or `https://feed.ticktock.bet` (B2B subdomain). Both route to the same backend.
</Note>

## Authentication

```bash theme={null}
# REST
curl -H "X-API-Key: <your-key>" https://ticktock.bet/cs2/v1/matches

# WebSocket — browsers can't set headers on the upgrade, so the key rides as a query param
wscat -c "wss://ticktock.bet/cs2/v1/stream?api_key=<your-key>"
```

See [Authentication](/getting-started/authentication) for the full error model and rate-limit behaviour.

## Endpoint groups

| Group           | Endpoints                                                              | Minimum scope                                   |
| --------------- | ---------------------------------------------------------------------- | ----------------------------------------------- |
| **Matches**     | `/cs2/v1/matches[/{id}/{rounds,timeline,markets,settlements,summary}]` | `cs2:matches:list` / `:read`                    |
| **Markets**     | `/cs2/v1/markets/active`, `/cs2/v1/matches/{id}/markets`               | `cs2:markets:read`                              |
| **Settlements** | `/cs2/v1/settlements`, `/cs2/v1/matches/{id}/settlements`              | `cs2:markets:settlements`                       |
| **Tournaments** | `/cs2/v1/tournaments[/{id}]`                                           | `cs2:tournaments:list` / `:read`                |
| **Teams**       | `/cs2/v1/teams[/{id}]`                                                 | `cs2:teams:list` / `:read`                      |
| **Players**     | `/cs2/v1/players[/{id}]`                                               | `cs2:players:list` / `:read`                    |
| **Maps**        | `/cs2/v1/maps[/pool]`                                                  | `cs2:maps:read`                                 |
| **Stream (WS)** | `/cs2/v1/stream[/{match_id}]`                                          | `cs2:stream:matches` / `markets` / `scoreboard` |
| **Meta**        | `/v1/whoami`, `/v1/alive`, `/v1/sports`                                | any valid key                                   |

## Response envelope

|            | JSON                               | XML                                   |
| ---------- | ---------------------------------- | ------------------------------------- |
| Collection | `{ "data": [...], "meta": {...} }` | repeating elements rooted by resource |
| Single     | `{ "data": {...} }`                | resource element                      |
| Error      | `{ "detail": "..." }`              | feed-style `<error>` element          |

Every REST endpoint serves both JSON (default) and XML. Pass `Accept: application/xml` on any GET and the body comes back as XML on the same URL. The seven AMQP-feed endpoints (alive, whoami, matches list, match detail, summary, match-markets, descriptions) use hand-tuned envelopes byte-compatible with our [AMQP feed](/odds-feed/amqp); everything else uses a mechanical JSON→XML rendering. Full breakdown in [Scopes & Bundles → Content negotiation](/getting-started/scopes#content-negotiation).

## Live OpenAPI

The b2b-api service serves its own OpenAPI alongside this site:

* **Swagger UI**: `https://feed.ticktock.bet/docs`
* **OpenAPI JSON**: `https://feed.ticktock.bet/openapi.json`

(Both gated by `API_DOCS_PASSWORD` — ask your account manager.)
