Tournaments API
The Tournaments API allows creating competitive events on community maps.
Endpoints
Section titled “Endpoints”GET /tournaments
Section titled “GET /tournaments”List tournaments with optional filtering.
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
page | number | Page number (default: 1) |
limit | number | Results per page (default: 20) |
status | string | Filter by status: upcoming, active, completed |
map | string | Filter by map ID |
Response:
{ "tournaments": [ { "id": "tournament-uuid", "name": "Weekly Arena", "map": { "id": "map-uuid", "name": "Arena v2" }, "organizer": { "id": "user-uuid", "username": "player1" }, "status": "upcoming", "startsAt": "2026-03-15T18:00:00Z", "maxPlayers": 32, "playerCount": 12 } ], "total": 5, "page": 1, "limit": 20}GET /tournaments/:id
Section titled “GET /tournaments/:id”Get tournament details including participants and results.
POST /tournaments
Section titled “POST /tournaments”Create a new tournament. Requires authentication.
Request Body:
{ "name": "Weekly Arena", "mapId": "map-uuid", "startsAt": "2026-03-15T18:00:00Z", "maxPlayers": 32, "description": "Weekly competitive match on Arena v2"}POST /tournaments/:id/join
Section titled “POST /tournaments/:id/join”Join a tournament. Requires authentication.
Response:
{ "message": "Joined tournament", "playerCount": 13}POST /tournaments/:id/leave
Section titled “POST /tournaments/:id/leave”Leave a tournament before it starts.
PUT /tournaments/:id
Section titled “PUT /tournaments/:id”Update tournament details. Only the organizer can update.
DELETE /tournaments/:id
Section titled “DELETE /tournaments/:id”Cancel a tournament. Only the organizer can cancel.
Tournament Lifecycle
Section titled “Tournament Lifecycle”- Upcoming — Tournament is created, players can join
- Active — Tournament has started, matches are in progress
- Completed — All matches finished, results are final
Tournaments automatically transition from upcoming to active at the scheduled start time.