Every REST endpoint with request params, response fields, and status codes. Matchmaking, bot games, presence and spectating are NOT here — they are socket messages (see WebSocket wire).
Index
bash
# Base path: /v1 — all server-to-server, IP whitelist + X-Service-Auth header.# Every response uses the one envelope: { success, response, responseCode, data, error }.# On failure data is null and error = { errorCode: "#<status>", errorMessage }.
platform user id the token is minted for (opaque to the engine)
Response field
Type
Description
token
string
opaque session token — the client's socket credential for the whole login session
expiresAt
string (Y-m-d H:i:s.v)
token expiry; re-mint at the next login, not before
http
POST /v1/sessions
X-Service-Auth: <secret>
{ "userId": "user_123" }
# 201
{ "success": true, "response": "success", "responseCode": 201,
"data": { "token": "s_9f3c...", "expiresAt": "2026-07-21 11:00:00.000" } }
# FAILS CLOSED: refuses to serve when the service secret is unconfigured.# Minting again does not invalidate earlier tokens — the socket enforces one-per-user.
Tournaments
http
POST /v1/tournaments → 201 { data: { tournamentId } } · 422 unknown format
POST /v1/tournaments/{id}/join → 200 { data: null } · 409 already in a tournament
POST /v1/tournaments/{id}/withdraw → 200 { data: null } (forfeits remaining games)
POST /v1/tournaments/{id}/start → 200 { data: null } (close registration + begin)
GET /v1/tournaments → 200 tournaments still open for registration
GET /v1/tournaments/{id} → 200 config + standings + current round
The one endpoint the engine pulls — user detail + every rating category, at enqueue. Request carries no query parameters. The payload sits under a data envelope with snake_case keys (user_id); the engine unwraps it. Full behaviour in Platform setup.
Field
Type
Required
Default
Description
data.user_id
string
yes
—
echoed back (opaque to the engine)
data.username / avatar / title
string
—
omitted
display passthrough; username is placed on each match_found / game_state seat so clients render the opponent by name
400 malformed payload · 401/403 service auth failure · 404 not found · 409 conflict (e.g. already in a game/tournament) · 422 validation (unknown game type / format) · 503 engine or analysis not ready. Full handling advice: Errors & codes.