League: Moderation
Create A League Penalty
Issue a warning, match forfeit, or point deduction to a league team.
POST
Permission Required
This endpoint requires a league-operator API key bound to this league with thepenalties 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 issue a penalty. 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
Issues a warning, match-forfeit penalty, or point deduction to a league team. On success the response is{ "success": true, "penaltyId": "<id>", "timestamp": "<ISO 8601>" }.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
teamId | string | Yes | Team ID receiving the penalty. |
gameId | string | Yes | Game ID for the league penalty. |
type | string | Yes | Penalty type: POINT_DEDUCTION, MATCH_FORFEIT, or WARNING. |
reason | string | Yes | Reason for the penalty (1-500 characters). |
seasonId | string | No | League season ID the penalty applies to. |
value | number | No | Point value for POINT_DEDUCTION (integer, 1-1000). |
Authorizations
Send your API key as: Authorization: Bearer tb_
Path Parameters
League slug or Convex league ID.
Body
application/json
Creates a league team penalty.
Team ID receiving the penalty.
Minimum string length:
1Game ID for the league penalty.
Minimum string length:
1Penalty type.
Available options:
POINT_DEDUCTION, MATCH_FORFEIT, WARNING Reason for the penalty.
Required string length:
1 - 500Optional league season ID for the penalty.
Minimum string length:
1Point value for POINT_DEDUCTION (integer, 1-1000).
Required range:
x <= 1000