{ "openapi": "3.1.0", "info": { "title": "TeamBattles API", "version": "0.1.0", "description": "Public developer API for TeamBattles. Authenticate with an API key: Authorization: Bearer tb_." }, "servers": [ { "url": "https://teambattles.gg/api/v1", "description": "Production" } ], "paths": { "/game/matches": { "post": { "operationId": "listGameMatches", "tags": [ "Game" ], "summary": "List matches for the developer's approved game", "description": "Returns matches for the API key owner's approved (bound) game, with legacy cursor pagination. Requires the game.lifecycle:read permission.", "security": [ { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ListGameMatchesBody" } } } }, "responses": { "200": { "description": "Legacy cursor-paginated result. pagination.cursor is null when there are no more pages.", "content": { "application/json": { "schema": { "type": "object", "properties": { "matches": { "type": "array", "items": { "$ref": "#/components/schemas/GameMatch" } }, "count": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "pagination": { "type": "object", "properties": { "cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "hasMore": { "type": "boolean" } }, "required": [ "cursor", "hasMore" ], "additionalProperties": false }, "timestamp": { "type": "string" } }, "required": [ "matches", "count", "pagination", "timestamp" ], "additionalProperties": false } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/game/matches/{matchId}": { "get": { "operationId": "getGameMatch", "tags": [ "Game" ], "summary": "Get a single match's details", "description": "Returns detailed info for one match, validated to belong to the API key owner's approved game. Requires the game.lifecycle:read permission.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "matchId", "schema": { "type": "string", "description": "Match ID." }, "required": true, "description": "Match ID." } ], "responses": { "200": { "description": "The requested match plus a response timestamp.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameMatchDetailResponse" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/game/matches/{matchId}/forfeit": { "post": { "operationId": "forfeitGameMatch", "tags": [ "Game" ], "summary": "Forfeit a match on behalf of one participating team", "description": "Forfeits the match for the supplied team; the other participating team wins. Valid only while the match is ACCEPTED, READY, or IN_PROGRESS. Requires the game.lifecycle:read-write permission and a key bound to the match's game. Supports an optional `Idempotency-Key` request header: a retry with the same key and body replays the original response, while the same key with a different body returns 409 error_idempotency_key_conflict.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "matchId", "schema": { "type": "string", "description": "Match ID." }, "required": true, "description": "Match ID." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameForfeitBody" } } } }, "responses": { "200": { "description": "The match was forfeited successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameForfeitResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "409": { "description": "Conflict.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/game/matches/{matchId}/player-stats": { "post": { "operationId": "submitGamePlayerStats", "tags": [ "Game" ], "summary": "Submit or update player stats for a map", "description": "Sets per-player stats on an existing map score for the given mapIndex. Requires the game.scores:write permission.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "matchId", "schema": { "type": "string", "description": "Match ID." }, "required": true, "description": "Match ID." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GamePlayerStatsBody" } } } }, "responses": { "200": { "description": "The player stats were updated.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GamePlayerStatsResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/game/matches/{matchId}/rosters": { "get": { "operationId": "getGameMatchRosters", "tags": [ "Game" ], "summary": "Get a match's team rosters", "description": "Returns the creator and accepted team rosters for a match, validated to belong to the API key owner's approved game. Requires the game.lifecycle:read permission.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "matchId", "schema": { "type": "string", "description": "Match ID." }, "required": true, "description": "Match ID." } ], "responses": { "200": { "description": "Team rosters grouped by creator and accepted team.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameMatchRostersResponse" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/game/matches/{matchId}/scores": { "get": { "operationId": "getGameScores", "tags": [ "Game" ], "summary": "Read all map scores for a match", "description": "Returns every recorded map score plus the aggregate series tally. Requires the game.scores:write OR game.lifecycle:read permission.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "matchId", "schema": { "type": "string", "description": "Match ID." }, "required": true, "description": "Match ID." } ], "responses": { "200": { "description": "All map scores plus the aggregate series tally.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameScoresResponse" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "post": { "operationId": "submitGameScores", "tags": [ "Game" ], "summary": "Submit map scores in a batch", "description": "Submits scores for one or more maps; game-developer scores are auto-confirmed. Requires the game.scores:write permission.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "matchId", "schema": { "type": "string", "description": "Match ID." }, "required": true, "description": "Match ID." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameBatchScoresBody" } } } }, "responses": { "200": { "description": "Per-map submission results. success is true only when every map was confirmed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameBatchScoresResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/game/matches/{matchId}/scores/{mapIndex}": { "post": { "operationId": "submitGameMapScore", "tags": [ "Game" ], "summary": "Submit a single map's score", "description": "Submits the score for one map (mapIndex from the path); game-developer scores are auto-confirmed. Requires the game.scores:write permission.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "matchId", "schema": { "type": "string", "description": "Match ID." }, "required": true, "description": "Match ID." }, { "in": "path", "name": "mapIndex", "schema": { "type": "string", "description": "Zero-based index of the map within the series." }, "required": true, "description": "Zero-based index of the map within the series." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameSingleMapScoreBody" } } } }, "responses": { "200": { "description": "The map score was submitted and confirmed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameSingleMapScoreResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/game/matches/{matchId}/status": { "patch": { "operationId": "updateGameMatchStatus", "tags": [ "Game" ], "summary": "Update a match's lifecycle status", "description": "Transitions a match between lifecycle states (validated against allowed transitions). Requires the game.lifecycle:read-write permission.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "matchId", "schema": { "type": "string", "description": "Match ID." }, "required": true, "description": "Match ID." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameStatusUpdateBody" } } } }, "responses": { "200": { "description": "The match status was transitioned successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameStatusUpdateResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "409": { "description": "Conflict.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/game/matches/batch-scores": { "post": { "operationId": "submitGameBatchMatchScores", "tags": [ "Game" ], "summary": "Submit map scores across multiple matches in one call", "description": "Submits map scores for up to 50 (match, map) items in a single request. Each item is independently scope-checked against the key's bound game; an off-scope or otherwise failing item is rejected in its per-item envelope (status \"failed\", error = bare error_* code) WITHOUT failing the whole request. The response is ALWAYS HTTP 200 - inspect per-item status. Requires the game.scores:write permission. Score submission is naturally idempotent: an unconfirmed map is overwritten on re-submit and an already-confirmed map returns a per-item error_score_already_submitted_by_game, so a retried batch is safe without an Idempotency-Key.", "security": [ { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameBatchMatchScoresBody" } } } }, "responses": { "200": { "description": "Per-item submission results. success is true only when every item was confirmed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameBatchMatchScoresResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/game/matches/create": { "post": { "operationId": "createGameMatch", "tags": [ "Game" ], "summary": "Create a two-sided game-originated match", "description": "Creates an ACCEPTED + PUBLISHED match for the API key's bound game between two active teams in that game. Requires the game.lifecycle:read-write permission. Supply an optional `Idempotency-Key` request header to make retries safe: an identical key + body replays the original response, while the same key with a different body returns 409 error_idempotency_key_conflict.", "security": [ { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameCreateMatchBody" } } } }, "responses": { "200": { "description": "The created match's ID.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameCreateMatchResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "409": { "description": "Conflict.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/games": { "get": { "operationId": "listGames", "tags": [ "Games" ], "summary": "List public game catalog entries", "description": "Returns the static public game catalog and objective definitions. Requires a valid API key, but no additional permission scope.", "security": [ { "ApiKeyAuth": [] } ], "responses": { "200": { "description": "Public game catalog.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiGameCatalogResponse" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/games/{id}/playlists": { "get": { "operationId": "listGamePlaylists", "tags": [ "Games" ], "summary": "List playlists for a game", "description": "Returns playlists from the static public game definition for the requested game ID. Playlist IDs are game-scoped, so shared slugs such as standard are not resolved globally.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string", "description": "Static public game ID/slug." }, "required": true, "description": "Static public game ID/slug." } ], "responses": { "200": { "description": "Public game playlist list.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiGamePlaylistsResponse" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leaderboards/organizations": { "get": { "operationId": "listOrganizationLeaderboard", "tags": [ "Leaderboards" ], "summary": "List organization leaderboard", "description": "Returns active, public, non-disabled organizations ranked from active, enabled, non-private team stats. Requires orgs.profile:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "query", "name": "sortBy", "schema": { "$ref": "#/components/schemas/LeaderboardSortBy" } }, { "in": "query", "name": "limit", "schema": { "type": "integer", "minimum": 1, "maximum": 100 } }, { "in": "query", "name": "gameSlug", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Organization leaderboard.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OrganizationLeaderboardResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leaderboards/organizations/{identifier}/rank": { "get": { "operationId": "getOrganizationLeaderboardRank", "tags": [ "Leaderboards" ], "summary": "Get an organization's leaderboard rank", "description": "Returns an organization's rank for the requested leaderboard filters. Organization stats are computed from active, enabled, non-private teams. Requires orgs.profile:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "Organization slug or Convex organization ID." }, "required": true, "description": "Organization slug or Convex organization ID." }, { "in": "query", "name": "sortBy", "schema": { "$ref": "#/components/schemas/LeaderboardSortBy" } }, { "in": "query", "name": "gameSlug", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Organization rank.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeaderboardRankResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leaderboards/players": { "get": { "operationId": "listPlayerLeaderboard", "tags": [ "Leaderboards" ], "summary": "List player leaderboard", "description": "Returns the global player leaderboard. gameSlug is rejected because player stats are global. Requires users.profile:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "query", "name": "sortBy", "schema": { "$ref": "#/components/schemas/LeaderboardSortBy" } }, { "in": "query", "name": "limit", "schema": { "type": "integer", "minimum": 1, "maximum": 100 } } ], "responses": { "200": { "description": "Player leaderboard.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PlayerLeaderboardResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leaderboards/players/me/rank": { "get": { "operationId": "getPlayerLeaderboardRank", "tags": [ "Leaderboards" ], "summary": "Get the API key owner's player rank", "description": "Returns the API key owner's rank in the global player leaderboard. gameSlug is not supported. Requires users.profile:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "query", "name": "sortBy", "schema": { "$ref": "#/components/schemas/LeaderboardSortBy" } } ], "responses": { "200": { "description": "Player rank.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeaderboardRankResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leaderboards/teams": { "get": { "operationId": "listTeamLeaderboard", "tags": [ "Leaderboards" ], "summary": "List team leaderboard", "description": "Returns active, non-disabled, non-private teams ranked by the requested stat. Requires teams.profile:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "query", "name": "sortBy", "schema": { "$ref": "#/components/schemas/LeaderboardSortBy" } }, { "in": "query", "name": "limit", "schema": { "type": "integer", "minimum": 1, "maximum": 100 } }, { "in": "query", "name": "gameSlug", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Team leaderboard.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TeamLeaderboardResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leaderboards/teams/{identifier}/rank": { "get": { "operationId": "getTeamLeaderboardRank", "tags": [ "Leaderboards" ], "summary": "Get a team's leaderboard rank", "description": "Returns a team's rank for the requested leaderboard filters. Private teams return rank null unless they are otherwise excluded from the API leaderboard. Requires teams.profile:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "Team slug or Convex team ID." }, "required": true, "description": "Team slug or Convex team ID." }, { "in": "query", "name": "sortBy", "schema": { "$ref": "#/components/schemas/LeaderboardSortBy" } }, { "in": "query", "name": "gameSlug", "schema": { "type": "string" } } ], "responses": { "200": { "description": "Team rank.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeaderboardRankResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues": { "post": { "operationId": "discoverLeagues", "tags": [ "Leagues" ], "summary": "Discover public leagues", "description": "Returns a paginated list of public leagues with optional search and game filtering. Requires the leagues.league_public:read permission.", "security": [ { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DiscoverLeaguesRequestBody" } } } }, "responses": { "200": { "description": "Legacy offset-paginated result (page/limit based).", "content": { "application/json": { "schema": { "type": "object", "properties": { "leagues": { "type": "array", "items": { "$ref": "#/components/schemas/LeagueSummary" } }, "count": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "pagination": { "type": "object", "properties": { "page": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "limit": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "total": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "totalPages": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "page", "limit", "total", "totalPages" ], "additionalProperties": false }, "timestamp": { "type": "string" } }, "required": [ "leagues", "count", "pagination", "timestamp" ], "additionalProperties": false } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}": { "post": { "operationId": "getLeagueProfile", "tags": [ "Leagues" ], "summary": "Get a league profile", "description": "Returns the public profile for a single league, resolved by slug or Convex ID. Requires the leagues.league_public:read permission.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug or Convex league ID." }, "required": true, "description": "League slug or Convex league ID." } ], "responses": { "200": { "description": "The league profile.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueProfileResponse" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/apply-eligibility": { "post": { "operationId": "getLeagueApplyEligibility", "tags": [ "Leagues" ], "summary": "Get league application eligibility", "description": "Returns apply-to-join eligibility for the API key owner's applicable teams, or for a specified team the owner leads. Requires leagues.league_public:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug or Convex league ID." }, "required": true, "description": "League slug or Convex league ID." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueApplyEligibilityRequestBody" } } } }, "responses": { "200": { "description": "League application eligibility.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueApplyEligibility" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/bans": { "post": { "operationId": "getLeagueBans", "tags": [ "Leagues" ], "summary": "Get league team bans", "description": "Returns team bans for a league resolved by slug, with optional status filtering. The API key owner must have a MANAGER+ league role or be TeamBattles staff. Requires the leagues.league_admin:read permission.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug." }, "required": true, "description": "League slug." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BansRequestBody" } } } }, "responses": { "200": { "description": "Team bans for the league.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueBans" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/bans/{banId}/revoke": { "post": { "operationId": "revokeLeagueBan", "tags": [ "Leagues" ], "summary": "Revoke a league team ban", "description": "Revokes an active league team ban. Requires a league-operator key bound to the league and the league bans capability.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug or Convex league ID." }, "required": true, "description": "League slug or Convex league ID." }, { "in": "path", "name": "banId", "schema": { "type": "string", "description": "League ban ID." }, "required": true, "description": "League ban ID." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevokeBanRequestBody" } } } }, "responses": { "200": { "description": "The league ban was revoked.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RevokeBanResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/bans/create": { "post": { "operationId": "createLeagueBan", "tags": [ "Leagues" ], "summary": "Create a league team ban", "description": "Bans a team from the league and removes it from active/pending league participation. Requires a league-operator key bound to the league and the league bans capability.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug or Convex league ID." }, "required": true, "description": "League slug or Convex league ID." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBanRequestBody" } } } }, "responses": { "200": { "description": "The league ban was created.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateBanResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/cooldowns/{cooldownId}/clear": { "post": { "operationId": "clearLeagueCooldown", "tags": [ "Leagues" ], "summary": "Clear a league cooldown", "description": "Clears an active league member cooldown early. Requires a league-operator key bound to the league and the league cooldowns capability.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug or Convex league ID." }, "required": true, "description": "League slug or Convex league ID." }, { "in": "path", "name": "cooldownId", "schema": { "type": "string", "description": "League member cooldown ID." }, "required": true, "description": "League member cooldown ID." } ], "responses": { "200": { "description": "The league cooldown was cleared.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ClearCooldownResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/cooldowns/issue": { "post": { "operationId": "issueLeagueCooldown", "tags": [ "Leagues" ], "summary": "Issue a league cooldown", "description": "Issues or updates a manual cooldown for a league member. Requires a league-operator key bound to the league and the league cooldowns capability.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug or Convex league ID." }, "required": true, "description": "League slug or Convex league ID." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IssueCooldownRequestBody" } } } }, "responses": { "200": { "description": "The league cooldown was issued.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/IssueCooldownResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/display-rules": { "post": { "operationId": "getLeagueDisplayRules", "tags": [ "Leagues" ], "summary": "Get league display rules", "description": "Returns display rules configured for a league game. Requires leagues.league_public:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug or Convex league ID." }, "required": true, "description": "League slug or Convex league ID." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueDisplayRulesRequestBody" } } } }, "responses": { "200": { "description": "League display rules.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueDisplayRules" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/games": { "post": { "operationId": "getLeagueGames", "tags": [ "Leagues" ], "summary": "Get league games", "description": "Returns games configured for a league resolved by slug or Convex ID. Requires leagues.league_public:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug or Convex league ID." }, "required": true, "description": "League slug or Convex league ID." } ], "responses": { "200": { "description": "League games.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueGames" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/matches/{matchId}/player-stats": { "post": { "operationId": "submitLeaguePlayerStats", "tags": [ "Leagues" ], "summary": "Submit or update league player stats for a map", "description": "Sets per-player stats on an existing league match map score. Requires a league-operator key bound to the league and the league scores capability.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug." }, "required": true, "description": "League slug." }, { "in": "path", "name": "matchId", "schema": { "type": "string", "description": "Match ID." }, "required": true, "description": "Match ID." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GamePlayerStatsBody" } } } }, "responses": { "200": { "description": "The league player stats were updated.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GamePlayerStatsResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/matches/{matchId}/scores": { "post": { "operationId": "submitLeagueScores", "tags": [ "Leagues" ], "summary": "Submit league match scores in a batch", "description": "Submits scores for one or more maps in a league match; league-operator scores are auto-confirmed. Requires the league scores capability.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug." }, "required": true, "description": "League slug." }, { "in": "path", "name": "matchId", "schema": { "type": "string", "description": "Match ID." }, "required": true, "description": "Match ID." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameBatchScoresBody" } } } }, "responses": { "200": { "description": "Per-map submission results. success is true only when every map was confirmed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameBatchScoresResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/matches/{matchId}/scores/{mapIndex}": { "post": { "operationId": "submitLeagueMapScore", "tags": [ "Leagues" ], "summary": "Submit one league match map score", "description": "Submits the score for one map in a league match; league-operator scores are auto-confirmed. Requires the league scores capability.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug." }, "required": true, "description": "League slug." }, { "in": "path", "name": "matchId", "schema": { "type": "string", "description": "Match ID." }, "required": true, "description": "Match ID." }, { "in": "path", "name": "mapIndex", "schema": { "type": "string", "description": "Zero-based index of the map within the series." }, "required": true, "description": "Zero-based index of the map within the series." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameSingleMapScoreBody" } } } }, "responses": { "200": { "description": "The map score was submitted and confirmed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameSingleMapScoreResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/matches/{matchId}/status": { "patch": { "operationId": "updateLeagueMatchStatus", "tags": [ "Leagues" ], "summary": "Update a league match's lifecycle status", "description": "Transitions a league match between lifecycle states using a league-operator key bound to the league. Requires the league scores capability.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug." }, "required": true, "description": "League slug." }, { "in": "path", "name": "matchId", "schema": { "type": "string", "description": "Match ID." }, "required": true, "description": "Match ID." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueStatusUpdateBody" } } } }, "responses": { "200": { "description": "The league match status was transitioned successfully.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameStatusUpdateResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "409": { "description": "Conflict.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/matches/batch-scores": { "post": { "operationId": "submitLeagueBatchMatchScores", "tags": [ "Leagues" ], "summary": "Submit league map scores across multiple matches", "description": "Submits map scores for up to 50 league match items in one request. Each item is independently checked against the key's bound league and returns a per-item result. Requires the league scores capability.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug." }, "required": true, "description": "League slug." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameBatchMatchScoresBody" } } } }, "responses": { "200": { "description": "Per-item submission results. success is true only when every item was confirmed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GameBatchMatchScoresResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/members": { "post": { "operationId": "getLeagueMembers", "tags": [ "Leagues" ], "summary": "Get league staff members", "description": "Returns staff members for a league resolved by slug. The API key owner must have a MEMBER+ league role or be TeamBattles staff. Requires the leagues.league_admin:read permission.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug." }, "required": true, "description": "League slug." } ], "responses": { "200": { "description": "Staff members of the league.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueMembers" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/members/{memberId}/remove": { "post": { "operationId": "removeLeagueMember", "tags": [ "Leagues" ], "summary": "Remove a league staff member", "description": "Deactivates a league staff membership. Requires a league-operator key bound to the league and the league members capability.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug or Convex league ID." }, "required": true, "description": "League slug or Convex league ID." }, { "in": "path", "name": "memberId", "schema": { "type": "string", "minLength": 1, "description": "League staff membership ID." }, "required": true, "description": "League staff membership ID." } ], "responses": { "200": { "description": "The league staff member was removed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RemoveLeagueMemberResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/members/{memberId}/role": { "post": { "operationId": "updateLeagueMemberRole", "tags": [ "Leagues" ], "summary": "Update a league staff member role", "description": "Updates a league staff member role. Requires a league-operator key bound to the league and the league members capability.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug or Convex league ID." }, "required": true, "description": "League slug or Convex league ID." }, { "in": "path", "name": "memberId", "schema": { "type": "string", "minLength": 1, "description": "League staff membership ID." }, "required": true, "description": "League staff membership ID." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateLeagueMemberRoleRequestBody" } } } }, "responses": { "200": { "description": "The league staff member role was updated.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateLeagueMemberRoleResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/members/add": { "post": { "operationId": "addLeagueMember", "tags": [ "Leagues" ], "summary": "Add a league staff member", "description": "Adds or reactivates a league staff member. Requires a league-operator key bound to the league and the league members capability.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug or Convex league ID." }, "required": true, "description": "League slug or Convex league ID." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddLeagueMemberRequestBody" } } } }, "responses": { "200": { "description": "The league staff member was added.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/AddLeagueMemberResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/penalties": { "post": { "operationId": "getLeaguePenalties", "tags": [ "Leagues" ], "summary": "Get league penalties and cooldowns", "description": "Returns penalties and/or member cooldowns for a league resolved by slug, with optional filtering. The API key owner must have a MANAGER+ league role or be TeamBattles staff. Requires the leagues.league_admin:read permission.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug." }, "required": true, "description": "League slug." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PenaltiesRequestBody" } } } }, "responses": { "200": { "description": "Penalties and cooldowns for the league.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeaguePenalties" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/penalties/create": { "post": { "operationId": "createLeaguePenalty", "tags": [ "Leagues" ], "summary": "Create a league penalty", "description": "Issues a warning, match-forfeit penalty, or point deduction to a league team. Requires a league-operator key bound to the league and the league penalties capability.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug or Convex league ID." }, "required": true, "description": "League slug or Convex league ID." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePenaltyRequestBody" } } } }, "responses": { "200": { "description": "The league penalty was created.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePenaltyResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/rules": { "post": { "operationId": "getLeagueRules", "tags": [ "Leagues" ], "summary": "Get league rules and points config", "description": "Returns the game rules and points configuration for a league + game, resolved by league slug. Requires the leagues.league_public:read permission.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug." }, "required": true, "description": "League slug." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RulesRequestBody" } } } }, "responses": { "200": { "description": "Game rules and points config for the league.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueRules" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/season-options": { "post": { "operationId": "getLeagueSeasonOptions", "tags": [ "Leagues" ], "summary": "Get league season options", "description": "Returns season selector options for a league game. Requires leagues.league_public:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug or Convex league ID." }, "required": true, "description": "League slug or Convex league ID." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueSeasonOptionsRequestBody" } } } }, "responses": { "200": { "description": "League season options.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueSeasonOptions" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/seasons": { "post": { "operationId": "getLeagueSeasons", "tags": [ "Leagues" ], "summary": "Get league seasons", "description": "Returns seasons for a league resolved by slug, with optional game and status filtering. Requires the leagues.league_public:read permission.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug." }, "required": true, "description": "League slug." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SeasonsRequestBody" } } } }, "responses": { "200": { "description": "Seasons for the league.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueSeasons" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/seasons/{seasonId}": { "delete": { "operationId": "deleteLeagueSeason", "tags": [ "Leagues" ], "summary": "Delete a league season", "description": "Deletes an upcoming league season. Requires the league seasons capability. Replays are not deduped; existing state guards return the current state error if the season no longer exists or is no longer upcoming.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug or Convex league ID." }, "required": true, "description": "League slug or Convex league ID." }, { "in": "path", "name": "seasonId", "schema": { "type": "string", "description": "League season ID." }, "required": true, "description": "League season ID." } ], "responses": { "200": { "description": "The season was deleted.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/DeleteLeagueSeasonResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "post": { "operationId": "getLeagueSeason", "tags": [ "Leagues" ], "summary": "Get a league season", "description": "Returns a single season that belongs to the resolved league. Requires leagues.league_public:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug or Convex league ID." }, "required": true, "description": "League slug or Convex league ID." }, { "in": "path", "name": "seasonId", "schema": { "type": "string", "description": "League season ID." }, "required": true, "description": "League season ID." } ], "responses": { "200": { "description": "League season.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueSeason" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/seasons/{seasonId}/activate": { "post": { "operationId": "activateLeagueSeason", "tags": [ "Leagues" ], "summary": "Activate a league season", "description": "Activates an upcoming league season. Requires the league seasons capability. Replays are not deduped; existing state guards return the current state error if the season is no longer upcoming.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug." }, "required": true, "description": "League slug." }, { "in": "path", "name": "seasonId", "schema": { "type": "string", "description": "League season ID." }, "required": true, "description": "League season ID." } ], "responses": { "200": { "description": "The season was activated.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ActivateLeagueSeasonResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/seasons/{seasonId}/complete": { "post": { "operationId": "completeLeagueSeason", "tags": [ "Leagues" ], "summary": "Complete a league season", "description": "Completes an active league season. Requires the league seasons capability. Replays are not deduped; existing state guards return the current state error if the season is no longer active.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug." }, "required": true, "description": "League slug." }, { "in": "path", "name": "seasonId", "schema": { "type": "string", "description": "League season ID." }, "required": true, "description": "League season ID." } ], "responses": { "200": { "description": "The season was completed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompleteLeagueSeasonResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/seasons/create": { "post": { "operationId": "createLeagueSeason", "tags": [ "Leagues" ], "summary": "Create a league season", "description": "Creates an upcoming season for a league game. Requires the league seasons capability. Supply an optional `Idempotency-Key` request header to make retries safe: an identical key and body replays the original season id, while the same key with a different body returns 409 error_idempotency_key_conflict.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug." }, "required": true, "description": "League slug." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSeasonRequestBody" } } } }, "responses": { "200": { "description": "The season was created.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateSeasonResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "409": { "description": "Conflict.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/{identifier}/standings": { "post": { "operationId": "getLeagueStandings", "tags": [ "Leagues" ], "summary": "Get league standings", "description": "Returns approved teams with their season stats, ranked by standings position, for a league resolved by slug. Requires the leagues.league_public:read permission.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "League slug." }, "required": true, "description": "League slug." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandingsRequestBody" } } } }, "responses": { "200": { "description": "League standings for the requested season.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueStandings" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/leagues/templates": { "post": { "operationId": "getLeagueTemplates", "tags": [ "Leagues" ], "summary": "Get league rule templates", "description": "Returns league rule templates visible to authenticated API clients, optionally filtered by game or official status. Requires leagues.league_public:read.", "security": [ { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueTemplatesRequestBody" } } } }, "responses": { "200": { "description": "League rule templates.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/LeagueTemplates" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/matches/{matchId}": { "get": { "operationId": "getMatchDetail", "tags": [ "Matches" ], "summary": "Get match detail", "description": "Returns a participant-gated match detail projection. Lobby codes and raw match documents are intentionally omitted. Requires one of matches.user_matches:read, matches.team_matches:read, or matches.org_matches:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "matchId", "schema": { "type": "string", "description": "Match ID." }, "required": true, "description": "Match ID." } ], "responses": { "200": { "description": "Match detail.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiMatchDetailResponse" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/matches/{matchId}/players": { "get": { "operationId": "getMatchPlayers", "tags": [ "Matches" ], "summary": "Get match players", "description": "Returns participant-gated player rows for a match, including roster type and attendance state. Requires one of matches.user_matches:read, matches.team_matches:read, or matches.org_matches:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "matchId", "schema": { "type": "string", "description": "Match ID." }, "required": true, "description": "Match ID." } ], "responses": { "200": { "description": "Match player rows.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ApiMatchPlayersResponse" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/matches/{matchId}/scores": { "get": { "operationId": "getMatchScores", "tags": [ "Matches" ], "summary": "Get all map scores", "description": "Retrieve all map scores for a match, including a series score summary. Requires one of matches.user_matches:read, matches.team_matches:read, or matches.org_matches:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "matchId", "schema": { "type": "string", "description": "Match id." }, "required": true, "description": "Match id." } ], "responses": { "200": { "description": "All map scores for the match with a series summary.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MapScores" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "patch": { "operationId": "confirmMatchScores", "tags": [ "Matches" ], "summary": "Confirm a map score", "description": "Confirm a map score submitted by the opposing team. Only the opposing team's captain can confirm (cannot confirm own team's submission). Requires the matches.team_matches:read-write permission.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "matchId", "schema": { "type": "string", "description": "Match id." }, "required": true, "description": "Match id." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConfirmScoreBody" } } } }, "responses": { "200": { "description": "Map score confirmed.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScoreSubmissionResult" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "post": { "operationId": "submitMatchScores", "tags": [ "Matches" ], "summary": "Submit a map score", "description": "Submit or overwrite a map score for a match. Only team captains can submit. Requires the matches.team_matches:read-write permission.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "matchId", "schema": { "type": "string", "description": "Match id." }, "required": true, "description": "Match id." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/SubmitScoreBody" } } } }, "responses": { "200": { "description": "Map score submitted.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScoreSubmissionResult" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/matches/discover": { "post": { "operationId": "discoverMatches", "tags": [ "Matches" ], "summary": "Discover open matches", "description": "Returns published pending open matches. League matches are excluded unless leagueId is provided. gameId and gameSlug are mutually exclusive. Requires matches.public_matches:read.", "security": [ { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatchDiscoverBody" } } } }, "responses": { "200": { "description": "Discoverable open matches.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatchDiscoverPage" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/orgs/{identifier}": { "get": { "operationId": "getOrganizationProfile", "tags": [ "Organizations" ], "summary": "Get an organization profile", "description": "Returns an API-safe organization profile projection. Active organization members are treated as public visibility for their own organization. Requires orgs.profile:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "Organization slug or Convex organization ID." }, "required": true, "description": "Organization slug or Convex organization ID." } ], "responses": { "200": { "description": "Organization profile.", "content": { "application/json": { "schema": { "type": "object", "properties": { "organization": { "$ref": "#/components/schemas/ApiOrganizationProfile" }, "timestamp": { "type": "string", "description": "ISO 8601 timestamp." } }, "required": [ "organization", "timestamp" ], "additionalProperties": false, "description": "Envelope containing organization plus a response timestamp." } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/orgs/{identifier}/matches": { "post": { "operationId": "listOrgMatches", "tags": [ "Matches" ], "summary": "List an organization's matches", "description": "Returns matches across all teams in an organization (resolved by id or slug), newest first, with cursor pagination. The authenticated user must be an active member of the organization. Requires the matches.org_matches:read permission.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "Organization id or slug." }, "required": true, "description": "Organization id or slug." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatchesRequestBody" } } } }, "responses": { "200": { "description": "Cursor-paginated result. continueCursor is non-null even when isDone is true.", "content": { "application/json": { "schema": { "type": "object", "properties": { "page": { "type": "array", "items": { "$ref": "#/components/schemas/UserMatch" } }, "isDone": { "type": "boolean" }, "continueCursor": { "type": "string" } }, "required": [ "page", "isDone", "continueCursor" ], "additionalProperties": false } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/orgs/{identifier}/members": { "get": { "operationId": "listOrganizationMembers", "tags": [ "Organizations" ], "summary": "List active organization members", "description": "Returns active member rows when the organization is public or the API key owner is an active organization member. Requires orgs.profile:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "Organization slug or Convex organization ID." }, "required": true, "description": "Organization slug or Convex organization ID." } ], "responses": { "200": { "description": "Organization members.", "content": { "application/json": { "schema": { "type": "object", "properties": { "members": { "type": "array", "items": { "$ref": "#/components/schemas/ApiMember" } }, "count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "timestamp": { "type": "string", "description": "ISO 8601 timestamp." } }, "required": [ "members", "count", "timestamp" ], "additionalProperties": false, "description": "Envelope containing members, count, and a response timestamp." } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/orgs/{identifier}/stats": { "get": { "operationId": "getOrganizationStats", "tags": [ "Organizations" ], "summary": "Get organization aggregate stats", "description": "Returns organization stats when the organization is limited/public or the API key owner is an active organization member. Requires orgs.profile:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "Organization slug or Convex organization ID." }, "required": true, "description": "Organization slug or Convex organization ID." } ], "responses": { "200": { "description": "Organization stats.", "content": { "application/json": { "schema": { "type": "object", "properties": { "stats": { "$ref": "#/components/schemas/ApiOrganizationStats" }, "timestamp": { "type": "string", "description": "ISO 8601 timestamp." } }, "required": [ "stats", "timestamp" ], "additionalProperties": false, "description": "Envelope containing stats plus a response timestamp." } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/orgs/{identifier}/teams": { "get": { "operationId": "listOrganizationTeams", "tags": [ "Organizations" ], "summary": "List organization teams", "description": "Returns organization teams when the organization is public or the API key owner is an active organization member. Non-members do not receive private or disabled teams. Requires orgs.profile:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "Organization slug or Convex organization ID." }, "required": true, "description": "Organization slug or Convex organization ID." } ], "responses": { "200": { "description": "Organization teams.", "content": { "application/json": { "schema": { "type": "object", "properties": { "teams": { "type": "array", "items": { "$ref": "#/components/schemas/ApiTeamSummary" } }, "count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "timestamp": { "type": "string", "description": "ISO 8601 timestamp." } }, "required": [ "teams", "count", "timestamp" ], "additionalProperties": false, "description": "Envelope containing teams, count, and a response timestamp." } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/orgs/discover": { "get": { "operationId": "discoverOrganizations", "tags": [ "Organizations" ], "summary": "Discover public organizations", "description": "Returns a neutral discovery list of active, public, non-disabled organizations. Results do not exclude organizations the API key owner belongs to and do not include join-request flags. Requires orgs.profile:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "query", "name": "search", "schema": { "description": "Optional organization name search.", "type": "string" }, "description": "Optional organization name search." }, { "in": "query", "name": "limit", "schema": { "type": "integer", "minimum": 1, "maximum": 100 } } ], "responses": { "200": { "description": "Discoverable organizations.", "content": { "application/json": { "schema": { "type": "object", "properties": { "organizations": { "type": "array", "items": { "$ref": "#/components/schemas/ApiOrganizationSummary" } }, "count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "timestamp": { "type": "string", "description": "ISO 8601 timestamp." } }, "required": [ "organizations", "count", "timestamp" ], "additionalProperties": false, "description": "Envelope containing organizations, count, and a response timestamp." } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/teams/{identifier}": { "get": { "operationId": "getTeamProfile", "tags": [ "Teams" ], "summary": "Get a team profile", "description": "Returns an API-safe team profile projection. Active team members are treated as public visibility for their own team. Requires teams.profile:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "Team slug or Convex team ID." }, "required": true, "description": "Team slug or Convex team ID." } ], "responses": { "200": { "description": "Team profile.", "content": { "application/json": { "schema": { "type": "object", "properties": { "team": { "$ref": "#/components/schemas/ApiTeamProfile" }, "timestamp": { "type": "string", "description": "ISO 8601 timestamp." } }, "required": [ "team", "timestamp" ], "additionalProperties": false, "description": "Envelope containing team plus a response timestamp." } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/teams/{identifier}/matches": { "post": { "operationId": "listTeamMatches", "tags": [ "Matches" ], "summary": "List a team's matches", "description": "Returns matches for a specific team (resolved by id or slug), newest first, with cursor pagination. The authenticated user must be an active member of the team. Requires the matches.team_matches:read permission.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "Team id or slug." }, "required": true, "description": "Team id or slug." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatchesRequestBody" } } } }, "responses": { "200": { "description": "Cursor-paginated result. continueCursor is non-null even when isDone is true.", "content": { "application/json": { "schema": { "type": "object", "properties": { "page": { "type": "array", "items": { "$ref": "#/components/schemas/UserMatch" } }, "isDone": { "type": "boolean" }, "continueCursor": { "type": "string" } }, "required": [ "page", "isDone", "continueCursor" ], "additionalProperties": false } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/teams/{identifier}/members": { "get": { "operationId": "listTeamMembers", "tags": [ "Teams" ], "summary": "List active team members", "description": "Returns active roster rows when the team is public or the API key owner is an active team member. Requires teams.roster:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "Team slug or Convex team ID." }, "required": true, "description": "Team slug or Convex team ID." } ], "responses": { "200": { "description": "Team members.", "content": { "application/json": { "schema": { "type": "object", "properties": { "members": { "type": "array", "items": { "$ref": "#/components/schemas/ApiMember" } }, "count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "timestamp": { "type": "string", "description": "ISO 8601 timestamp." } }, "required": [ "members", "count", "timestamp" ], "additionalProperties": false, "description": "Envelope containing members, count, and a response timestamp." } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/twitch/badges/channel": { "get": { "operationId": "getChannelTwitchBadges", "tags": [ "Twitch" ], "summary": "Get channel-specific Twitch chat badges", "description": "Returns a Twitch channel's chat badge sets. Provide exactly one of the username or id query parameters. The API key owner must have a linked Twitch connection. Requires the connections.twitch permission.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "query", "name": "username", "schema": { "description": "Channel login name (e.g. ninja). Provide exactly one of username or id.", "type": "string" }, "description": "Channel login name (e.g. ninja). Provide exactly one of username or id." }, { "in": "query", "name": "id", "schema": { "description": "Broadcaster id (e.g. 123456789). Provide exactly one of username or id.", "type": "string" }, "description": "Broadcaster id (e.g. 123456789). Provide exactly one of username or id." } ], "responses": { "200": { "description": "Channel-specific Twitch chat badge sets.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TwitchChannelBadges" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/twitch/badges/global": { "get": { "operationId": "getGlobalTwitchBadges", "tags": [ "Twitch" ], "summary": "Get global Twitch chat badges", "description": "Returns Twitch's global chat badge sets. The API key owner must have a linked Twitch connection. Requires the connections.twitch permission.", "security": [ { "ApiKeyAuth": [] } ], "responses": { "200": { "description": "Global Twitch chat badge sets.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/TwitchGlobalBadges" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/user/matches": { "post": { "operationId": "listUserMatches", "tags": [ "Matches" ], "summary": "List the authenticated user's matches", "description": "Returns matches the API key owner participates in, newest first, with cursor pagination. Requires the matches.user_matches:read permission.", "security": [ { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MatchesRequestBody" } } } }, "responses": { "200": { "description": "Cursor-paginated result. continueCursor is non-null even when isDone is true.", "content": { "application/json": { "schema": { "type": "object", "properties": { "page": { "type": "array", "items": { "$ref": "#/components/schemas/UserMatch" } }, "isDone": { "type": "boolean" }, "continueCursor": { "type": "string" } }, "required": [ "page", "isDone", "continueCursor" ], "additionalProperties": false } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/user/ongoing-matches": { "get": { "operationId": "listUserOngoingMatches", "tags": [ "Matches" ], "summary": "List the API key owner's ongoing matches", "description": "Returns published ACCEPTED, READY, and IN_PROGRESS matches for active teams the API key owner belongs to. The user is always derived from the API key. Requires matches.user_matches:read.", "security": [ { "ApiKeyAuth": [] } ], "responses": { "200": { "description": "Ongoing matches for the API key owner.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OngoingMatchesResponse" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/users/{identifier}": { "get": { "operationId": "getUserProfile", "tags": [ "Users" ], "summary": "Get a public user profile", "description": "Returns an API-safe user profile projection. Private profiles return only the base profile envelope. Requires users.profile:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "Username or Convex user ID." }, "required": true, "description": "Username or Convex user ID." } ], "responses": { "200": { "description": "User profile.", "content": { "application/json": { "schema": { "type": "object", "properties": { "user": { "$ref": "#/components/schemas/ApiUserProfile" }, "timestamp": { "type": "string", "description": "ISO 8601 timestamp." } }, "required": [ "user", "timestamp" ], "additionalProperties": false, "description": "Envelope containing user plus a response timestamp." } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/users/{identifier}/connections": { "get": { "operationId": "listUserConnections", "tags": [ "Users" ], "summary": "List public user connections", "description": "Returns user connections for public profiles or self. Non-self responses include only connections marked visible on the profile. Requires users.profile:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "Username or Convex user ID." }, "required": true, "description": "Username or Convex user ID." } ], "responses": { "200": { "description": "User connections.", "content": { "application/json": { "schema": { "type": "object", "properties": { "connections": { "type": "array", "items": { "$ref": "#/components/schemas/ApiUserConnection" } }, "count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "timestamp": { "type": "string", "description": "ISO 8601 timestamp." } }, "required": [ "connections", "count", "timestamp" ], "additionalProperties": false, "description": "Envelope containing connections, count, and a response timestamp." } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/users/{identifier}/organizations": { "get": { "operationId": "listUserOrganizations", "tags": [ "Users" ], "summary": "List user organization affiliations", "description": "Returns API-safe organization affiliation rows for public or limited profiles, plus self. Non-self rows include only public organizations. Requires users.profile:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "Username or Convex user ID." }, "required": true, "description": "Username or Convex user ID." } ], "responses": { "200": { "description": "User organization affiliations.", "content": { "application/json": { "schema": { "type": "object", "properties": { "organizations": { "type": "array", "items": { "$ref": "#/components/schemas/ApiUserOrganizationMembership" } }, "count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "timestamp": { "type": "string", "description": "ISO 8601 timestamp." } }, "required": [ "organizations", "count", "timestamp" ], "additionalProperties": false, "description": "Envelope containing organizations, count, and a response timestamp." } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/users/{identifier}/stats": { "get": { "operationId": "getUserStats", "tags": [ "Users" ], "summary": "Get user aggregate stats", "description": "Returns aggregate user stats for public or limited profiles, plus self. Private non-self profiles return 403. Requires users.profile:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "Username or Convex user ID." }, "required": true, "description": "Username or Convex user ID." } ], "responses": { "200": { "description": "User stats.", "content": { "application/json": { "schema": { "type": "object", "properties": { "stats": { "$ref": "#/components/schemas/ApiUserStats" }, "timestamp": { "type": "string", "description": "ISO 8601 timestamp." } }, "required": [ "stats", "timestamp" ], "additionalProperties": false, "description": "Envelope containing stats plus a response timestamp." } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/users/{identifier}/teams": { "get": { "operationId": "listUserTeams", "tags": [ "Users" ], "summary": "List user team affiliations", "description": "Returns API-safe team affiliation rows for public or limited profiles, plus self. Non-self rows follow the public-profile affiliation filters. Requires users.profile:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "Username or Convex user ID." }, "required": true, "description": "Username or Convex user ID." } ], "responses": { "200": { "description": "User team affiliations.", "content": { "application/json": { "schema": { "type": "object", "properties": { "teams": { "type": "array", "items": { "$ref": "#/components/schemas/ApiUserTeamMembership" } }, "count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "timestamp": { "type": "string", "description": "ISO 8601 timestamp." } }, "required": [ "teams", "count", "timestamp" ], "additionalProperties": false, "description": "Envelope containing teams, count, and a response timestamp." } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/users/{identifier}/trophies": { "get": { "operationId": "listUserTrophies", "tags": [ "Users" ], "summary": "List user trophies", "description": "Returns user trophies for public profiles or self. Event linkage fields such as matchId and tournamentId are omitted. Requires users.profile:read.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "identifier", "schema": { "type": "string", "description": "Username or Convex user ID." }, "required": true, "description": "Username or Convex user ID." } ], "responses": { "200": { "description": "User trophies.", "content": { "application/json": { "schema": { "type": "object", "properties": { "trophies": { "type": "array", "items": { "$ref": "#/components/schemas/ApiUserTrophy" } }, "count": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "timestamp": { "type": "string", "description": "ISO 8601 timestamp." } }, "required": [ "trophies", "count", "timestamp" ], "additionalProperties": false, "description": "Envelope containing trophies, count, and a response timestamp." } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "500": { "description": "Internal server error.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/webhooks": { "get": { "operationId": "listWebhooks", "tags": [ "Webhooks" ], "summary": "List webhook endpoints", "description": "Lists the API key's webhook endpoints within its derived scope. Secret material is never returned. Requires the webhooks.manage permission and the webhooks feature.", "security": [ { "ApiKeyAuth": [] } ], "responses": { "200": { "description": "The caller's webhook endpoints.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookListResponse" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "post": { "operationId": "createWebhook", "tags": [ "Webhooks" ], "summary": "Create a webhook endpoint", "description": "Creates a webhook endpoint in the API key's derived scope (personal -> user, developer-app -> game, league-operator -> league). Returns the signing secret ONCE. Requires the webhooks.manage permission and the webhooks feature.", "security": [ { "ApiKeyAuth": [] } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreateWebhookBody" } } } }, "responses": { "201": { "description": "The created endpoint's id and one-time signing secret.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookSecret" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "409": { "description": "Conflict.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/webhooks/{id}": { "delete": { "operationId": "deleteWebhook", "tags": [ "Webhooks" ], "summary": "Delete a webhook endpoint", "description": "Deletes a webhook endpoint in the caller's scope, cascading its delivery logs and rate-limit bucket. Requires the webhooks.manage permission and the webhooks feature.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string", "description": "Webhook endpoint id." }, "required": true, "description": "Webhook endpoint id." } ], "responses": { "200": { "description": "Deletion acknowledged.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookOk" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "get": { "operationId": "getWebhook", "tags": [ "Webhooks" ], "summary": "Get a webhook endpoint", "description": "Returns one webhook endpoint in the caller's scope (no secret material). A scope/owner mismatch is reported as 404. Requires the webhooks.manage permission and the webhooks feature.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string", "description": "Webhook endpoint id." }, "required": true, "description": "Webhook endpoint id." } ], "responses": { "200": { "description": "The requested webhook endpoint.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookEndpoint" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } }, "patch": { "operationId": "updateWebhook", "tags": [ "Webhooks" ], "summary": "Update a webhook endpoint", "description": "Partially updates a webhook endpoint in the caller's scope. Re-enabling or changing the URL resets the failure count. Requires the webhooks.manage permission and the webhooks feature.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string", "description": "Webhook endpoint id." }, "required": true, "description": "Webhook endpoint id." } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/UpdateWebhookBody" } } } }, "responses": { "200": { "description": "Update acknowledged.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookOk" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/webhooks/{id}/deliveries": { "get": { "operationId": "listWebhookDeliveries", "tags": [ "Webhooks" ], "summary": "List a webhook endpoint's deliveries", "description": "Returns the endpoint's delivery log, newest first, with native cursor pagination. Pass limit (1-100) and cursor query params. Requires the webhooks.manage permission and the webhooks feature.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string", "description": "Webhook endpoint id." }, "required": true, "description": "Webhook endpoint id." }, { "in": "query", "name": "limit", "schema": { "description": "Page size 1-100 (default 25), enforced by the handler.", "type": "string" }, "description": "Page size 1-100 (default 25), enforced by the handler." }, { "in": "query", "name": "cursor", "schema": { "description": "Opaque continuation cursor from a prior page's continueCursor.", "type": "string" }, "description": "Opaque continuation cursor from a prior page's continueCursor." } ], "responses": { "200": { "description": "Cursor-paginated result. continueCursor is non-null even when isDone is true.", "content": { "application/json": { "schema": { "type": "object", "properties": { "page": { "type": "array", "items": { "$ref": "#/components/schemas/WebhookDelivery" } }, "isDone": { "type": "boolean" }, "continueCursor": { "type": "string" } }, "required": [ "page", "isDone", "continueCursor" ], "additionalProperties": false } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/webhooks/{id}/deliveries/{deliveryId}/replay": { "post": { "operationId": "replayWebhookDelivery", "tags": [ "Webhooks" ], "summary": "Replay a webhook delivery", "description": "Re-queues a dead-lettered delivery for a fresh attempt. Delivered, in-flight, or still-retrying (failed) deliveries cannot be replayed (409). Requires the webhooks.manage permission and the webhooks feature.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string", "description": "Webhook endpoint id." }, "required": true, "description": "Webhook endpoint id." }, { "in": "path", "name": "deliveryId", "schema": { "type": "string", "description": "Delivery-log row id to replay." }, "required": true, "description": "Delivery-log row id to replay." } ], "responses": { "200": { "description": "Replay re-queued.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookReplayResult" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "409": { "description": "Conflict.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/webhooks/{id}/rotate-secret": { "post": { "operationId": "rotateWebhookSecret", "tags": [ "Webhooks" ], "summary": "Rotate a webhook signing secret", "description": "Rotates the endpoint's signing secret. The previous secret keeps signing for a 24h grace window so consumers can update without missing deliveries. Returns the new secret ONCE. Requires the webhooks.manage permission and the webhooks feature.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string", "description": "Webhook endpoint id." }, "required": true, "description": "Webhook endpoint id." } ], "responses": { "200": { "description": "The new one-time signing secret.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookSecret" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } }, "/webhooks/{id}/test": { "post": { "operationId": "testWebhook", "tags": [ "Webhooks" ], "summary": "Send a test.ping to a webhook endpoint", "description": "Sends a single signed test.ping delivery (no retries) and logs it. Use it to verify your endpoint and signature handling. Requires the webhooks.manage permission and the webhooks feature.", "security": [ { "ApiKeyAuth": [] } ], "parameters": [ { "in": "path", "name": "id", "schema": { "type": "string", "description": "Webhook endpoint id." }, "required": true, "description": "Webhook endpoint id." } ], "responses": { "200": { "description": "The test delivery outcome.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/WebhookTestResult" } } } }, "400": { "description": "Bad request (invalid body, cursor, limit, or date).", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "401": { "description": "Missing or invalid API key.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "403": { "description": "API key lacks the required permission.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "404": { "description": "Resource not found.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } }, "429": { "description": "Rate limited.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Error" } } } } } } } }, "webhooks": { "achievement.unlocked": { "post": { "operationId": "webhook_achievement_unlocked", "summary": "achievement.unlocked webhook delivery", "description": "Delivered to a registered endpoint when a achievement.unlocked event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "achievement.unlocked" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/AchievementUnlockedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for achievement.unlocked." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "chat.message_reported": { "post": { "operationId": "webhook_chat_message_reported", "summary": "chat.message_reported webhook delivery", "description": "Delivered to a registered endpoint when a chat.message_reported event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "chat.message_reported" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/ChatMessageReportedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for chat.message_reported." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "custommap.scan_completed": { "post": { "operationId": "webhook_custommap_scan_completed", "summary": "custommap.scan_completed webhook delivery", "description": "Delivered to a registered endpoint when a custommap.scan_completed event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "custommap.scan_completed" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/CustomMapScanCompletedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for custommap.scan_completed." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.ban_revoked": { "post": { "operationId": "webhook_league_ban_revoked", "summary": "league.ban_revoked webhook delivery", "description": "Delivered to a registered endpoint when a league.ban_revoked event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.ban_revoked" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueBanRevokedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.ban_revoked." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.cooldown_cleared": { "post": { "operationId": "webhook_league_cooldown_cleared", "summary": "league.cooldown_cleared webhook delivery", "description": "Delivered to a registered endpoint when a league.cooldown_cleared event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.cooldown_cleared" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueCooldownClearedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.cooldown_cleared." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.cooldown_issued": { "post": { "operationId": "webhook_league_cooldown_issued", "summary": "league.cooldown_issued webhook delivery", "description": "Delivered to a registered endpoint when a league.cooldown_issued event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.cooldown_issued" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueCooldownIssuedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.cooldown_issued." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.created": { "post": { "operationId": "webhook_league_created", "summary": "league.created webhook delivery", "description": "Delivered to a registered endpoint when a league.created event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.created" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueCreatedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.created." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.display_rules_updated": { "post": { "operationId": "webhook_league_display_rules_updated", "summary": "league.display_rules_updated webhook delivery", "description": "Delivered to a registered endpoint when a league.display_rules_updated event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.display_rules_updated" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueDisplayRulesUpdatedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.display_rules_updated." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.featured": { "post": { "operationId": "webhook_league_featured", "summary": "league.featured webhook delivery", "description": "Delivered to a registered endpoint when a league.featured event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.featured" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueFeaturedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.featured." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.game_added": { "post": { "operationId": "webhook_league_game_added", "summary": "league.game_added webhook delivery", "description": "Delivered to a registered endpoint when a league.game_added event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.game_added" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueGameAddedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.game_added." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.game_removed": { "post": { "operationId": "webhook_league_game_removed", "summary": "league.game_removed webhook delivery", "description": "Delivered to a registered endpoint when a league.game_removed event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.game_removed" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueGameRemovedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.game_removed." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.game_toggled": { "post": { "operationId": "webhook_league_game_toggled", "summary": "league.game_toggled webhook delivery", "description": "Delivered to a registered endpoint when a league.game_toggled event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.game_toggled" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueGameToggledPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.game_toggled." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.ownership_transferred": { "post": { "operationId": "webhook_league_ownership_transferred", "summary": "league.ownership_transferred webhook delivery", "description": "Delivered to a registered endpoint when a league.ownership_transferred event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.ownership_transferred" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueOwnershipTransferredPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.ownership_transferred." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.penalty_issued": { "post": { "operationId": "webhook_league_penalty_issued", "summary": "league.penalty_issued webhook delivery", "description": "Delivered to a registered endpoint when a league.penalty_issued event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.penalty_issued" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeaguePenaltyIssuedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.penalty_issued." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.points_updated": { "post": { "operationId": "webhook_league_points_updated", "summary": "league.points_updated webhook delivery", "description": "Delivered to a registered endpoint when a league.points_updated event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.points_updated" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeaguePointsUpdatedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.points_updated." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.rules_updated": { "post": { "operationId": "webhook_league_rules_updated", "summary": "league.rules_updated webhook delivery", "description": "Delivered to a registered endpoint when a league.rules_updated event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.rules_updated" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueRulesUpdatedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.rules_updated." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.season_activated": { "post": { "operationId": "webhook_league_season_activated", "summary": "league.season_activated webhook delivery", "description": "Delivered to a registered endpoint when a league.season_activated event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.season_activated" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueSeasonActivatedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.season_activated." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.season_completed": { "post": { "operationId": "webhook_league_season_completed", "summary": "league.season_completed webhook delivery", "description": "Delivered to a registered endpoint when a league.season_completed event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.season_completed" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueSeasonCompletedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.season_completed." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.season_created": { "post": { "operationId": "webhook_league_season_created", "summary": "league.season_created webhook delivery", "description": "Delivered to a registered endpoint when a league.season_created event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.season_created" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueSeasonCreatedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.season_created." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.season_removed": { "post": { "operationId": "webhook_league_season_removed", "summary": "league.season_removed webhook delivery", "description": "Delivered to a registered endpoint when a league.season_removed event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.season_removed" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueSeasonRemovedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.season_removed." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.settings_updated": { "post": { "operationId": "webhook_league_settings_updated", "summary": "league.settings_updated webhook delivery", "description": "Delivered to a registered endpoint when a league.settings_updated event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.settings_updated" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueSettingsUpdatedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.settings_updated." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.shutdown": { "post": { "operationId": "webhook_league_shutdown", "summary": "league.shutdown webhook delivery", "description": "Delivered to a registered endpoint when a league.shutdown event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.shutdown" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueShutdownPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.shutdown." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.shutdown_requested": { "post": { "operationId": "webhook_league_shutdown_requested", "summary": "league.shutdown_requested webhook delivery", "description": "Delivered to a registered endpoint when a league.shutdown_requested event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.shutdown_requested" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueShutdownRequestedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.shutdown_requested." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.staff_invited": { "post": { "operationId": "webhook_league_staff_invited", "summary": "league.staff_invited webhook delivery", "description": "Delivered to a registered endpoint when a league.staff_invited event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.staff_invited" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueStaffInvitedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.staff_invited." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.staff_removed": { "post": { "operationId": "webhook_league_staff_removed", "summary": "league.staff_removed webhook delivery", "description": "Delivered to a registered endpoint when a league.staff_removed event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.staff_removed" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueStaffRemovedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.staff_removed." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.staff_role_changed": { "post": { "operationId": "webhook_league_staff_role_changed", "summary": "league.staff_role_changed webhook delivery", "description": "Delivered to a registered endpoint when a league.staff_role_changed event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.staff_role_changed" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueStaffRoleChangedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.staff_role_changed." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.standings_updated": { "post": { "operationId": "webhook_league_standings_updated", "summary": "league.standings_updated webhook delivery", "description": "Delivered to a registered endpoint when a league.standings_updated event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.standings_updated" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueStandingsUpdatedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.standings_updated." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.suspended": { "post": { "operationId": "webhook_league_suspended", "summary": "league.suspended webhook delivery", "description": "Delivered to a registered endpoint when a league.suspended event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.suspended" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueSuspendedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.suspended." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.team_approved": { "post": { "operationId": "webhook_league_team_approved", "summary": "league.team_approved webhook delivery", "description": "Delivered to a registered endpoint when a league.team_approved event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.team_approved" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueTeamApprovedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.team_approved." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.team_banned": { "post": { "operationId": "webhook_league_team_banned", "summary": "league.team_banned webhook delivery", "description": "Delivered to a registered endpoint when a league.team_banned event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.team_banned" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueTeamBannedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.team_banned." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.team_denied": { "post": { "operationId": "webhook_league_team_denied", "summary": "league.team_denied webhook delivery", "description": "Delivered to a registered endpoint when a league.team_denied event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.team_denied" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueTeamDeniedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.team_denied." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.team_removed": { "post": { "operationId": "webhook_league_team_removed", "summary": "league.team_removed webhook delivery", "description": "Delivered to a registered endpoint when a league.team_removed event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.team_removed" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueTeamRemovedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.team_removed." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.unfeatured": { "post": { "operationId": "webhook_league_unfeatured", "summary": "league.unfeatured webhook delivery", "description": "Delivered to a registered endpoint when a league.unfeatured event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.unfeatured" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueUnfeaturedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.unfeatured." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.unsuspended": { "post": { "operationId": "webhook_league_unsuspended", "summary": "league.unsuspended webhook delivery", "description": "Delivered to a registered endpoint when a league.unsuspended event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.unsuspended" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueUnsuspendedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.unsuspended." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "league.verified": { "post": { "operationId": "webhook_league_verified", "summary": "league.verified webhook delivery", "description": "Delivered to a registered endpoint when a league.verified event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "league.verified" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/LeagueVerifiedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for league.verified." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "match.accepted": { "post": { "operationId": "webhook_match_accepted", "summary": "match.accepted webhook delivery", "description": "Delivered to a registered endpoint when a match.accepted event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "match.accepted" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/MatchAcceptedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for match.accepted." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "match.cancelled": { "post": { "operationId": "webhook_match_cancelled", "summary": "match.cancelled webhook delivery", "description": "Delivered to a registered endpoint when a match.cancelled event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "match.cancelled" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/MatchCancelledPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for match.cancelled." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "match.completed": { "post": { "operationId": "webhook_match_completed", "summary": "match.completed webhook delivery", "description": "Delivered to a registered endpoint when a match.completed event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "match.completed" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/MatchCompletedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for match.completed." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "match.created": { "post": { "operationId": "webhook_match_created", "summary": "match.created webhook delivery", "description": "Delivered to a registered endpoint when a match.created event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "match.created" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/MatchCreatedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for match.created." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "match.forfeited": { "post": { "operationId": "webhook_match_forfeited", "summary": "match.forfeited webhook delivery", "description": "Delivered to a registered endpoint when a match.forfeited event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "match.forfeited" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/MatchForfeitedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for match.forfeited." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "match.published": { "post": { "operationId": "webhook_match_published", "summary": "match.published webhook delivery", "description": "Delivered to a registered endpoint when a match.published event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "match.published" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/MatchPublishedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for match.published." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "match.ready": { "post": { "operationId": "webhook_match_ready", "summary": "match.ready webhook delivery", "description": "Delivered to a registered endpoint when a match.ready event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "match.ready" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/MatchReadyPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for match.ready." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "match.started": { "post": { "operationId": "webhook_match_started", "summary": "match.started webhook delivery", "description": "Delivered to a registered endpoint when a match.started event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "match.started" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/MatchStartedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for match.started." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "organization.created": { "post": { "operationId": "webhook_organization_created", "summary": "organization.created webhook delivery", "description": "Delivered to a registered endpoint when a organization.created event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "organization.created" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/OrganizationCreatedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for organization.created." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "organization.disabled": { "post": { "operationId": "webhook_organization_disabled", "summary": "organization.disabled webhook delivery", "description": "Delivered to a registered endpoint when a organization.disabled event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "organization.disabled" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/OrganizationDisabledPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for organization.disabled." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "organization.enabled": { "post": { "operationId": "webhook_organization_enabled", "summary": "organization.enabled webhook delivery", "description": "Delivered to a registered endpoint when a organization.enabled event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "organization.enabled" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/OrganizationEnabledPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for organization.enabled." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "organization.member_added": { "post": { "operationId": "webhook_organization_member_added", "summary": "organization.member_added webhook delivery", "description": "Delivered to a registered endpoint when a organization.member_added event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "organization.member_added" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/OrganizationMemberAddedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for organization.member_added." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "organization.member_removed": { "post": { "operationId": "webhook_organization_member_removed", "summary": "organization.member_removed webhook delivery", "description": "Delivered to a registered endpoint when a organization.member_removed event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "organization.member_removed" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/OrganizationMemberRemovedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for organization.member_removed." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "organization.member_role_changed": { "post": { "operationId": "webhook_organization_member_role_changed", "summary": "organization.member_role_changed webhook delivery", "description": "Delivered to a registered endpoint when a organization.member_role_changed event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "organization.member_role_changed" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/OrganizationMemberRoleChangedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for organization.member_role_changed." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "organization.ownership_transferred": { "post": { "operationId": "webhook_organization_ownership_transferred", "summary": "organization.ownership_transferred webhook delivery", "description": "Delivered to a registered endpoint when a organization.ownership_transferred event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "organization.ownership_transferred" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/OrganizationOwnershipTransferredPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for organization.ownership_transferred." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "organization.removed": { "post": { "operationId": "webhook_organization_removed", "summary": "organization.removed webhook delivery", "description": "Delivered to a registered endpoint when a organization.removed event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "organization.removed" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/OrganizationRemovedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for organization.removed." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "organization.unbanned": { "post": { "operationId": "webhook_organization_unbanned", "summary": "organization.unbanned webhook delivery", "description": "Delivered to a registered endpoint when a organization.unbanned event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "organization.unbanned" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/OrganizationUnbannedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for organization.unbanned." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "organization.updated": { "post": { "operationId": "webhook_organization_updated", "summary": "organization.updated webhook delivery", "description": "Delivered to a registered endpoint when a organization.updated event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "organization.updated" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/OrganizationUpdatedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for organization.updated." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "organization.user_banned": { "post": { "operationId": "webhook_organization_user_banned", "summary": "organization.user_banned webhook delivery", "description": "Delivered to a registered endpoint when a organization.user_banned event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "organization.user_banned" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/OrganizationUserBannedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for organization.user_banned." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "payment.failed": { "post": { "operationId": "webhook_payment_failed", "summary": "payment.failed webhook delivery", "description": "Delivered to a registered endpoint when a payment.failed event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "payment.failed" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/PaymentFailedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for payment.failed." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "payment.refunded": { "post": { "operationId": "webhook_payment_refunded", "summary": "payment.refunded webhook delivery", "description": "Delivered to a registered endpoint when a payment.refunded event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "payment.refunded" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/PaymentRefundedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for payment.refunded." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "payment.succeeded": { "post": { "operationId": "webhook_payment_succeeded", "summary": "payment.succeeded webhook delivery", "description": "Delivered to a registered endpoint when a payment.succeeded event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "payment.succeeded" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/PaymentSucceededPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for payment.succeeded." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "player.checked_in": { "post": { "operationId": "webhook_player_checked_in", "summary": "player.checked_in webhook delivery", "description": "Delivered to a registered endpoint when a player.checked_in event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "player.checked_in" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/PlayerCheckedInPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for player.checked_in." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "player.stats_updated": { "post": { "operationId": "webhook_player_stats_updated", "summary": "player.stats_updated webhook delivery", "description": "Delivered to a registered endpoint when a player.stats_updated event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "player.stats_updated" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/PlayerStatsUpdatedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for player.stats_updated." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "rank.updated": { "post": { "operationId": "webhook_rank_updated", "summary": "rank.updated webhook delivery", "description": "Delivered to a registered endpoint when a rank.updated event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "rank.updated" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/RankUpdatedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for rank.updated." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "referral.milestone": { "post": { "operationId": "webhook_referral_milestone", "summary": "referral.milestone webhook delivery", "description": "Delivered to a registered endpoint when a referral.milestone event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "referral.milestone" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/ReferralMilestonePayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for referral.milestone." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "roster.updated": { "post": { "operationId": "webhook_roster_updated", "summary": "roster.updated webhook delivery", "description": "Delivered to a registered endpoint when a roster.updated event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "roster.updated" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/RosterUpdatedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for roster.updated." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "score.confirmed": { "post": { "operationId": "webhook_score_confirmed", "summary": "score.confirmed webhook delivery", "description": "Delivered to a registered endpoint when a score.confirmed event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "score.confirmed" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/ScoreConfirmedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for score.confirmed." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "score.dispute_resolved": { "post": { "operationId": "webhook_score_dispute_resolved", "summary": "score.dispute_resolved webhook delivery", "description": "Delivered to a registered endpoint when a score.dispute_resolved event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "score.dispute_resolved" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/ScoreDisputeResolvedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for score.dispute_resolved." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "score.disputed": { "post": { "operationId": "webhook_score_disputed", "summary": "score.disputed webhook delivery", "description": "Delivered to a registered endpoint when a score.disputed event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "score.disputed" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/ScoreDisputedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for score.disputed." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "score.submitted": { "post": { "operationId": "webhook_score_submitted", "summary": "score.submitted webhook delivery", "description": "Delivered to a registered endpoint when a score.submitted event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "score.submitted" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/ScoreSubmittedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for score.submitted." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "stream.offline": { "post": { "operationId": "webhook_stream_offline", "summary": "stream.offline webhook delivery", "description": "Delivered to a registered endpoint when a stream.offline event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "stream.offline" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/StreamOfflinePayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for stream.offline." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "stream.online": { "post": { "operationId": "webhook_stream_online", "summary": "stream.online webhook delivery", "description": "Delivered to a registered endpoint when a stream.online event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "stream.online" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/StreamOnlinePayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for stream.online." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "subscription.cancelled": { "post": { "operationId": "webhook_subscription_cancelled", "summary": "subscription.cancelled webhook delivery", "description": "Delivered to a registered endpoint when a subscription.cancelled event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "subscription.cancelled" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/SubscriptionCancelledPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for subscription.cancelled." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "subscription.created": { "post": { "operationId": "webhook_subscription_created", "summary": "subscription.created webhook delivery", "description": "Delivered to a registered endpoint when a subscription.created event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "subscription.created" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/SubscriptionCreatedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for subscription.created." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "subscription.updated": { "post": { "operationId": "webhook_subscription_updated", "summary": "subscription.updated webhook delivery", "description": "Delivered to a registered endpoint when a subscription.updated event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "subscription.updated" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/SubscriptionUpdatedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for subscription.updated." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "team.banned": { "post": { "operationId": "webhook_team_banned", "summary": "team.banned webhook delivery", "description": "Delivered to a registered endpoint when a team.banned event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "team.banned" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/TeamBannedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for team.banned." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "team.created": { "post": { "operationId": "webhook_team_created", "summary": "team.created webhook delivery", "description": "Delivered to a registered endpoint when a team.created event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "team.created" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/TeamCreatedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for team.created." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "team.disbanded": { "post": { "operationId": "webhook_team_disbanded", "summary": "team.disbanded webhook delivery", "description": "Delivered to a registered endpoint when a team.disbanded event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "team.disbanded" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/TeamDisbandedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for team.disbanded." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "team.joined": { "post": { "operationId": "webhook_team_joined", "summary": "team.joined webhook delivery", "description": "Delivered to a registered endpoint when a team.joined event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "team.joined" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/TeamJoinedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for team.joined." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "team.left": { "post": { "operationId": "webhook_team_left", "summary": "team.left webhook delivery", "description": "Delivered to a registered endpoint when a team.left event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "team.left" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/TeamLeftPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for team.left." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "team.member_role_changed": { "post": { "operationId": "webhook_team_member_role_changed", "summary": "team.member_role_changed webhook delivery", "description": "Delivered to a registered endpoint when a team.member_role_changed event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "team.member_role_changed" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/TeamMemberRoleChangedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for team.member_role_changed." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "team.updated": { "post": { "operationId": "webhook_team_updated", "summary": "team.updated webhook delivery", "description": "Delivered to a registered endpoint when a team.updated event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "team.updated" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/TeamUpdatedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for team.updated." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "ticket.closed": { "post": { "operationId": "webhook_ticket_closed", "summary": "ticket.closed webhook delivery", "description": "Delivered to a registered endpoint when a ticket.closed event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "ticket.closed" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/TicketClosedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for ticket.closed." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "ticket.created": { "post": { "operationId": "webhook_ticket_created", "summary": "ticket.created webhook delivery", "description": "Delivered to a registered endpoint when a ticket.created event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "ticket.created" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/TicketCreatedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for ticket.created." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "ticket.reopened": { "post": { "operationId": "webhook_ticket_reopened", "summary": "ticket.reopened webhook delivery", "description": "Delivered to a registered endpoint when a ticket.reopened event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "ticket.reopened" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/TicketReopenedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for ticket.reopened." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "ticket.updated": { "post": { "operationId": "webhook_ticket_updated", "summary": "ticket.updated webhook delivery", "description": "Delivered to a registered endpoint when a ticket.updated event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "ticket.updated" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/TicketUpdatedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for ticket.updated." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } }, "trophy.awarded": { "post": { "operationId": "webhook_trophy_awarded", "summary": "trophy.awarded webhook delivery", "description": "Delivered to a registered endpoint when a trophy.awarded event occurs.", "requestBody": { "content": { "application/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "const": "trophy.awarded" }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "$ref": "#/components/schemas/TrophyAwardedPayload" } }, "required": [ "id", "event", "created_at", "data" ], "description": "Webhook envelope for trophy.awarded." } } } }, "responses": { "200": { "description": "Acknowledged. Return 2xx to mark the delivery successful." } } } } }, "components": { "schemas": { "ListGameMatchesBody": { "type": "object", "properties": { "status": { "description": "Optional MatchStatus filter (e.g. IN_PROGRESS).", "type": "string" }, "limit": { "description": "Page size (1-100, enforced by the handler). Defaults to the handler's internal default.", "type": "number" }, "cursor": { "description": "Opaque continuation cursor from a prior page's pagination.cursor.", "type": "string" } }, "description": "Status filter and cursor pagination for listing the bound key's game matches. The game is derived from the developer-app key's bound game (not a body field)." }, "GameForfeitBody": { "type": "object", "properties": { "forfeitingTeamId": { "type": "string", "description": "ID of the team that forfeits. Must be a participant of the match." }, "reason": { "description": "Optional human-readable forfeit reason, recorded on the match.", "type": "string" } }, "required": [ "forfeitingTeamId" ], "description": "Request body for forfeiting a match on behalf of one participating team." }, "GamePlayerStatsBody": { "type": "object", "properties": { "mapIndex": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Zero-based index of the map whose stats are being updated." }, "playerStats": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {}, "description": "Per-player stats keyed by user ID. The map score must already exist." } }, "required": [ "mapIndex", "playerStats" ], "description": "Request body for submitting or updating player stats for an existing map score." }, "GameBatchScoresBody": { "type": "object", "properties": { "maps": { "minItems": 1, "type": "array", "items": { "$ref": "#/components/schemas/GameMapScoreInput" }, "description": "Map scores to submit. Must contain at least one entry." } }, "required": [ "maps" ], "description": "Request body for submitting one or more map scores in a single call." }, "GameMapScoreInput": { "type": "object", "properties": { "mapIndex": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Zero-based index of the map within the series." }, "mapId": { "type": "string", "description": "Identifier of the map that was played." }, "creatorTeamScore": { "type": "number", "minimum": 0, "description": "Score for the creator team (non-negative)." }, "opponentTeamScore": { "type": "number", "minimum": 0, "description": "Score for the opponent (accepted) team (non-negative)." }, "screenshotUrls": { "description": "Optional screenshot URLs supporting the reported score.", "type": "array", "items": { "type": "string" } }, "playerStats": { "description": "Optional per-player stats keyed by user ID.", "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } }, "required": [ "mapIndex", "mapId", "creatorTeamScore", "opponentTeamScore" ], "description": "One map's score within a batch submission." }, "GameSingleMapScoreBody": { "type": "object", "properties": { "mapId": { "type": "string", "description": "Identifier of the map that was played." }, "creatorTeamScore": { "type": "number", "minimum": 0, "description": "Score for the creator team (non-negative)." }, "opponentTeamScore": { "type": "number", "minimum": 0, "description": "Score for the opponent (accepted) team (non-negative)." }, "screenshotUrls": { "description": "Optional screenshot URLs supporting the reported score.", "type": "array", "items": { "type": "string" } }, "playerStats": { "description": "Optional per-player stats keyed by user ID.", "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } }, "required": [ "mapId", "creatorTeamScore", "opponentTeamScore" ], "description": "Request body for submitting a single map's score (mapIndex comes from the path)." }, "GameStatusUpdateBody": { "type": "object", "properties": { "status": { "type": "string", "description": "Target status. Allowed transitions: READY -> IN_PROGRESS, IN_PROGRESS -> COMPLETED|CANCELLED, ACCEPTED -> CANCELLED. COMPLETED is not accepted directly (matches complete automatically once scores are confirmed)." } }, "required": [ "status" ], "description": "Request body for updating a match's lifecycle status." }, "GameBatchMatchScoresBody": { "type": "object", "properties": { "items": { "minItems": 1, "maxItems": 50, "type": "array", "items": { "$ref": "#/components/schemas/GameMultiMatchScoreItem" }, "description": "Map scores to submit across one or more matches. 1-50 entries." } }, "required": [ "items" ], "description": "Request body for submitting map scores across multiple matches in a single call (capped at 50 items)." }, "GameMultiMatchScoreItem": { "type": "object", "properties": { "matchId": { "type": "string", "description": "ID of the match this map score belongs to." }, "mapIndex": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Zero-based index of the map within the series." }, "mapId": { "type": "string", "description": "Identifier of the map that was played." }, "creatorTeamScore": { "type": "number", "minimum": 0, "description": "Score for the creator team (non-negative)." }, "opponentTeamScore": { "type": "number", "minimum": 0, "description": "Score for the opponent (accepted) team (non-negative)." }, "screenshotUrls": { "description": "Optional screenshot URLs supporting the reported score.", "type": "array", "items": { "type": "string" } }, "playerStats": { "description": "Optional per-player stats keyed by user ID.", "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} } }, "required": [ "matchId", "mapIndex", "mapId", "creatorTeamScore", "opponentTeamScore" ], "description": "One match's single map score within a multi-match batch submission." }, "GameCreateMatchBody": { "type": "object", "properties": { "creatorTeamId": { "type": "string", "description": "ID of the creating team. Must belong to the key's bound game." }, "acceptedTeamId": { "type": "string", "description": "ID of the opposing team. Required - game-originated matches are two-sided. Must belong to the key's bound game." }, "gameModeId": { "type": "string", "description": "Game mode identifier (e.g. search_and_destroy)." }, "bestOf": { "type": "number", "description": "Number of maps in the series (1, 3, 5, or 7)." }, "teamSize": { "type": "number", "description": "Players per team (validated against the game's min/max)." }, "platform": { "type": "string", "enum": [ "PC", "XBOX", "PLAYSTATION", "CONSOLE_ONLY", "CROSSPLAY" ], "description": "Match platform (e.g. CROSSPLAY)." }, "inputDevice": { "type": "string", "enum": [ "ALL", "CONTROLLER", "KB_M" ], "description": "Allowed input device (e.g. ALL)." }, "region": { "type": "string", "enum": [ "NONE", "NA_EAST", "NA_WEST", "EU", "ASIA", "OCEANIA", "SOUTH_AMERICA", "MIDDLE_EAST", "AFRICA" ], "description": "Match region (e.g. NONE)." }, "mapSelectionType": { "type": "string", "enum": [ "COMPETITIVE", "FLEX" ], "description": "Map selection type (COMPETITIVE or FLEX)." }, "mapPreferenceMode": { "type": "string", "enum": [ "PREFERRED", "VETO", "MANUAL" ], "description": "Map preference mode (PREFERRED, VETO, or MANUAL)." }, "selectedMaps": { "description": "Optional pre-selected map IDs.", "type": "array", "items": { "type": "string" } }, "selectedObjectives": { "description": "Optional pre-selected objective IDs.", "type": "array", "items": { "type": "string" } }, "scheduledAt": { "description": "Optional scheduled start time (epoch ms).", "type": "number" } }, "required": [ "creatorTeamId", "acceptedTeamId", "gameModeId", "bestOf", "teamSize", "platform", "inputDevice", "region", "mapSelectionType", "mapPreferenceMode" ], "description": "Request body for creating a two-sided game-originated match. The match is created ACCEPTED + PUBLISHED for the key's bound game. Supports an optional Idempotency-Key header for safe retries." }, "LeaderboardSortBy": { "type": "string", "enum": [ "wins", "winRate", "experience" ], "description": "Supported leaderboard sort field." }, "DiscoverLeaguesRequestBody": { "type": "object", "properties": { "search": { "description": "Free-text search across league names.", "type": "string" }, "gameId": { "description": "Filter to leagues that include this game id.", "type": "string" }, "page": { "default": 1, "description": "1-based page number. Defaults to 1.", "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "limit": { "default": 12, "description": "Page size (1-50). Defaults to 12.", "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "description": "Filters and offset pagination for discovering leagues." }, "LeagueApplyEligibilityRequestBody": { "type": "object", "properties": { "teamId": { "description": "Optional team ID to check. The API key owner must lead it.", "type": "string" } }, "description": "Optional team-specific league application eligibility selector." }, "BansRequestBody": { "type": "object", "properties": { "status": { "description": "Filter bans by computed status. Defaults to all.", "type": "string", "enum": [ "active", "expired", "revoked", "all" ] } }, "description": "Status filter for league team bans." }, "RevokeBanRequestBody": { "default": {}, "description": "Optional reason for revoking a league ban.", "type": "object", "properties": { "reason": { "description": "Optional revocation reason.", "type": "string", "maxLength": 500 } } }, "CreateBanRequestBody": { "type": "object", "properties": { "teamId": { "type": "string", "minLength": 1, "description": "Team ID to ban from the league." }, "reason": { "type": "string", "minLength": 1, "maxLength": 500, "description": "Reason for the ban." }, "isPermanent": { "type": "boolean", "description": "Whether the ban never expires." }, "expiresAt": { "description": "Expiration timestamp for temporary bans, in epoch milliseconds.", "type": "number" } }, "required": [ "teamId", "reason", "isPermanent" ], "description": "Creates a league team ban." }, "IssueCooldownRequestBody": { "type": "object", "properties": { "userId": { "type": "string", "minLength": 1, "description": "User ID receiving the cooldown." }, "cooldownHours": { "type": "integer", "minimum": 1, "maximum": 8760, "description": "Cooldown length in hours, from 1 to 8760." }, "note": { "description": "Optional admin note.", "type": "string", "maxLength": 500 } }, "required": [ "userId", "cooldownHours" ], "description": "Issues or updates a manual league member cooldown." }, "LeagueDisplayRulesRequestBody": { "type": "object", "properties": { "gameId": { "type": "string", "description": "Game ID to list display rules for." } }, "required": [ "gameId" ], "description": "Display rule selector." }, "LeagueStatusUpdateBody": { "type": "object", "properties": { "status": { "type": "string", "description": "Target status. Allowed league transitions: READY -> IN_PROGRESS|CANCELLED, ACCEPTED -> CANCELLED. COMPLETED is not accepted directly; matches complete automatically once scores are confirmed." } }, "required": [ "status" ], "description": "Request body for updating a league match's lifecycle status." }, "UpdateLeagueMemberRoleRequestBody": { "type": "object", "properties": { "role": { "type": "string", "enum": [ "ADMIN", "MANAGER", "MEMBER" ], "description": "Assignable league staff role. OWNER cannot be assigned through this API." } }, "required": [ "role" ], "description": "Updates a league staff member role." }, "AddLeagueMemberRequestBody": { "type": "object", "properties": { "userId": { "type": "string", "minLength": 1, "description": "User ID to add to league staff." }, "role": { "type": "string", "enum": [ "ADMIN", "MANAGER", "MEMBER" ], "description": "Assignable league staff role. OWNER cannot be assigned through this API." } }, "required": [ "userId", "role" ], "description": "Adds or reactivates a league staff member." }, "PenaltiesRequestBody": { "type": "object", "properties": { "type": { "default": "all", "description": "Which record kinds to return. Defaults to all.", "type": "string", "enum": [ "penalties", "cooldowns", "all" ] }, "teamId": { "description": "Filter penalties to a specific team id.", "type": "string" }, "gameId": { "description": "Filter penalties to a specific game id.", "type": "string" }, "limit": { "default": 50, "description": "Maximum number of penalties to return (1-100). Defaults to 50.", "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "description": "Type, team, game, and limit filters for league penalties and cooldowns." }, "CreatePenaltyRequestBody": { "type": "object", "properties": { "teamId": { "type": "string", "minLength": 1, "description": "Team ID receiving the penalty." }, "gameId": { "type": "string", "minLength": 1, "description": "Game ID for the league penalty." }, "seasonId": { "description": "Optional league season ID for the penalty.", "type": "string", "minLength": 1 }, "type": { "type": "string", "enum": [ "POINT_DEDUCTION", "MATCH_FORFEIT", "WARNING" ], "description": "Penalty type." }, "value": { "description": "Point value, when applicable.", "type": "number", "exclusiveMinimum": 0 }, "reason": { "type": "string", "minLength": 1, "maxLength": 500, "description": "Reason for the penalty." } }, "required": [ "teamId", "gameId", "type", "reason" ], "description": "Creates a league team penalty." }, "RulesRequestBody": { "type": "object", "properties": { "gameId": { "type": "string", "description": "Game id to fetch rules and points config for. Required." } }, "required": [ "gameId" ], "description": "Game selector for league rules and points config." }, "LeagueSeasonOptionsRequestBody": { "type": "object", "properties": { "gameId": { "type": "string", "description": "Game ID to list season options for." } }, "required": [ "gameId" ], "description": "Season option selector." }, "SeasonsRequestBody": { "type": "object", "properties": { "gameId": { "description": "Filter seasons to a specific game id.", "type": "string" }, "status": { "description": "Filter seasons by lifecycle status.", "type": "string", "enum": [ "UPCOMING", "ACTIVE", "COMPLETED" ] } }, "description": "Game and status filters for league seasons." }, "CreateSeasonRequestBody": { "type": "object", "properties": { "gameId": { "type": "string", "description": "Game ID the season belongs to." }, "name": { "type": "string", "minLength": 1, "maxLength": 100, "description": "Season name." }, "startDate": { "type": "number", "description": "Season start timestamp in milliseconds." }, "endDate": { "type": "number", "description": "Season end timestamp in milliseconds." } }, "required": [ "gameId", "name", "startDate", "endDate" ], "description": "League season creation payload." }, "StandingsRequestBody": { "type": "object", "properties": { "seasonId": { "description": "Filter standings to a specific season id.", "type": "string" }, "gameId": { "description": "Filter standings to a specific game id.", "type": "string" }, "limit": { "default": 50, "description": "Maximum number of teams to return (1-100). Defaults to 50.", "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "description": "Season and game filters for league standings." }, "LeagueTemplatesRequestBody": { "type": "object", "properties": { "gameId": { "description": "Optional game ID filter.", "type": "string" }, "isOfficial": { "description": "Optional official-template filter.", "type": "boolean" } }, "description": "Template filters." }, "ConfirmScoreBody": { "type": "object", "properties": { "mapIndex": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Zero-based map index to confirm. Must be a non-negative integer." } }, "required": [ "mapIndex" ], "description": "Confirmation payload identifying the map score to confirm." }, "SubmitScoreBody": { "type": "object", "properties": { "mapIndex": { "type": "integer", "minimum": 0, "maximum": 9007199254740991, "description": "Zero-based map index. Must be a non-negative integer." }, "mapId": { "type": "string", "description": "Map identifier string (e.g. dust2)." }, "creatorTeamScore": { "type": "number", "minimum": 0, "description": "Creator team score. Must be a non-negative number." }, "opponentTeamScore": { "type": "number", "minimum": 0, "description": "Accepted/opponent team score. Must be a non-negative number." }, "screenshotUrls": { "description": "Optional screenshot URLs for the map result.", "type": "array", "items": { "type": "string" } } }, "required": [ "mapIndex", "mapId", "creatorTeamScore", "opponentTeamScore" ], "description": "Map score submission payload for a single map." }, "MatchDiscoverBody": { "type": "object", "properties": { "gameId": { "type": "string" }, "gameSlug": { "type": "string" }, "platform": { "type": "string", "enum": [ "PC", "XBOX", "PLAYSTATION", "CONSOLE_ONLY", "CROSSPLAY" ] }, "region": { "type": "string", "enum": [ "NONE", "NA_EAST", "NA_WEST", "EU", "ASIA", "OCEANIA", "SOUTH_AMERICA", "MIDDLE_EAST", "AFRICA" ] }, "matchType": { "type": "string", "enum": [ "XP_ONLY", "WAGER" ] }, "scheduledAfter": { "type": "string" }, "scheduledBefore": { "type": "string" }, "leagueId": { "type": "string" }, "leagueSeasonId": { "type": "string" }, "limit": { "default": 50, "type": "integer", "minimum": 1, "maximum": 100 }, "cursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "description": "Filters and cursor pagination for public open-match discovery." }, "MatchesRequestBody": { "type": "object", "properties": { "numItems": { "default": 25, "description": "Page size (1-100). Defaults to 25.", "type": "integer", "minimum": 1, "maximum": 100 }, "cursor": { "description": "Opaque continuation cursor from a prior page's continueCursor.", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "includeStatuses": { "description": "Only include matches with these MatchStatus codes; unknown values are ignored.", "type": "array", "items": { "type": "string" } }, "excludeStatuses": { "description": "Exclude matches with these MatchStatus codes; unknown values are ignored.", "type": "array", "items": { "type": "string" } }, "gameId": { "description": "Filter to a single game by id.", "type": "string" }, "scheduledAfter": { "description": "ISO 8601; only matches scheduled at or after this time.", "type": "string" }, "scheduledBefore": { "description": "ISO 8601; only matches scheduled at or before this time.", "type": "string" }, "createdAfter": { "description": "ISO 8601; only matches created at or after this time.", "type": "string" }, "createdBefore": { "description": "ISO 8601; only matches created at or before this time.", "type": "string" }, "opponentId": { "description": "Filter to matches against this opponent team (team id or slug).", "type": "string" } }, "description": "Filters and cursor pagination for listing matches." }, "CreateWebhookBody": { "type": "object", "properties": { "url": { "type": "string", "description": "HTTPS endpoint URL. Private/loopback/metadata hosts are rejected." }, "events": { "minItems": 1, "type": "array", "items": { "type": "string" }, "description": "Subscribed event tokens: exact catalog names (e.g. match.completed) or family wildcards (e.g. match.*). At least one required." }, "label": { "description": "Optional human label for the endpoint.", "type": "string" } }, "required": [ "url", "events" ], "description": "Create a webhook endpoint in the caller's scope." }, "UpdateWebhookBody": { "type": "object", "properties": { "url": { "description": "New HTTPS endpoint URL.", "type": "string" }, "events": { "description": "Replacement event token list (at least one when present).", "minItems": 1, "type": "array", "items": { "type": "string" } }, "label": { "description": "New human label.", "type": "string" }, "isActive": { "description": "Enable/disable the endpoint. Re-enabling resets the failure count.", "type": "boolean" } }, "description": "Partial update of a webhook endpoint." }, "AchievementUnlockedPayload": { "type": "object", "properties": { "userId": { "type": "string", "description": "TeamBattles document id." }, "achievementId": { "type": "string", "description": "TeamBattles document id." }, "unlockedAt": { "type": "number", "description": "Unix epoch milliseconds." } }, "required": [ "userId", "achievementId" ], "description": "A user unlocked an achievement." }, "ChatMessageReportedPayload": { "type": "object", "properties": { "reportId": { "type": "string", "description": "TeamBattles document id." }, "messageId": { "type": "string", "description": "TeamBattles document id." }, "matchId": { "type": "string", "description": "TeamBattles document id." }, "reporterUserId": { "type": "string", "description": "TeamBattles document id." } }, "required": [ "reportId" ], "description": "A chat message was reported." }, "CustomMapScanCompletedPayload": { "type": "object", "properties": { "customMapId": { "type": "string", "description": "TeamBattles document id." }, "userId": { "type": "string", "description": "TeamBattles document id." }, "status": { "type": "string" } }, "required": [ "customMapId" ], "description": "A custom map scan completed." }, "LeagueBanRevokedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A league ban was revoked." }, "LeagueCooldownClearedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A league cooldown was cleared." }, "LeagueCooldownIssuedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A league cooldown was issued." }, "LeagueCreatedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A league was created." }, "LeagueDisplayRulesUpdatedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "League display rules changed." }, "LeagueFeaturedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A league was featured." }, "LeagueGameAddedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A game was added to a league." }, "LeagueGameRemovedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A game was removed from a league." }, "LeagueGameToggledPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A league game was toggled." }, "LeagueOwnershipTransferredPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "League ownership changed." }, "LeaguePenaltyIssuedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A league penalty was issued." }, "LeaguePointsUpdatedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "League points configuration changed." }, "LeagueRulesUpdatedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "League rules changed." }, "LeagueSeasonActivatedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A league season was activated." }, "LeagueSeasonCompletedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A league season was completed." }, "LeagueSeasonCreatedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A league season was created." }, "LeagueSeasonRemovedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A league season was removed." }, "LeagueSettingsUpdatedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "League settings changed." }, "LeagueShutdownPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A league was shut down." }, "LeagueShutdownRequestedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "League shutdown was requested." }, "LeagueStaffInvitedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "League staff was invited." }, "LeagueStaffRemovedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "League staff was removed." }, "LeagueStaffRoleChangedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A league staff role changed." }, "LeagueStandingsUpdatedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} }, "teamId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." } }, "required": [ "leagueId" ], "description": "League standings changed." }, "LeagueSuspendedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A league was suspended." }, "LeagueTeamApprovedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A league team application was approved." }, "LeagueTeamBannedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A league team was banned." }, "LeagueTeamDeniedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A league team application was denied." }, "LeagueTeamRemovedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A league team was removed." }, "LeagueUnfeaturedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A league was unfeatured." }, "LeagueUnsuspendedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A league was unsuspended." }, "LeagueVerifiedPayload": { "type": "object", "properties": { "leagueId": { "type": "string", "description": "TeamBattles document id." }, "actorId": { "type": "string", "description": "TeamBattles document id." }, "targetType": { "type": "string" }, "targetId": { "type": "string" }, "metadata": { "type": "object", "properties": {}, "additionalProperties": {} } }, "required": [ "leagueId" ], "description": "A league was verified." }, "MatchAcceptedPayload": { "type": "object", "properties": { "matchId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "leagueId": { "type": "string", "description": "TeamBattles document id." }, "leagueSeasonId": { "type": "string", "description": "TeamBattles document id." }, "creatorTeamId": { "type": "string", "description": "TeamBattles document id." }, "acceptedTeamId": { "type": "string", "description": "TeamBattles document id." } }, "required": [ "matchId" ], "description": "A match was accepted." }, "MatchCancelledPayload": { "type": "object", "properties": { "matchId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "leagueId": { "type": "string", "description": "TeamBattles document id." }, "leagueSeasonId": { "type": "string", "description": "TeamBattles document id." }, "creatorTeamId": { "type": "string", "description": "TeamBattles document id." }, "acceptedTeamId": { "type": "string", "description": "TeamBattles document id." }, "reason": { "type": "string" } }, "required": [ "matchId" ], "description": "A match was cancelled." }, "MatchCompletedPayload": { "type": "object", "properties": { "matchId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "leagueId": { "type": "string", "description": "TeamBattles document id." }, "leagueSeasonId": { "type": "string", "description": "TeamBattles document id." }, "creatorTeamId": { "type": "string", "description": "TeamBattles document id." }, "acceptedTeamId": { "type": "string", "description": "TeamBattles document id." }, "winnerTeamId": { "type": "string", "description": "TeamBattles document id." }, "loserTeamId": { "type": "string", "description": "TeamBattles document id." }, "isDraw": { "type": "boolean" } }, "required": [ "matchId" ], "description": "A match completed with a result." }, "MatchCreatedPayload": { "type": "object", "properties": { "matchId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "leagueId": { "type": "string", "description": "TeamBattles document id." }, "leagueSeasonId": { "type": "string", "description": "TeamBattles document id." }, "creatorTeamId": { "type": "string", "description": "TeamBattles document id." }, "acceptedTeamId": { "type": "string", "description": "TeamBattles document id." } }, "required": [ "matchId" ], "description": "A match was created." }, "MatchForfeitedPayload": { "type": "object", "properties": { "matchId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "leagueId": { "type": "string", "description": "TeamBattles document id." }, "leagueSeasonId": { "type": "string", "description": "TeamBattles document id." }, "creatorTeamId": { "type": "string", "description": "TeamBattles document id." }, "acceptedTeamId": { "type": "string", "description": "TeamBattles document id." }, "forfeitedByTeamId": { "type": "string", "description": "TeamBattles document id." }, "reason": { "type": "string" } }, "required": [ "matchId" ], "description": "A match was forfeited." }, "MatchPublishedPayload": { "type": "object", "properties": { "matchId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "leagueId": { "type": "string", "description": "TeamBattles document id." }, "leagueSeasonId": { "type": "string", "description": "TeamBattles document id." }, "creatorTeamId": { "type": "string", "description": "TeamBattles document id." }, "acceptedTeamId": { "type": "string", "description": "TeamBattles document id." } }, "required": [ "matchId" ], "description": "A match was published." }, "MatchReadyPayload": { "type": "object", "properties": { "matchId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "leagueId": { "type": "string", "description": "TeamBattles document id." }, "leagueSeasonId": { "type": "string", "description": "TeamBattles document id." }, "creatorTeamId": { "type": "string", "description": "TeamBattles document id." }, "acceptedTeamId": { "type": "string", "description": "TeamBattles document id." } }, "required": [ "matchId" ], "description": "A match became ready." }, "MatchStartedPayload": { "type": "object", "properties": { "matchId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "leagueId": { "type": "string", "description": "TeamBattles document id." }, "leagueSeasonId": { "type": "string", "description": "TeamBattles document id." }, "creatorTeamId": { "type": "string", "description": "TeamBattles document id." }, "acceptedTeamId": { "type": "string", "description": "TeamBattles document id." } }, "required": [ "matchId" ], "description": "A match started." }, "OrganizationCreatedPayload": { "type": "object", "properties": { "organizationId": { "type": "string", "description": "TeamBattles document id." } }, "required": [ "organizationId" ], "description": "An organization was created." }, "OrganizationDisabledPayload": { "type": "object", "properties": { "organizationId": { "type": "string", "description": "TeamBattles document id." } }, "required": [ "organizationId" ], "description": "An organization was disabled." }, "OrganizationEnabledPayload": { "type": "object", "properties": { "organizationId": { "type": "string", "description": "TeamBattles document id." } }, "required": [ "organizationId" ], "description": "An organization was enabled." }, "OrganizationMemberAddedPayload": { "type": "object", "properties": { "organizationId": { "type": "string", "description": "TeamBattles document id." }, "userId": { "type": "string", "description": "TeamBattles document id." }, "role": { "type": "string" } }, "required": [ "organizationId", "userId" ], "description": "An organization member was added." }, "OrganizationMemberRemovedPayload": { "type": "object", "properties": { "organizationId": { "type": "string", "description": "TeamBattles document id." }, "userId": { "type": "string", "description": "TeamBattles document id." } }, "required": [ "organizationId", "userId" ], "description": "An organization member was removed." }, "OrganizationMemberRoleChangedPayload": { "type": "object", "properties": { "organizationId": { "type": "string", "description": "TeamBattles document id." }, "userId": { "type": "string", "description": "TeamBattles document id." }, "oldRole": { "type": "string" }, "newRole": { "type": "string" } }, "required": [ "organizationId", "userId" ], "description": "An organization member role changed." }, "OrganizationOwnershipTransferredPayload": { "type": "object", "properties": { "organizationId": { "type": "string", "description": "TeamBattles document id." }, "oldOwnerId": { "type": "string", "description": "TeamBattles document id." }, "newOwnerId": { "type": "string", "description": "TeamBattles document id." } }, "required": [ "organizationId", "newOwnerId" ], "description": "Organization ownership changed." }, "OrganizationRemovedPayload": { "type": "object", "properties": { "organizationId": { "type": "string", "description": "TeamBattles document id." } }, "required": [ "organizationId" ], "description": "An organization was removed." }, "OrganizationUnbannedPayload": { "type": "object", "properties": { "organizationId": { "type": "string", "description": "TeamBattles document id." }, "userId": { "type": "string", "description": "TeamBattles document id." } }, "required": [ "organizationId", "userId" ], "description": "An organization user ban was revoked." }, "OrganizationUpdatedPayload": { "type": "object", "properties": { "organizationId": { "type": "string", "description": "TeamBattles document id." }, "fields": { "type": "array", "items": { "type": "string" } } }, "required": [ "organizationId" ], "description": "An organization was updated." }, "OrganizationUserBannedPayload": { "type": "object", "properties": { "organizationId": { "type": "string", "description": "TeamBattles document id." }, "userId": { "type": "string", "description": "TeamBattles document id." }, "reason": { "type": "string" } }, "required": [ "organizationId", "userId" ], "description": "A user was banned from an organization." }, "PaymentFailedPayload": { "type": "object", "properties": { "paymentId": { "type": "string", "description": "TeamBattles document id." }, "userId": { "type": "string", "description": "TeamBattles document id." }, "amount": { "type": "number" }, "currency": { "type": "string" } }, "required": [ "paymentId" ], "description": "A payment failed." }, "PaymentRefundedPayload": { "type": "object", "properties": { "paymentId": { "type": "string", "description": "TeamBattles document id." }, "userId": { "type": "string", "description": "TeamBattles document id." }, "amount": { "type": "number" }, "currency": { "type": "string" } }, "required": [ "paymentId" ], "description": "A payment was refunded." }, "PaymentSucceededPayload": { "type": "object", "properties": { "paymentId": { "type": "string", "description": "TeamBattles document id." }, "userId": { "type": "string", "description": "TeamBattles document id." }, "amount": { "type": "number" }, "currency": { "type": "string" } }, "required": [ "paymentId" ], "description": "A payment succeeded." }, "PlayerCheckedInPayload": { "type": "object", "properties": { "matchId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "leagueId": { "type": "string", "description": "TeamBattles document id." }, "leagueSeasonId": { "type": "string", "description": "TeamBattles document id." }, "creatorTeamId": { "type": "string", "description": "TeamBattles document id." }, "acceptedTeamId": { "type": "string", "description": "TeamBattles document id." }, "teamId": { "type": "string", "description": "TeamBattles document id." }, "userId": { "type": "string", "description": "TeamBattles document id." }, "checkedInAt": { "type": "number", "description": "Unix epoch milliseconds." } }, "required": [ "matchId", "userId" ], "description": "A player checked in." }, "PlayerStatsUpdatedPayload": { "type": "object", "properties": { "matchId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "leagueId": { "type": "string", "description": "TeamBattles document id." }, "leagueSeasonId": { "type": "string", "description": "TeamBattles document id." }, "creatorTeamId": { "type": "string", "description": "TeamBattles document id." }, "acceptedTeamId": { "type": "string", "description": "TeamBattles document id." }, "teamId": { "type": "string", "description": "TeamBattles document id." }, "userId": { "type": "string", "description": "TeamBattles document id." }, "stats": { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "anyOf": [ { "type": "string" }, { "type": "number" }, { "type": "boolean" } ] } } }, "required": [ "matchId", "userId" ], "description": "Player stats changed." }, "RankUpdatedPayload": { "type": "object", "properties": { "userId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "oldRank": { "type": "string" }, "newRank": { "type": "string" }, "source": { "type": "string" } }, "required": [ "userId" ], "description": "A user rank changed." }, "ReferralMilestonePayload": { "type": "object", "properties": { "userId": { "type": "string", "description": "TeamBattles document id." }, "referralId": { "type": "string", "description": "TeamBattles document id." }, "milestone": { "type": "string" } }, "required": [ "userId" ], "description": "A referral milestone was reached." }, "RosterUpdatedPayload": { "type": "object", "properties": { "matchId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "leagueId": { "type": "string", "description": "TeamBattles document id." }, "leagueSeasonId": { "type": "string", "description": "TeamBattles document id." }, "creatorTeamId": { "type": "string", "description": "TeamBattles document id." }, "acceptedTeamId": { "type": "string", "description": "TeamBattles document id." }, "teamId": { "type": "string", "description": "TeamBattles document id." }, "playerIds": { "type": "array", "items": { "type": "string", "description": "TeamBattles document id." } } }, "required": [ "matchId" ], "description": "A match roster changed." }, "ScoreConfirmedPayload": { "type": "object", "properties": { "matchId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "leagueId": { "type": "string", "description": "TeamBattles document id." }, "leagueSeasonId": { "type": "string", "description": "TeamBattles document id." }, "creatorTeamId": { "type": "string", "description": "TeamBattles document id." }, "acceptedTeamId": { "type": "string", "description": "TeamBattles document id." }, "mapIndex": { "type": "number" }, "mapName": { "type": "string" }, "creatorTeamScore": { "type": "number" }, "acceptedTeamScore": { "type": "number" }, "confirmedByUserId": { "type": "string", "description": "TeamBattles document id." } }, "required": [ "matchId", "mapIndex" ], "description": "A score was confirmed." }, "ScoreDisputeResolvedPayload": { "type": "object", "properties": { "matchId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "leagueId": { "type": "string", "description": "TeamBattles document id." }, "leagueSeasonId": { "type": "string", "description": "TeamBattles document id." }, "creatorTeamId": { "type": "string", "description": "TeamBattles document id." }, "acceptedTeamId": { "type": "string", "description": "TeamBattles document id." }, "mapIndex": { "type": "number" }, "resolvedByUserId": { "type": "string", "description": "TeamBattles document id." }, "resolution": { "type": "string" } }, "required": [ "matchId" ], "description": "A score dispute was resolved." }, "ScoreDisputedPayload": { "type": "object", "properties": { "matchId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "leagueId": { "type": "string", "description": "TeamBattles document id." }, "leagueSeasonId": { "type": "string", "description": "TeamBattles document id." }, "creatorTeamId": { "type": "string", "description": "TeamBattles document id." }, "acceptedTeamId": { "type": "string", "description": "TeamBattles document id." }, "mapIndex": { "type": "number" }, "disputedByUserId": { "type": "string", "description": "TeamBattles document id." }, "reason": { "type": "string" } }, "required": [ "matchId" ], "description": "A score was disputed." }, "ScoreSubmittedPayload": { "type": "object", "properties": { "matchId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "leagueId": { "type": "string", "description": "TeamBattles document id." }, "leagueSeasonId": { "type": "string", "description": "TeamBattles document id." }, "creatorTeamId": { "type": "string", "description": "TeamBattles document id." }, "acceptedTeamId": { "type": "string", "description": "TeamBattles document id." }, "mapIndex": { "type": "number" }, "mapName": { "type": "string" }, "creatorTeamScore": { "type": "number" }, "acceptedTeamScore": { "type": "number" }, "submittedByUserId": { "type": "string", "description": "TeamBattles document id." }, "autoConfirmed": { "type": "boolean" } }, "required": [ "matchId", "mapIndex" ], "description": "A score was submitted." }, "StreamOfflinePayload": { "type": "object", "properties": { "channelId": { "type": "string" }, "userId": { "type": "string", "description": "TeamBattles document id." }, "platform": { "type": "string" }, "endedAt": { "type": "number", "description": "Unix epoch milliseconds." } }, "required": [ "channelId" ], "description": "A stream went offline." }, "StreamOnlinePayload": { "type": "object", "properties": { "channelId": { "type": "string" }, "userId": { "type": "string", "description": "TeamBattles document id." }, "platform": { "type": "string" }, "startedAt": { "type": "number", "description": "Unix epoch milliseconds." } }, "required": [ "channelId" ], "description": "A stream went online." }, "SubscriptionCancelledPayload": { "type": "object", "properties": { "userId": { "type": "string", "description": "TeamBattles document id." }, "productFamily": { "type": "string" }, "planId": { "type": "string" } }, "required": [ "userId" ], "description": "A subscription was cancelled." }, "SubscriptionCreatedPayload": { "type": "object", "properties": { "userId": { "type": "string", "description": "TeamBattles document id." }, "productFamily": { "type": "string" }, "planId": { "type": "string" } }, "required": [ "userId" ], "description": "A subscription was created." }, "SubscriptionUpdatedPayload": { "type": "object", "properties": { "userId": { "type": "string", "description": "TeamBattles document id." }, "productFamily": { "type": "string" }, "planId": { "type": "string" } }, "required": [ "userId" ], "description": "A subscription changed." }, "TeamBannedPayload": { "type": "object", "properties": { "teamId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "organizationId": { "type": "string", "description": "TeamBattles document id." }, "leagueId": { "type": "string", "description": "TeamBattles document id." }, "reason": { "type": "string" } }, "required": [ "teamId" ], "description": "A team was banned." }, "TeamCreatedPayload": { "type": "object", "properties": { "teamId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "organizationId": { "type": "string", "description": "TeamBattles document id." } }, "required": [ "teamId" ], "description": "A team was created." }, "TeamDisbandedPayload": { "type": "object", "properties": { "teamId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "organizationId": { "type": "string", "description": "TeamBattles document id." } }, "required": [ "teamId" ], "description": "A team was disbanded." }, "TeamJoinedPayload": { "type": "object", "properties": { "teamId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "organizationId": { "type": "string", "description": "TeamBattles document id." }, "matchId": { "type": "string", "description": "TeamBattles document id." }, "leagueId": { "type": "string", "description": "TeamBattles document id." } }, "required": [ "teamId" ], "description": "A team joined a match or league." }, "TeamLeftPayload": { "type": "object", "properties": { "teamId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "organizationId": { "type": "string", "description": "TeamBattles document id." }, "matchId": { "type": "string", "description": "TeamBattles document id." }, "leagueId": { "type": "string", "description": "TeamBattles document id." } }, "required": [ "teamId" ], "description": "A team left a match or league." }, "TeamMemberRoleChangedPayload": { "type": "object", "properties": { "teamId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "organizationId": { "type": "string", "description": "TeamBattles document id." }, "userId": { "type": "string", "description": "TeamBattles document id." }, "oldRole": { "type": "string" }, "newRole": { "type": "string" } }, "required": [ "teamId", "userId" ], "description": "A team member role changed." }, "TeamUpdatedPayload": { "type": "object", "properties": { "teamId": { "type": "string", "description": "TeamBattles document id." }, "gameId": { "type": "string", "description": "TeamBattles document id." }, "organizationId": { "type": "string", "description": "TeamBattles document id." }, "fields": { "type": "array", "items": { "type": "string" } } }, "required": [ "teamId" ], "description": "A team was updated." }, "TicketClosedPayload": { "type": "object", "properties": { "ticketId": { "type": "string", "description": "TeamBattles document id." }, "userId": { "type": "string", "description": "TeamBattles document id." }, "category": { "type": "string" } }, "required": [ "ticketId" ], "description": "A support ticket was closed." }, "TicketCreatedPayload": { "type": "object", "properties": { "ticketId": { "type": "string", "description": "TeamBattles document id." }, "userId": { "type": "string", "description": "TeamBattles document id." }, "category": { "type": "string" } }, "required": [ "ticketId" ], "description": "A support ticket was created." }, "TicketReopenedPayload": { "type": "object", "properties": { "ticketId": { "type": "string", "description": "TeamBattles document id." }, "userId": { "type": "string", "description": "TeamBattles document id." }, "category": { "type": "string" } }, "required": [ "ticketId" ], "description": "A support ticket was reopened." }, "TicketUpdatedPayload": { "type": "object", "properties": { "ticketId": { "type": "string", "description": "TeamBattles document id." }, "userId": { "type": "string", "description": "TeamBattles document id." }, "fields": { "type": "array", "items": { "type": "string" } } }, "required": [ "ticketId" ], "description": "A support ticket changed." }, "TrophyAwardedPayload": { "type": "object", "properties": { "userId": { "type": "string", "description": "TeamBattles document id." }, "trophyId": { "type": "string", "description": "TeamBattles document id." }, "awardedAt": { "type": "number", "description": "Unix epoch milliseconds." } }, "required": [ "userId", "trophyId" ], "description": "A trophy was awarded." }, "GameMatch": { "type": "object", "properties": { "id": { "type": "string" }, "status": { "$ref": "#/components/schemas/MatchStatus" }, "gameMode": { "type": "string", "description": "Game mode identifier (from the match's gameModeId)." }, "bestOf": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Number of maps in the series (1, 3, 5, or 7)." }, "creatorTeam": { "anyOf": [ { "$ref": "#/components/schemas/Team" }, { "type": "null" } ] }, "acceptedTeam": { "anyOf": [ { "$ref": "#/components/schemas/Team" }, { "type": "null" } ] }, "creatorTeamScore": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] }, "acceptedTeamScore": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] }, "scheduledAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Scheduled start time (ISO 8601)." }, "startedAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Actual start time (ISO 8601)." }, "completedAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Completion time (ISO 8601)." }, "createdAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Creation time (ISO 8601)." } }, "required": [ "id", "status", "gameMode", "bestOf", "creatorTeam", "acceptedTeam", "creatorTeamScore", "acceptedTeamScore", "scheduledAt", "startedAt", "completedAt", "createdAt" ], "additionalProperties": false, "description": "Match as returned by the game-developer endpoints (includes scores, omits the game object)." }, "MatchStatus": { "type": "string", "enum": [ "PENDING", "ACCEPTED", "READY", "IN_PROGRESS", "COMPLETED", "CANCELLED", "DISPUTED", "FORFEITED" ], "description": "Lifecycle status of a match." }, "Team": { "type": "object", "properties": { "id": { "type": "string", "description": "Team ID." }, "name": { "type": "string", "description": "Team name." }, "tag": { "type": "string", "description": "Team tag (short identifier)." }, "avatarUrl": { "description": "Team avatar URL.", "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "name", "tag" ], "additionalProperties": false, "description": "A team participating in a match." }, "Error": { "type": "object", "properties": { "error": { "type": "string", "description": "Stable machine-readable error code (e.g. error_api_key_invalid). Treat this, not the message, as the programmatic contract." }, "details": { "description": "Optional human-readable explanation. Often absent on auth/permission errors.", "x-ms-primary-error-message": true, "type": "string" } }, "required": [ "error" ], "additionalProperties": false, "description": "Standard API error response." }, "GameMatchDetailResponse": { "type": "object", "properties": { "match": { "$ref": "#/components/schemas/GameMatchDetail" }, "timestamp": { "type": "string", "description": "Server response time (ISO 8601)." } }, "required": [ "match", "timestamp" ], "additionalProperties": false, "description": "Envelope for GET /game/matches/{matchId}: the match plus a response timestamp." }, "GameMatchDetail": { "type": "object", "properties": { "id": { "type": "string" }, "gameId": { "type": "string", "description": "Game ID the match belongs to." }, "gameMode": { "type": "string", "description": "Game mode identifier (from the match's gameModeId)." }, "status": { "$ref": "#/components/schemas/MatchStatus" }, "bestOf": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Number of maps in the series (1, 3, 5, or 7)." }, "creatorTeam": { "anyOf": [ { "$ref": "#/components/schemas/GameDetailTeam" }, { "type": "null" } ] }, "acceptedTeam": { "anyOf": [ { "$ref": "#/components/schemas/GameDetailTeam" }, { "type": "null" } ] }, "creatorTeamScore": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] }, "acceptedTeamScore": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] }, "winnerTeamId": { "description": "Winning team ID once the match completes.", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "loserTeamId": { "description": "Losing team ID once the match completes.", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "scheduledAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Scheduled start time (ISO 8601)." }, "startedAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Actual start time (ISO 8601)." }, "completedAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Completion time (ISO 8601)." }, "createdAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Creation time (ISO 8601)." }, "leagueId": { "description": "League this match belongs to, if any (SP-7 league wave).", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "leagueSeasonId": { "description": "League season this match belongs to, if any.", "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "gameId", "gameMode", "status", "bestOf", "creatorTeam", "acceptedTeam", "creatorTeamScore", "acceptedTeamScore", "scheduledAt", "startedAt", "completedAt", "createdAt" ], "additionalProperties": false, "description": "Detailed match payload returned inside the game-developer match-detail response." }, "GameDetailTeam": { "type": "object", "properties": { "_id": { "type": "string", "description": "Team ID." }, "name": { "type": "string", "description": "Team name." }, "tag": { "type": "string", "description": "Team tag (short identifier)." } }, "required": [ "_id", "name", "tag" ], "additionalProperties": false, "description": "A team as embedded in the game-developer match-detail response ({ _id, name, tag })." }, "GameForfeitResponse": { "type": "object", "properties": { "success": { "type": "boolean", "const": true }, "matchId": { "type": "string", "description": "ID of the forfeited match." }, "forfeitedByTeamId": { "type": "string", "description": "ID of the team that forfeited." }, "timestamp": { "type": "string", "description": "Server response time (ISO 8601)." } }, "required": [ "success", "matchId", "forfeitedByTeamId", "timestamp" ], "additionalProperties": false, "description": "Result of a successful match forfeit." }, "GamePlayerStatsResponse": { "type": "object", "properties": { "success": { "type": "boolean", "const": true }, "mapIndex": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Index of the map whose stats were updated." }, "action": { "type": "string", "description": "Operation performed, always \"updated\" on success." } }, "required": [ "success", "mapIndex", "action" ], "additionalProperties": false, "description": "Result of a successful player-stats update." }, "GameMatchRostersResponse": { "type": "object", "properties": { "creatorTeamId": { "type": "string", "description": "ID of the team that created the match." }, "acceptedTeamId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "ID of the team that accepted the match, or null if unaccepted." }, "creatorRoster": { "type": "array", "items": { "$ref": "#/components/schemas/GameRosterPlayer" }, "description": "Players on the creator team." }, "acceptedRoster": { "type": "array", "items": { "$ref": "#/components/schemas/GameRosterPlayer" }, "description": "Players on the accepted team (empty when unaccepted)." }, "timestamp": { "type": "string", "description": "Server response time (ISO 8601)." } }, "required": [ "creatorTeamId", "acceptedTeamId", "creatorRoster", "acceptedRoster", "timestamp" ], "additionalProperties": false, "description": "Team rosters for a match, grouped by creator and accepted team." }, "GameRosterPlayer": { "type": "object", "properties": { "userId": { "type": "string", "description": "Player's user ID." }, "teamId": { "type": "string", "description": "ID of the team the player belongs to." }, "username": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Player's username, or null if unset." }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Player's display name, or null if unset." }, "isCheckedIn": { "type": "boolean", "description": "Whether the player has checked in for the match." } }, "required": [ "userId", "teamId", "username", "name", "isCheckedIn" ], "additionalProperties": false, "description": "A single player entry on a match roster." }, "GameScoresResponse": { "type": "object", "properties": { "scores": { "type": "array", "items": { "$ref": "#/components/schemas/GameScore" }, "description": "All recorded map scores for the match." }, "seriesScore": { "$ref": "#/components/schemas/GameSeriesScore" }, "timestamp": { "type": "string", "description": "Server response time (ISO 8601)." } }, "required": [ "scores", "seriesScore", "timestamp" ], "additionalProperties": false, "description": "All map scores for a match plus the aggregate series tally." }, "GameScore": { "type": "object", "properties": { "mapIndex": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Zero-based index of the map within the series." }, "mapId": { "type": "string", "description": "Identifier of the map that was played." }, "creatorTeamScore": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Score for the creator team." }, "opponentTeamScore": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Score for the opponent (accepted) team." }, "scoreStatus": { "type": "string", "description": "Confirmation state: \"CONFIRMED\" or \"PENDING\"." }, "playerStats": { "anyOf": [ { "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": {} }, { "type": "null" } ], "description": "Per-player stats keyed by user ID, or null when none recorded." }, "submittedAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "When the score was submitted (ISO 8601)." }, "confirmedAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "When the score was confirmed (ISO 8601)." } }, "required": [ "mapIndex", "mapId", "creatorTeamScore", "opponentTeamScore", "scoreStatus", "playerStats", "submittedAt", "confirmedAt" ], "additionalProperties": false, "description": "A single map score as returned when reading scores." }, "GameSeriesScore": { "type": "object", "properties": { "creatorMapWins": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Confirmed map wins for the creator team." }, "opponentMapWins": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Confirmed map wins for the opponent team." } }, "required": [ "creatorMapWins", "opponentMapWins" ], "additionalProperties": false, "description": "Aggregate map-win tally across the series." }, "GameBatchScoresResponse": { "type": "object", "properties": { "success": { "type": "boolean", "description": "True only when every submitted map score was confirmed." }, "submitted": { "type": "array", "items": { "$ref": "#/components/schemas/GameBatchScoreResult" }, "description": "Per-map results, in submission order." }, "count": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Number of map scores that were confirmed." } }, "required": [ "success", "submitted", "count" ], "additionalProperties": false, "description": "Result of a batch map-score submission." }, "GameBatchScoreResult": { "type": "object", "properties": { "mapIndex": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Index of the map this result refers to." }, "status": { "type": "string", "description": "Per-map outcome: \"confirmed\" on success, \"failed\" otherwise." }, "error": { "description": "Failure reason, present only when status is failed.", "type": "string" } }, "required": [ "mapIndex", "status" ], "additionalProperties": false, "description": "Outcome for a single submitted map score." }, "GameSingleMapScoreResponse": { "type": "object", "properties": { "success": { "type": "boolean", "const": true }, "mapIndex": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Index of the map that was scored." }, "scoreStatus": { "type": "string", "description": "Confirmation state, always \"CONFIRMED\" on success." } }, "required": [ "success", "mapIndex", "scoreStatus" ], "additionalProperties": false, "description": "Result of submitting a single map score." }, "GameStatusUpdateResponse": { "type": "object", "properties": { "success": { "type": "boolean", "const": true }, "matchId": { "type": "string", "description": "ID of the updated match." }, "previousStatus": { "type": "string", "description": "Match status before the transition." }, "newStatus": { "type": "string", "description": "Match status after the transition." }, "timestamp": { "type": "string", "description": "Server response time (ISO 8601)." } }, "required": [ "success", "matchId", "previousStatus", "newStatus", "timestamp" ], "additionalProperties": false, "description": "Result of a successful match status transition." }, "GameBatchMatchScoresResponse": { "type": "object", "properties": { "success": { "type": "boolean", "description": "True only when every submitted item was confirmed." }, "submitted": { "type": "array", "items": { "$ref": "#/components/schemas/GameBatchMatchScoreResult" }, "description": "Per-item results, in submission order." }, "count": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Number of items that were confirmed." } }, "required": [ "success", "submitted", "count" ], "additionalProperties": false, "description": "Result of a multi-match batch map-score submission. Always returned with HTTP 200; inspect per-item status." }, "GameBatchMatchScoreResult": { "type": "object", "properties": { "matchId": { "type": "string", "description": "Match ID this result refers to." }, "mapIndex": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Index of the map this result refers to." }, "status": { "type": "string", "description": "Per-item outcome: \"confirmed\" on success, \"failed\" otherwise." }, "error": { "description": "Bare machine-readable error code (e.g. error_game_scope_mismatch), present only when status is failed. Never the raw message.", "type": "string" } }, "required": [ "matchId", "mapIndex", "status" ], "additionalProperties": false, "description": "Outcome for a single (match, map) item in a multi-match batch." }, "GameCreateMatchResponse": { "type": "object", "properties": { "success": { "type": "boolean", "const": true }, "matchId": { "type": "string", "description": "ID of the newly created match." }, "timestamp": { "type": "string", "description": "Server response time (ISO 8601)." } }, "required": [ "success", "matchId", "timestamp" ], "additionalProperties": false, "description": "Result of a successful game-originated match creation." }, "ApiGameCatalogResponse": { "type": "object", "properties": { "games": { "type": "array", "items": { "$ref": "#/components/schemas/ApiGameCatalogEntry" } }, "objectives": { "type": "array", "items": { "$ref": "#/components/schemas/ApiObjective" } }, "timestamp": { "type": "string" } }, "required": [ "games", "objectives", "timestamp" ], "additionalProperties": false, "description": "Game catalog list response." }, "ApiGameCatalogEntry": { "type": "object", "properties": { "id": { "type": "string", "description": "Static public game ID/slug." }, "convexId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Active Convex games-table ID, when available for match APIs." }, "nameKey": { "type": "string" }, "shortNameKey": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "descriptionKey": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "category": { "type": "string" }, "rulesLink": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "coverImage": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "bannerImage": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "defaultTeamSize": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "hasCompetitiveMode": { "type": "boolean" }, "isComingSoon": { "type": "boolean" }, "isAvailableForMatchApi": { "type": "boolean" }, "modes": { "type": "array", "items": { "$ref": "#/components/schemas/ApiGameMode" } }, "maps": { "type": "array", "items": { "$ref": "#/components/schemas/ApiGameMap" } }, "playlists": { "type": "array", "items": { "$ref": "#/components/schemas/ApiGamePlaylist" } }, "modeMapPools": { "type": "array", "items": { "$ref": "#/components/schemas/ApiGameModeMapPool" } } }, "required": [ "id", "convexId", "nameKey", "shortNameKey", "descriptionKey", "category", "rulesLink", "coverImage", "bannerImage", "defaultTeamSize", "hasCompetitiveMode", "isComingSoon", "isAvailableForMatchApi", "modes", "maps", "playlists", "modeMapPools" ], "additionalProperties": false, "description": "Static public game catalog entry." }, "ApiGameMode": { "type": "object", "properties": { "id": { "type": "string" }, "nameKey": { "type": "string" }, "descriptionKey": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "image": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "shortName": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "rewardBonus": { "anyOf": [ { "type": "number" }, { "type": "null" } ] }, "supportsDraftToggle": { "type": "boolean" }, "mapIds": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "nameKey", "descriptionKey", "image", "shortName", "rewardBonus", "supportsDraftToggle", "mapIds" ], "additionalProperties": false, "description": "Static game mode definition." }, "ApiGameMap": { "type": "object", "properties": { "id": { "type": "string" }, "nameKey": { "type": "string" }, "coverImage": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "minimapImage": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "isReleased": { "type": "boolean" } }, "required": [ "id", "nameKey", "coverImage", "minimapImage", "isReleased" ], "additionalProperties": false, "description": "Static game map definition." }, "ApiGamePlaylist": { "type": "object", "properties": { "id": { "type": "string" }, "nameKey": { "type": "string" }, "descriptionKey": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "image": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "allowedGameModeIds": { "type": "array", "items": { "type": "string" } } }, "required": [ "id", "nameKey", "descriptionKey", "image", "allowedGameModeIds" ], "additionalProperties": false, "description": "Game-scoped playlist definition." }, "ApiGameModeMapPool": { "type": "object", "properties": { "modeId": { "type": "string" }, "mapIds": { "type": "array", "items": { "type": "string" } } }, "required": [ "modeId", "mapIds" ], "additionalProperties": false, "description": "Game-scoped map pool for a single mode." }, "ApiObjective": { "type": "object", "properties": { "id": { "type": "string", "description": "Objective definition ID." }, "titleKey": { "type": "string", "description": "i18n key for the objective title." }, "descriptionKey": { "type": "string", "description": "i18n key for the objective description." }, "exp": { "type": "number", "minimum": 0, "description": "Experience awarded by this objective." }, "scope": { "type": "string", "description": "Objective completion scope." }, "completionRule": { "type": "string", "description": "Machine-readable completion rule." } }, "required": [ "id", "titleKey", "descriptionKey", "exp", "scope", "completionRule" ], "additionalProperties": false, "description": "Server-safe objective DTO. UI icon components are intentionally omitted." }, "ApiGamePlaylistsResponse": { "type": "object", "properties": { "game": { "$ref": "#/components/schemas/ApiGameCatalogEntry" }, "playlists": { "type": "array", "items": { "$ref": "#/components/schemas/ApiGamePlaylist" } }, "timestamp": { "type": "string" } }, "required": [ "game", "playlists", "timestamp" ], "additionalProperties": false, "description": "Game-scoped playlist response." }, "OrganizationLeaderboardResponse": { "type": "object", "properties": { "organizations": { "type": "array", "items": { "$ref": "#/components/schemas/OrganizationLeaderboardEntry" } }, "sortBy": { "$ref": "#/components/schemas/LeaderboardSortBy" }, "gameSlug": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "timestamp": { "type": "string" } }, "required": [ "organizations", "sortBy", "gameSlug", "timestamp" ], "additionalProperties": false, "description": "Organization leaderboard response." }, "OrganizationLeaderboardEntry": { "type": "object", "properties": { "id": { "type": "string", "description": "Organization ID." }, "rank": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "organization": { "$ref": "#/components/schemas/ApiOrganizationSummary" }, "stats": { "type": "object", "properties": { "matchesPlayed": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "wins": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "losses": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "winRate": { "type": "number", "minimum": 0, "maximum": 1 }, "experience": { "type": "number", "minimum": 0 }, "teamCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 } }, "required": [ "matchesPlayed", "wins", "losses", "winRate", "experience", "teamCount" ], "additionalProperties": false }, "gameSlug": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "rank", "organization", "stats" ], "additionalProperties": false, "description": "Organization leaderboard row." }, "ApiOrganizationSummary": { "type": "object", "properties": { "id": { "type": "string", "description": "Organization ID." }, "slug": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "name": { "type": "string", "description": "Organization name." }, "tag": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatarUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "visibility": { "$ref": "#/components/schemas/ProfileVisibility" } }, "required": [ "id", "name" ], "additionalProperties": false, "description": "Small API-safe organization summary." }, "ProfileVisibility": { "type": "string", "enum": [ "public", "limited", "private" ], "description": "Public profile visibility setting." }, "LeaderboardRankResponse": { "type": "object", "properties": { "id": { "type": "string", "description": "Resolved entity ID." }, "rank": { "anyOf": [ { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, { "type": "null" } ] }, "sortBy": { "$ref": "#/components/schemas/LeaderboardSortBy" }, "gameSlug": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "timestamp": { "type": "string" } }, "required": [ "id", "rank", "sortBy", "timestamp" ], "additionalProperties": false, "description": "Leaderboard rank lookup response." }, "PlayerLeaderboardResponse": { "type": "object", "properties": { "players": { "type": "array", "items": { "$ref": "#/components/schemas/PlayerLeaderboardEntry" } }, "sortBy": { "$ref": "#/components/schemas/LeaderboardSortBy" }, "timestamp": { "type": "string" } }, "required": [ "players", "sortBy", "timestamp" ], "additionalProperties": false, "description": "Player leaderboard response." }, "PlayerLeaderboardEntry": { "type": "object", "properties": { "id": { "type": "string", "description": "User ID." }, "rank": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "user": { "$ref": "#/components/schemas/ApiUserProfile" }, "stats": { "$ref": "#/components/schemas/LeaderboardStats" } }, "required": [ "id", "rank", "user", "stats" ], "additionalProperties": false, "description": "Player leaderboard row." }, "ApiUserProfile": { "type": "object", "properties": { "id": { "type": "string", "description": "User ID." }, "username": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "User handle, when set." }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Display name, when set." }, "avatarUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Avatar image URL, when set." }, "bannerUrl": { "description": "Banner image URL, when set.", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "isVerified": { "type": "boolean" }, "bio": { "description": "Public profile bio.", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "visibility": { "$ref": "#/components/schemas/ProfileVisibility" }, "createdAt": { "anyOf": [ { "type": "string", "description": "ISO 8601 timestamp." }, { "type": "null" } ] } }, "required": [ "id", "username", "name", "avatarUrl", "visibility", "createdAt" ], "additionalProperties": false, "description": "API-safe public user profile." }, "LeaderboardStats": { "type": "object", "properties": { "matchesPlayed": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "wins": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "losses": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "winRate": { "type": "number", "minimum": 0, "maximum": 1 }, "experience": { "type": "number", "minimum": 0 } }, "required": [ "matchesPlayed", "wins", "losses", "winRate", "experience" ], "additionalProperties": false, "description": "Aggregate stats used for leaderboard ranking." }, "TeamLeaderboardResponse": { "type": "object", "properties": { "teams": { "type": "array", "items": { "$ref": "#/components/schemas/TeamLeaderboardEntry" } }, "sortBy": { "$ref": "#/components/schemas/LeaderboardSortBy" }, "gameSlug": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "timestamp": { "type": "string" } }, "required": [ "teams", "sortBy", "gameSlug", "timestamp" ], "additionalProperties": false, "description": "Team leaderboard response." }, "TeamLeaderboardEntry": { "type": "object", "properties": { "id": { "type": "string", "description": "Team ID." }, "rank": { "type": "integer", "exclusiveMinimum": 0, "maximum": 9007199254740991 }, "team": { "$ref": "#/components/schemas/ApiTeamSummary" }, "stats": { "$ref": "#/components/schemas/LeaderboardStats" }, "gameSlug": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "rank", "team", "stats" ], "additionalProperties": false, "description": "Team leaderboard row." }, "ApiTeamSummary": { "type": "object", "properties": { "id": { "type": "string", "description": "Team ID." }, "slug": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "name": { "type": "string", "description": "Team name." }, "tag": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatarUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "visibility": { "$ref": "#/components/schemas/ProfileVisibility" } }, "required": [ "id", "name" ], "additionalProperties": false, "description": "Small API-safe team summary." }, "LeagueSummary": { "type": "object", "properties": { "id": { "type": "string", "description": "League ID." }, "name": { "type": "string", "description": "League display name." }, "slug": { "type": "string", "description": "URL-friendly league identifier." }, "description": { "type": "string", "description": "League description." }, "avatarUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "League avatar image URL." }, "bannerUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "League banner image URL." }, "isVerified": { "type": "boolean", "description": "Whether the league is verified." }, "isFeatured": { "type": "boolean", "description": "Whether the league is featured." }, "games": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": {} }, "description": "Games associated with the league." }, "teamCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Number of teams in the league." }, "seasonStatus": { "type": "string", "enum": [ "active", "upcoming", "none" ], "description": "Aggregate season state across the league's games." }, "createdAt": { "type": "number", "description": "Creation timestamp (epoch milliseconds)." }, "status": { "description": "League status.", "type": "string" } }, "required": [ "id", "name", "slug", "description", "avatarUrl", "bannerUrl", "isVerified", "isFeatured", "games", "teamCount", "seasonStatus", "createdAt" ], "additionalProperties": false, "description": "Summary view of a league for discovery results." }, "LeagueProfileResponse": { "type": "object", "properties": { "league": { "$ref": "#/components/schemas/LeagueProfile" }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "league", "timestamp" ], "additionalProperties": false, "description": "League profile response envelope." }, "LeagueProfile": { "type": "object", "properties": { "id": { "type": "string", "description": "League ID." }, "name": { "type": "string", "description": "League display name." }, "slug": { "type": "string", "description": "URL-friendly league identifier." }, "description": { "type": "string", "description": "League description." }, "avatarUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "League avatar image URL." }, "bannerUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "League banner image URL." }, "status": { "type": "string", "description": "League status (e.g. active, inactive)." }, "isVerified": { "type": "boolean", "description": "Whether the league is verified." }, "isFeatured": { "type": "boolean", "description": "Whether the league is featured." }, "teamCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Number of teams in the league." }, "staffCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Number of staff members." }, "games": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": {} }, "description": "Games associated with the league." }, "activeSeasons": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": {} }, "description": "Currently active seasons." }, "socials": { "anyOf": [ { "type": "object", "properties": {}, "additionalProperties": {} }, { "type": "null" } ], "description": "Social media links." }, "createdAt": { "type": "number", "description": "Creation timestamp (epoch milliseconds)." } }, "required": [ "id", "name", "slug", "description", "avatarUrl", "bannerUrl", "status", "isVerified", "isFeatured", "teamCount", "staffCount", "games", "activeSeasons", "socials", "createdAt" ], "additionalProperties": false, "description": "Public profile for a single league." }, "LeagueApplyEligibility": { "type": "object", "properties": { "eligibility": { "type": "object", "properties": { "isAuthed": { "type": "boolean" }, "hasApprovedTeamHere": { "type": "boolean" }, "pendingTeams": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": {} } }, "eligibleTeams": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": {} } } }, "required": [ "isAuthed", "hasApprovedTeamHere", "pendingTeams", "eligibleTeams" ], "additionalProperties": false, "description": "API key owner's apply-to-join eligibility." }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "eligibility", "timestamp" ], "additionalProperties": false, "description": "League application eligibility." }, "LeagueBans": { "type": "object", "properties": { "bans": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": {} }, "description": "Enriched team ban records with computed status." }, "count": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Number of bans returned." }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "bans", "count", "timestamp" ], "additionalProperties": false, "description": "Team bans for a league." }, "RevokeBanResponse": { "type": "object", "properties": { "success": { "type": "boolean", "const": true }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "success", "timestamp" ], "additionalProperties": false }, "CreateBanResponse": { "type": "object", "properties": { "success": { "type": "boolean", "const": true }, "banId": { "type": "string", "description": "Created league ban ID." }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "success", "banId", "timestamp" ], "additionalProperties": false }, "ClearCooldownResponse": { "type": "object", "properties": { "success": { "type": "boolean", "const": true }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "success", "timestamp" ], "additionalProperties": false }, "IssueCooldownResponse": { "type": "object", "properties": { "success": { "type": "boolean", "const": true }, "cooldownId": { "type": "string", "description": "League member cooldown ID." }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "success", "cooldownId", "timestamp" ], "additionalProperties": false }, "LeagueDisplayRules": { "type": "object", "properties": { "displayRules": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": {} }, "description": "Display rule documents for the league game." }, "count": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Number of display rules returned." }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "displayRules", "count", "timestamp" ], "additionalProperties": false, "description": "League display rules." }, "LeagueGames": { "type": "object", "properties": { "games": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": {} }, "description": "Games configured for the league." }, "count": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Number of configured games returned." }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "games", "count", "timestamp" ], "additionalProperties": false, "description": "Games configured for a league." }, "LeagueMembers": { "type": "object", "properties": { "members": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": {} }, "description": "Enriched league staff member records." }, "count": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Number of members returned." }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "members", "count", "timestamp" ], "additionalProperties": false, "description": "Staff members of a league." }, "RemoveLeagueMemberResponse": { "type": "object", "properties": { "success": { "type": "boolean", "const": true }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "success", "timestamp" ], "additionalProperties": false }, "UpdateLeagueMemberRoleResponse": { "type": "object", "properties": { "success": { "type": "boolean", "const": true }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "success", "timestamp" ], "additionalProperties": false }, "AddLeagueMemberResponse": { "type": "object", "properties": { "success": { "type": "boolean", "const": true }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "success", "timestamp" ], "additionalProperties": false }, "LeaguePenalties": { "type": "object", "properties": { "penalties": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": {} }, "description": "Enriched penalty records (empty when type is cooldowns)." }, "cooldowns": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": {} }, "description": "Enriched member cooldown records (empty when type is penalties)." }, "count": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Combined number of penalties and cooldowns returned." }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "penalties", "cooldowns", "count", "timestamp" ], "additionalProperties": false, "description": "Penalties and cooldowns for a league." }, "CreatePenaltyResponse": { "type": "object", "properties": { "success": { "type": "boolean", "const": true }, "penaltyId": { "type": "string", "description": "Created league penalty ID." }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "success", "penaltyId", "timestamp" ], "additionalProperties": false }, "LeagueRules": { "type": "object", "properties": { "rules": { "anyOf": [ { "type": "object", "properties": {}, "additionalProperties": {} }, { "type": "null" } ], "description": "Game rules document for the league + game, or null if unset." }, "pointsConfig": { "anyOf": [ { "type": "object", "properties": {}, "additionalProperties": {} }, { "type": "null" } ], "description": "Points configuration document for the league + game, or null if unset." }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "rules", "pointsConfig", "timestamp" ], "additionalProperties": false, "description": "Game rules and points config for a league." }, "LeagueSeasonOptions": { "type": "object", "properties": { "seasons": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": {} }, "description": "Season selector options for a league game." }, "defaultSeasonId": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Recommended default option." }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "seasons", "defaultSeasonId", "timestamp" ], "additionalProperties": false, "description": "Season selector options." }, "LeagueSeasons": { "type": "object", "properties": { "seasons": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": {} }, "description": "Season documents for the league." }, "count": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Number of seasons returned." }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "seasons", "count", "timestamp" ], "additionalProperties": false, "description": "Seasons for a league." }, "DeleteLeagueSeasonResponse": { "type": "object", "properties": { "success": { "type": "boolean", "const": true }, "timestamp": { "type": "string" } }, "required": [ "success", "timestamp" ], "additionalProperties": false }, "LeagueSeason": { "type": "object", "properties": { "season": { "type": "object", "properties": {}, "additionalProperties": {}, "description": "The requested league season." }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "season", "timestamp" ], "additionalProperties": false, "description": "Single league season response." }, "ActivateLeagueSeasonResponse": { "type": "object", "properties": { "success": { "type": "boolean", "const": true }, "timestamp": { "type": "string" } }, "required": [ "success", "timestamp" ], "additionalProperties": false }, "CompleteLeagueSeasonResponse": { "type": "object", "properties": { "success": { "type": "boolean", "const": true }, "timestamp": { "type": "string" } }, "required": [ "success", "timestamp" ], "additionalProperties": false }, "CreateSeasonResponse": { "type": "object", "properties": { "success": { "type": "boolean", "const": true }, "seasonId": { "type": "string" }, "timestamp": { "type": "string" } }, "required": [ "success", "seasonId", "timestamp" ], "additionalProperties": false }, "LeagueStandings": { "type": "object", "properties": { "standings": { "type": "array", "items": { "type": "object", "properties": { "rank": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "1-based standings position." } }, "required": [ "rank" ], "additionalProperties": {} }, "description": "Approved teams with season stats, ordered by standings position. Each item is a team-with-stats document plus a computed rank." }, "count": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Number of teams returned." }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "standings", "count", "timestamp" ], "additionalProperties": false, "description": "League standings for a season." }, "LeagueTemplates": { "type": "object", "properties": { "templates": { "type": "array", "items": { "type": "object", "properties": {}, "additionalProperties": {} }, "description": "Rule templates visible to the API key owner." }, "count": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Number of templates returned." }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "templates", "count", "timestamp" ], "additionalProperties": false, "description": "League rule templates." }, "ApiMatchDetailResponse": { "type": "object", "properties": { "match": { "$ref": "#/components/schemas/ApiMatchDetail" }, "timestamp": { "type": "string" } }, "required": [ "match", "timestamp" ], "additionalProperties": false, "description": "SP-2 match detail response." }, "ApiMatchDetail": { "type": "object", "properties": { "id": { "type": "string" }, "status": { "$ref": "#/components/schemas/MatchStatus" }, "publishStatus": { "type": "string" }, "game": { "$ref": "#/components/schemas/Game" }, "gameMode": { "type": "string" }, "matchType": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "platform": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "region": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "creatorTeam": { "anyOf": [ { "$ref": "#/components/schemas/ApiMatchTeam" }, { "type": "null" } ] }, "acceptedTeam": { "anyOf": [ { "$ref": "#/components/schemas/ApiMatchTeam" }, { "type": "null" } ] }, "challengedTeam": { "anyOf": [ { "$ref": "#/components/schemas/ApiMatchTeam" }, { "type": "null" } ] }, "bestOf": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "teamSize": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "selectedMaps": { "type": "array", "items": { "type": "string" } }, "selectedObjectives": { "type": "array", "items": { "type": "string" } }, "winnerTeamId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "scheduledAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "startedAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "completedAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "createdAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "leagueId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "leagueSeasonId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "status", "publishStatus", "game", "gameMode", "creatorTeam", "acceptedTeam", "bestOf", "teamSize", "selectedMaps", "selectedObjectives", "winnerTeamId", "scheduledAt", "startedAt", "completedAt", "createdAt" ], "additionalProperties": false, "description": "Participant-gated SP-2 match detail. Lobby codes are intentionally omitted." }, "Game": { "type": "object", "properties": { "id": { "type": "string", "description": "Game ID." }, "nameKey": { "type": "string", "description": "Game name key for i18n lookup." } }, "required": [ "id", "nameKey" ], "additionalProperties": false, "description": "Game definition." }, "ApiMatchTeam": { "type": "object", "properties": { "id": { "type": "string", "description": "Team ID." }, "name": { "type": "string", "description": "Team name." }, "tag": { "type": "string", "description": "Team tag (short identifier)." }, "avatarUrl": { "description": "Team avatar URL.", "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "score": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ] } }, "required": [ "id", "name", "tag" ], "additionalProperties": false, "description": "Team summary embedded in SP-2 match reads." }, "ApiMatchPlayersResponse": { "type": "object", "properties": { "matchId": { "type": "string" }, "players": { "type": "array", "items": { "$ref": "#/components/schemas/ApiMatchPlayer" } }, "timestamp": { "type": "string" } }, "required": [ "matchId", "players", "timestamp" ], "additionalProperties": false, "description": "SP-2 match player rows response." }, "ApiMatchPlayer": { "type": "object", "properties": { "id": { "type": "string" }, "userId": { "type": "string" }, "teamId": { "type": "string" }, "username": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatarUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "rosterType": { "type": "string", "enum": [ "ACTIVE", "BENCH" ] }, "attendanceStatus": { "type": "string", "enum": [ "ATTENDING", "NOT_ATTENDING", "TENTATIVE" ] }, "isCheckedIn": { "type": "boolean" }, "checkedInAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "id", "userId", "teamId", "username", "name", "rosterType", "attendanceStatus", "isCheckedIn", "checkedInAt" ], "additionalProperties": false, "description": "Player row for a participant-gated match." }, "MapScores": { "type": "object", "properties": { "scores": { "type": "array", "items": { "$ref": "#/components/schemas/MapScoreItem" } }, "seriesScore": { "type": "object", "properties": { "creatorMapWins": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "opponentMapWins": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "creatorMapWins", "opponentMapWins" ], "additionalProperties": false }, "timestamp": { "type": "string", "description": "Response timestamp (ISO 8601)." } }, "required": [ "scores", "seriesScore", "timestamp" ], "additionalProperties": false, "description": "All map scores for a match with a series summary." }, "MapScoreItem": { "type": "object", "properties": { "mapIndex": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "mapId": { "type": "string" }, "creatorTeamScore": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "opponentTeamScore": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "screenshotUrls": { "type": "array", "items": { "type": "string" } }, "scoreStatus": { "type": "string", "description": "CONFIRMED or PENDING." }, "submittedBy": { "anyOf": [ { "$ref": "#/components/schemas/ScoreSubmitter" }, { "type": "null" } ] }, "confirmedBy": { "anyOf": [ { "$ref": "#/components/schemas/ScoreConfirmer" }, { "type": "null" } ] }, "createdAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Creation time (ISO 8601)." } }, "required": [ "mapIndex", "mapId", "creatorTeamScore", "opponentTeamScore", "screenshotUrls", "scoreStatus", "submittedBy", "confirmedBy", "createdAt" ], "additionalProperties": false, "description": "A single map's score entry." }, "ScoreSubmitter": { "type": "object", "properties": { "userId": { "type": "string" }, "teamId": { "type": "string" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "userId", "teamId", "name" ], "additionalProperties": false, "description": "Identity of the captain who submitted a score." }, "ScoreConfirmer": { "type": "object", "properties": { "userId": { "type": "string" }, "teamId": { "type": "string" }, "confirmedAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Confirmation time (ISO 8601)." } }, "required": [ "userId", "teamId", "confirmedAt" ], "additionalProperties": false, "description": "Identity of the captain who confirmed a score." }, "ScoreSubmissionResult": { "type": "object", "properties": { "success": { "type": "boolean" }, "action": { "type": "string", "description": "Action performed, e.g. \"submitted\" or \"confirmed\"." }, "mapIndex": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Zero-based map index that was affected." }, "scoreStatus": { "type": "string", "description": "Resulting score status, e.g. PENDING or CONFIRMED." } }, "required": [ "success", "action", "mapIndex", "scoreStatus" ], "additionalProperties": false, "description": "Result of submitting or confirming a map score." }, "MatchDiscoverPage": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/components/schemas/ApiMatchDetail" } }, "nextCursor": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "hasMore": { "type": "boolean" }, "timestamp": { "type": "string" } }, "required": [ "data", "nextCursor", "hasMore", "timestamp" ], "additionalProperties": false, "description": "SP-2 open-match discovery page." }, "ApiOrganizationProfile": { "type": "object", "properties": { "id": { "type": "string", "description": "Organization ID." }, "slug": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "name": { "type": "string", "description": "Organization name." }, "tag": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatarUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "visibility": { "$ref": "#/components/schemas/ProfileVisibility" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "bannerUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "isVerified": { "type": "boolean" }, "isMember": { "type": "boolean" }, "memberCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "teamCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "wins": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "losses": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "draws": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "matchesPlayed": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "createdAt": { "anyOf": [ { "type": "string", "description": "ISO 8601 timestamp." }, { "type": "null" } ] } }, "required": [ "id", "name", "isMember", "createdAt" ], "additionalProperties": false, "description": "API-safe organization profile." }, "UserMatch": { "type": "object", "properties": { "id": { "type": "string" }, "status": { "$ref": "#/components/schemas/MatchStatus" }, "game": { "$ref": "#/components/schemas/Game" }, "gameMode": { "type": "string", "description": "Game mode (e.g. HARDPOINT, SEARCH_AND_DESTROY)." }, "creatorTeam": { "anyOf": [ { "$ref": "#/components/schemas/Team" }, { "type": "null" } ] }, "acceptedTeam": { "anyOf": [ { "$ref": "#/components/schemas/Team" }, { "type": "null" } ] }, "scheduledAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Scheduled start time (ISO 8601)." }, "startedAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Actual start time (ISO 8601)." }, "completedAt": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Completion time (ISO 8601)." }, "bestOf": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Number of maps in the series (1, 3, 5, or 7)." } }, "required": [ "id", "status", "game", "gameMode", "creatorTeam", "acceptedTeam", "scheduledAt", "startedAt", "completedAt", "bestOf" ], "additionalProperties": false, "description": "Match as returned by the user/team/org match-listing endpoints." }, "ApiMember": { "type": "object", "properties": { "id": { "type": "string", "description": "Membership row ID." }, "user": { "$ref": "#/components/schemas/ApiUserProfile" }, "role": { "type": "string", "description": "Role label within the team or organization." }, "joinedAt": { "anyOf": [ { "type": "string", "description": "ISO 8601 timestamp." }, { "type": "null" } ] } }, "required": [ "id", "user", "role", "joinedAt" ], "additionalProperties": false, "description": "API-safe team or organization member." }, "ApiOrganizationStats": { "type": "object", "properties": { "organizationId": { "type": "string" }, "teams": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "members": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "matchesPlayed": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "wins": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "losses": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "winRate": { "type": "number", "minimum": 0, "maximum": 1 } }, "required": [ "organizationId", "teams", "members", "matchesPlayed", "wins", "losses", "winRate" ], "additionalProperties": false, "description": "API-safe organization aggregate stats." }, "ApiTeamProfile": { "type": "object", "properties": { "id": { "type": "string", "description": "Team ID." }, "slug": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "name": { "type": "string", "description": "Team name." }, "tag": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatarUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "visibility": { "$ref": "#/components/schemas/ProfileVisibility" }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "bannerUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "gameId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "organizationId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "isMember": { "type": "boolean" }, "memberCount": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "wins": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "losses": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "draws": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "matchesPlayed": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "experience": { "type": "number", "minimum": 0 }, "createdAt": { "anyOf": [ { "type": "string", "description": "ISO 8601 timestamp." }, { "type": "null" } ] } }, "required": [ "id", "name", "isMember", "createdAt" ], "additionalProperties": false, "description": "API-safe team profile." }, "TwitchChannelBadges": { "type": "object", "properties": { "broadcaster_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Resolved broadcaster (channel) id." }, "broadcaster_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Resolved broadcaster display name or login." }, "badges": { "type": "array", "items": { "$ref": "#/components/schemas/TwitchBadgeSet" }, "description": "Channel-specific Twitch chat badge sets." }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "broadcaster_id", "broadcaster_name", "badges", "timestamp" ], "additionalProperties": false, "description": "Channel-specific Twitch chat badges." }, "TwitchBadgeSet": { "type": "object", "properties": { "set_id": { "type": "string", "description": "Badge set identifier (e.g. subscriber, moderator)." }, "versions": { "type": "array", "items": { "$ref": "#/components/schemas/TwitchBadgeVersion" }, "description": "Available versions within this badge set." } }, "required": [ "set_id", "versions" ], "additionalProperties": false, "description": "A set of related Twitch chat badge versions." }, "TwitchBadgeVersion": { "type": "object", "properties": { "id": { "type": "string", "description": "Badge version id (e.g. tier level or numeric id)." }, "image_url_1x": { "type": "string", "description": "Badge image URL at 1x resolution." }, "image_url_2x": { "type": "string", "description": "Badge image URL at 2x resolution." }, "image_url_4x": { "type": "string", "description": "Badge image URL at 4x resolution." }, "title": { "type": "string", "description": "Human-readable badge title." }, "description": { "type": "string", "description": "Human-readable badge description." }, "click_action": { "description": "Optional click action identifier.", "type": "string" }, "click_url": { "description": "Optional URL opened when the badge is clicked.", "type": "string" } }, "required": [ "id", "image_url_1x", "image_url_2x", "image_url_4x", "title", "description" ], "additionalProperties": false, "description": "A single version of a Twitch chat badge." }, "TwitchGlobalBadges": { "type": "object", "properties": { "badges": { "type": "array", "items": { "$ref": "#/components/schemas/TwitchBadgeSet" }, "description": "Global Twitch chat badge sets." }, "timestamp": { "type": "string", "description": "Response generation time (ISO 8601)." } }, "required": [ "badges", "timestamp" ], "additionalProperties": false, "description": "Global Twitch chat badges." }, "OngoingMatchesResponse": { "type": "object", "properties": { "matches": { "type": "array", "items": { "$ref": "#/components/schemas/ApiMatchDetail" } }, "timestamp": { "type": "string" } }, "required": [ "matches", "timestamp" ], "additionalProperties": false, "description": "Ongoing matches for the API key owner's active teams." }, "ApiUserConnection": { "type": "object", "properties": { "id": { "type": "string", "description": "Connection ID." }, "platform": { "type": "string", "description": "Connected platform." }, "username": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "url": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "isPrimary": { "type": "boolean" }, "isVerified": { "type": "boolean" }, "connectedAt": { "anyOf": [ { "type": "string", "description": "ISO 8601 timestamp." }, { "type": "null" } ] } }, "required": [ "id", "platform" ], "additionalProperties": false, "description": "API-safe public account connection." }, "ApiUserOrganizationMembership": { "type": "object", "properties": { "id": { "type": "string", "description": "Organization ID." }, "slug": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "name": { "type": "string", "description": "Organization name." }, "tag": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatarUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "visibility": { "$ref": "#/components/schemas/ProfileVisibility" }, "role": { "type": "string" }, "joinedAt": { "anyOf": [ { "type": "string", "description": "ISO 8601 timestamp." }, { "type": "null" } ] } }, "required": [ "id", "name", "role", "joinedAt" ], "additionalProperties": false, "description": "API-safe organization affiliation row on a user profile." }, "ApiUserStats": { "type": "object", "properties": { "userId": { "type": "string", "description": "User ID these stats belong to." }, "matchesPlayed": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "wins": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "losses": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "draws": { "type": "integer", "minimum": 0, "maximum": 9007199254740991 }, "winRate": { "type": "number", "minimum": 0, "maximum": 1 }, "experience": { "type": "number", "minimum": 0 }, "currentStreak": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "bestStreak": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 } }, "required": [ "userId", "matchesPlayed", "wins", "losses", "winRate", "experience" ], "additionalProperties": false, "description": "API-safe aggregate user stats." }, "ApiUserTeamMembership": { "type": "object", "properties": { "id": { "type": "string", "description": "Team ID." }, "slug": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "name": { "type": "string", "description": "Team name." }, "tag": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "avatarUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "visibility": { "$ref": "#/components/schemas/ProfileVisibility" }, "role": { "type": "string" }, "joinedAt": { "anyOf": [ { "type": "string", "description": "ISO 8601 timestamp." }, { "type": "null" } ] }, "organization": { "anyOf": [ { "$ref": "#/components/schemas/ApiOrganizationSummary" }, { "type": "null" } ] } }, "required": [ "id", "name", "role", "joinedAt" ], "additionalProperties": false, "description": "API-safe team affiliation row on a user profile." }, "ApiUserTrophy": { "type": "object", "properties": { "id": { "type": "string", "description": "Trophy award ID." }, "trophyId": { "type": "string", "description": "Trophy definition ID." }, "title": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "description": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "iconUrl": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "rarity": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "awardedAt": { "anyOf": [ { "type": "string", "description": "ISO 8601 timestamp." }, { "type": "null" } ] } }, "required": [ "id", "trophyId", "awardedAt" ], "additionalProperties": false, "description": "API-safe user trophy. Event linkage fields are intentionally omitted." }, "WebhookListResponse": { "type": "object", "properties": { "webhooks": { "type": "array", "items": { "$ref": "#/components/schemas/WebhookEndpoint" } }, "count": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "timestamp": { "type": "string" } }, "required": [ "webhooks", "count", "timestamp" ], "additionalProperties": false, "description": "List of the caller's webhook endpoints." }, "WebhookEndpoint": { "type": "object", "properties": { "id": { "type": "string", "description": "Webhook endpoint id." }, "scopeType": { "type": "string", "enum": [ "game", "league", "org", "team", "user" ], "description": "The single scope dimension an endpoint is bound to." }, "scopeId": { "type": "string", "description": "Stringified bound scope id." }, "url": { "type": "string", "description": "Delivery URL." }, "secretPrefix": { "type": "string", "description": "First 8 chars of the current signing secret (display only)." }, "events": { "type": "array", "items": { "type": "string" }, "description": "Subscribed event tokens." }, "isActive": { "type": "boolean", "description": "Whether the endpoint receives deliveries." }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Human label, or null." }, "failureCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Consecutive dead-lettered deliveries (auto-disables at 50)." }, "lastDeliveredAt": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "description": "Epoch ms of the last successful delivery, or null." }, "lastFailedAt": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "description": "Epoch ms of the last failed delivery, or null." }, "createdAt": { "type": "number", "description": "Creation epoch ms." }, "updatedAt": { "type": "number", "description": "Last update epoch ms." } }, "required": [ "id", "scopeType", "scopeId", "url", "secretPrefix", "events", "isActive", "label", "failureCount", "lastDeliveredAt", "lastFailedAt", "createdAt", "updatedAt" ], "additionalProperties": false, "description": "A webhook endpoint (no secret material)." }, "WebhookSecret": { "type": "object", "properties": { "id": { "type": "string", "description": "The endpoint id the secret belongs to." }, "signingSecret": { "type": "string", "description": "Plaintext signing secret. Shown ONCE - store it now." }, "secretPrefix": { "type": "string", "description": "First 8 chars of the new signing secret." } }, "required": [ "id", "signingSecret", "secretPrefix" ], "additionalProperties": false, "description": "One-time signing-secret reveal (create/rotate)." }, "WebhookOk": { "type": "object", "properties": { "ok": { "type": "boolean" } }, "required": [ "ok" ], "additionalProperties": false, "description": "Success ack." }, "WebhookDelivery": { "type": "object", "properties": { "id": { "type": "string", "description": "Delivery-log row id." }, "idempotencyId": { "type": "string", "description": "Stable evt_ id, reused across retries (idempotency key)." }, "event": { "type": "string", "description": "The delivered event name." }, "status": { "type": "string", "enum": [ "pending", "delivering", "delivered", "failed", "dead_lettered" ], "description": "Lifecycle status of one logical delivery (endpoint x idempotency id)." }, "attemptCount": { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991, "description": "Number of delivery attempts made." }, "statusCode": { "anyOf": [ { "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, { "type": "null" } ], "description": "Last HTTP response status, or null." }, "errorMessage": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "description": "Last error message, or null." }, "nextAttemptAt": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "description": "Epoch ms of the next scheduled retry, or null." }, "isTest": { "type": "boolean", "description": "True for test.ping deliveries." }, "createdAt": { "type": "number", "description": "Emit/creation epoch ms (retention key)." }, "updatedAt": { "type": "number", "description": "Last update epoch ms." }, "deliveredAt": { "anyOf": [ { "type": "number" }, { "type": "null" } ], "description": "Epoch ms of successful delivery, or null." } }, "required": [ "id", "idempotencyId", "event", "status", "attemptCount", "statusCode", "errorMessage", "nextAttemptAt", "isTest", "createdAt", "updatedAt", "deliveredAt" ], "additionalProperties": false, "description": "A single webhook delivery-log row." }, "WebhookReplayResult": { "type": "object", "properties": { "ok": { "type": "boolean" } }, "required": [ "ok" ], "additionalProperties": false, "description": "Replay re-queue acknowledgement." }, "WebhookTestResult": { "type": "object", "properties": { "delivered": { "type": "boolean", "description": "Whether the test.ping returned a 2xx." }, "statusCode": { "description": "HTTP response status, if any.", "type": "integer", "minimum": -9007199254740991, "maximum": 9007199254740991 }, "error": { "description": "Failure reason, if not delivered.", "type": "string" } }, "required": [ "delivered" ], "additionalProperties": false, "description": "Outcome of a single test.ping delivery." }, "ApiErrorCode": { "type": "string", "enum": [ "error_api_key_invalid", "error_api_key_expired", "error_api_key_muted", "error_api_rate_limited", "error_api_key_permission_denied", "error_api_key_required", "error_api_plan_required", "error_api_feature_required", "error_developer_account_required", "error_game_scope_mismatch", "error_league_scope_mismatch", "error_unauthorized", "error_user_banned", "error_invalid_input", "error_invalid_request", "error_invalid_limit", "error_invalid_cursor", "error_invalid_date_format", "error_forbidden", "error_user_not_found", "error_team_not_found", "error_org_not_found", "error_match_not_found", "error_game_not_found", "error_league_not_found", "error_league_game_not_found", "error_league_game_not_active", "error_league_season_not_found", "error_league_admin_required", "error_league_team_not_in_league", "error_not_match_participant", "error_not_team_leader", "error_internal", "error_webhook_not_found", "error_webhook_url_invalid", "error_webhook_limit_reached", "error_webhook_invalid_events", "error_webhook_delivery_not_found", "error_webhook_replay_not_allowed", "error_webhook_scope_invalid", "error_idempotency_key_conflict" ], "description": "Stable machine-readable API error code (documentation enum)." }, "WebhookEnvelope": { "type": "object", "properties": { "id": { "type": "string", "description": "Stable delivery id, reused across retries (idempotency key)." }, "event": { "type": "string", "enum": [ "match.accepted", "match.cancelled", "match.completed", "match.created", "match.forfeited", "match.published", "match.ready", "match.started", "score.confirmed", "score.dispute_resolved", "score.disputed", "score.submitted", "roster.updated", "player.checked_in", "player.stats_updated", "team.banned", "team.created", "team.disbanded", "team.joined", "team.left", "team.member_role_changed", "team.updated", "organization.created", "organization.disabled", "organization.enabled", "organization.member_added", "organization.member_removed", "organization.member_role_changed", "organization.ownership_transferred", "organization.removed", "organization.unbanned", "organization.updated", "organization.user_banned", "league.ban_revoked", "league.cooldown_cleared", "league.cooldown_issued", "league.created", "league.display_rules_updated", "league.featured", "league.game_added", "league.game_removed", "league.game_toggled", "league.ownership_transferred", "league.penalty_issued", "league.points_updated", "league.rules_updated", "league.season_activated", "league.season_completed", "league.season_created", "league.season_removed", "league.settings_updated", "league.shutdown", "league.shutdown_requested", "league.staff_invited", "league.staff_removed", "league.staff_role_changed", "league.standings_updated", "league.suspended", "league.team_approved", "league.team_banned", "league.team_denied", "league.team_removed", "league.unfeatured", "league.unsuspended", "league.verified", "rank.updated", "stream.offline", "stream.online", "subscription.cancelled", "subscription.created", "subscription.updated", "payment.failed", "payment.refunded", "payment.succeeded", "ticket.closed", "ticket.created", "ticket.reopened", "ticket.updated", "chat.message_reported", "custommap.scan_completed", "achievement.unlocked", "referral.milestone", "trophy.awarded" ], "description": "The event name from the TeamBattles catalog." }, "created_at": { "type": "string", "description": "ISO-8601 timestamp the event was emitted." }, "data": { "type": "object", "properties": {}, "additionalProperties": {}, "description": "Event-specific payload." } }, "required": [ "id", "event", "created_at", "data" ], "additionalProperties": false, "description": "Shared envelope for all TeamBattles webhook deliveries." } }, "securitySchemes": { "ApiKeyAuth": { "type": "http", "scheme": "bearer", "bearerFormat": "API Key", "description": "Send your API key as: Authorization: Bearer tb_" } } } }