Documentation Index
Fetch the complete documentation index at: https://teambattles.gg/docs/llms.txt
Use this file to discover all available pages before exploring further.
Interactive Endpoints
Try out the API directly from the docs:User Matches
Retrieve matches where you’re on the roster
Team Matches
Retrieve matches for a specific team
Organization Matches
Retrieve matches for all teams in an organization
Twitch Global Badges
Access global Twitch badge data
Twitch Channel Badges
Access channel-specific Twitch badge data
Captain Score Endpoints
These endpoints allow team captains to submit and manage scores.| Method | Endpoint | Description | Permission |
|---|---|---|---|
POST | /matches/{matchId}/scores | Submit a map score | matches.team_matches: read-write |
PATCH | /matches/{matchId}/scores | Confirm opponent’s score | matches.team_matches: read-write |
GET | /matches/{matchId}/scores | Get all map scores | matches.team_matches: read |
Game Developer Endpoints
These endpoints are for approved game developers.Score Submission
| Method | Endpoint | Description | Permission |
|---|---|---|---|
POST | /game/matches/{matchId}/scores | Submit verified score | game.scores: write |
Match Lifecycle
| Method | Endpoint | Description | Permission |
|---|---|---|---|
POST | /game/matches | List matches (JSON body with gameId) | game.lifecycle: read |
GET | /game/matches/{matchId} | Get match details | game.lifecycle: read |
GET | /game/matches/{matchId}/rosters | Get match rosters | game.lifecycle: read |
GET | /game/matches/{matchId}/status | Get match status | game.lifecycle: read |
PATCH | /game/matches/{matchId}/status | Update match status | game.lifecycle: read-write |
Player Stats
| Method | Endpoint | Description | Permission |
|---|---|---|---|
POST | /game/matches/{matchId}/player-stats | Submit player stats for a map | game.scores: write |
Common Response Codes
| Status | Description |
|---|---|
200 | Success |
201 | Created |
400 | Bad request - invalid parameters |
401 | Unauthorized - missing or invalid API key |
403 | Forbidden - insufficient permissions |
404 | Resource not found |
409 | Conflict - duplicate or invalid state |
429 | Rate limited |
500 | Internal server error |
Error Format
All errors follow a consistent format:Pagination
The v1 API is mid-migration and currently exposes two pagination envelope shapes. Check each endpoint’s reference page for its exact response shape.Native envelope (match listing endpoints)
The three match listing endpoints use Convex’s native pagination envelope:POST /api/v1/user/matches- see User MatchesPOST /api/v1/teams/{teamId}/matches- see Team MatchesPOST /api/v1/orgs/{orgId}/matches- see Organization Matches
numItems (page size, default 25) and cursor (opaque string from the previous response, or omit/null for the first page).
Response shape: { page, isDone, continueCursor }. Iterate page for results, check isDone to know when you’ve reached the end, and pass continueCursor as cursor in the next request.
Legacy envelope (all other v1 endpoints)
Most remaining v1 paginated endpoints still wrap results in a legacy envelope:{ matches, pagination: { cursor, hasMore }, timestamp }. Pass cursor (and typically limit) in the request body to get the next page. This shape will be migrated to the native envelope in a follow-up release.