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

Permission Required

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

Membership Required

You must have a MEMBER or higher role in the league, or be a TeamBattles staff member, to access league staff members. 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 the list of staff members for a specific league. Each member includes their user information and role within the league.
This is an admin endpoint. Unlike the public endpoints (discover, profile, standings, seasons, rules), this endpoint requires the leagues.league_admin permission and league membership.

Request Body

This endpoint does not require any request body parameters. An empty JSON body {} or no body is accepted.

Common Use Cases

List All Staff Members

curl -X POST https://teambattles.gg/api/v1/leagues/my-league/members \
  -H "Authorization: Bearer tb_your_api_key"

Check Staff Roles

const { members } = await response.json();

const owners = members.filter((m) => m.role === "OWNER");
const managers = members.filter((m) => m.role === "MANAGER");

console.log(`${owners.length} owners, ${managers.length} managers`);

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

Response

Successful response

members
object[]
count
integer

Number of members returned

timestamp
string<date-time>

Response timestamp (ISO 8601)