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

Permission Required

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

Membership Required

You must have a MANAGER or higher role in the league, or be a TeamBattles staff member, to access league bans. If you lack the required access, you’ll receive a 403 error.

League Identifier

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

What’s Returned

Returns team bans for a specific league. Each ban includes the team information, reason, ban duration, and current status.
This is an admin endpoint. Unlike the public endpoints (discover, profile, standings, seasons, rules), this endpoint requires the leagues.league_admin permission and MANAGER+ league role.

Request Body

ParameterTypeRequiredDescription
statusstringNoFilter by ban status: active, expired, revoked, or all

Ban Statuses

StatusDescription
activeBan is currently in effect
expiredBan has passed its expiration date
revokedBan was manually revoked by staff
allReturns bans of all statuses

Common Use Cases

Get Active Bans

{
	"status": "active"
}

Get All Bans (Including Expired)

{
	"status": "all"
}

Get Revoked Bans

{
	"status": "revoked"
}

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 status filter

status
enum<string>

Filter by ban status

Available options:
active,
expired,
revoked,
all

Response

Successful response

bans
object[]
count
integer

Number of bans returned

timestamp
string<date-time>

Response timestamp (ISO 8601)