League Endpoints
Discover Leagues
Returns a paginated list of public leagues with optional search and game filtering. Requires API key with leagues.league_public permission.
POST
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.
Permission Required
This endpoint requires theleagues.league_public permission on your API key.
What’s Returned
Returns a paginated list of public leagues with optional search and game filtering. Each league includes its name, slug, description, status, and other public metadata.Filtering Options
Search
Use thesearch parameter to search leagues by name or description.
Game Filtering
UsegameId to filter leagues associated with a specific game.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
search | string | No | Search term to filter leagues by name |
gameId | string | No | Filter by game ID |
page | number | No | Page number, starting from 1 (default 1) |
limit | number | No | Results per page (1-50, default 12) |
Pagination
Results are paginated with a default of 12 leagues per page (maximum 50). Use thepage parameter to navigate through results.
The response includes a pagination object with page metadata.
Common Use Cases
Search for Leagues by Name
Filter by Game
Paginate Through All Leagues
Authorizations
API key authentication. Generate an API key from Settings > Developer in the TeamBattles app. Format: tb_xxxxxxxx...
Body
application/json
Optional search, game filter, and pagination options