League: Moderation
Create A League Team Ban
Ban a team from a league you operate.
POST
Permission Required
This endpoint requires a league-operator API key bound to this league with thebans league capability, plus the leagueOperatorApi plan feature (api_pro or higher). A free key receives 403 error_api_feature_required.
Access / Membership Rules
You must have a MANAGER or higher role in the league (or be a TeamBattles staff member) to ban a team. If you lack the required access, you’ll receive a403 error.
The {identifier} path parameter is the league slug - the URL-friendly league name (e.g., my-league).
What’s Returned
Bans a team from the league and removes it from active and pending league participation. On success the response is{ "success": true, "banId": "<id>", "timestamp": "<ISO 8601>" }.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | Team ID to ban from the league. |
reason | string | Yes | Reason for the ban (1-500 characters). |
isPermanent | boolean | Yes | Whether the ban never expires. |
expiresAt | number | No | Expiration timestamp for temporary bans, in epoch milliseconds. |
Authorizations
Send your API key as: Authorization: Bearer tb_
Path Parameters
League slug or Convex league ID.
Body
application/json
Creates a league team ban.