Skip to main content
POST
/
leagues
/
{identifier}
/
seasons
curl -X POST https://teambattles.gg/api/v1/leagues/my-league/seasons \
  -H "Authorization: Bearer tb_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{}'
{
  "seasons": [
    {}
  ],
  "count": 123,
  "timestamp": "2023-11-07T05:31:56Z"
}
curl -X POST https://teambattles.gg/api/v1/leagues/my-league/seasons \
  -H "Authorization: Bearer tb_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{}'

Permission Required

This endpoint requires the leagues.league_public permission on your API key.

League Identifier

The {identifier} path parameter accepts the league slug - the URL-friendly league name (e.g., my-league).

What’s Returned

Returns all seasons for a specific league with optional filtering by game or status. Each season includes its name, status, start and end dates, and other metadata.

Request Body

ParameterTypeRequiredDescription
gameIdstringNoFilter seasons by a specific game ID
statusstringNoFilter seasons by status

Filtering Options

Game Filtering

Use gameId to filter seasons associated with a specific game.

Status Filtering

Use status to filter seasons by their current status (e.g., active, completed, upcoming).

Common Use Cases

Get All Seasons

{}

Get Active Seasons Only

{
	"status": "active"
}

Get Seasons for a Specific Game

{
	"gameId": "call_of_duty"
}

Authorizations

Authorization
string
header
required

API key authentication. Generate an API key from Settings > Developer in the TeamBattles app. Format: tb_xxxxxxxx...

Path Parameters

identifier
string
required

League slug

Body

application/json

Optional game and status filters

gameId
string

Filter seasons by a specific game ID

status
string

Filter seasons by status

Response

Successful response

seasons
object[]
count
integer

Number of seasons returned

timestamp
string<date-time>

Response timestamp (ISO 8601)