{"openapi":"3.1.0","info":{"title":"PIGDI - Public Immutable Game Data Interface","description":"Public API for accessing Arch MC game statistics.\n\n## Authentication\nAll endpoints require the `X-API-KEY` header with a valid API key.\nAPI keys can be obtained through the in-game `/api` command after linking your Discord account.\n\n## Rate Limiting\n- 100 requests per minute per account by default, shared across all of its keys\n- Rate limit headers are included in all responses\n\n## Statistic ID Format\nStatistics follow the format: `{type}:{kit}:{queueType}:{lifetime}`\n\nExamples:\n- `elo:nodebuff:ranked:lifetime` - Ranked ELO for NoDebuff kit\n- `wins:global:casual:daily` - Daily casual wins across all kits\n\n## Match History\nMinigame and arcade rounds (BedWars, SkyWars, Battle Royale and the arcade games)\nwrite a match report when they end: who played, who won, the kit, map and timing.\nStart from `/v1/players/uuid/{uuid}/matches`, then follow a `matchId` into\n`/v1/matches/{matchId}`.\n\nA match appears once it ended at least 5 minutes ago and is kept for 7 days.\nDuels are kept for only 60 seconds, so they never appear. For lifetime totals\n(wins, losses, streaks, ELO) use the `Players` and `Leaderboards` endpoints.","contact":{"name":"Arch MC","url":"https://arch.mc"},"version":"1.0.0"},"servers":[{"url":"https://api.arch.mc","description":"Generated server url"}],"security":[{"ApiKeyAuth":[]}],"tags":[{"name":"Leaderboards","description":"Endpoints for accessing game leaderboards"},{"name":"Guilds","description":"\n        Read-only endpoints for accessing guild information.\n        \n        Guild data is cached in memory and refreshed every minute.\n    "},{"name":"Players","description":"Endpoints for accessing player statistics"},{"name":"UGC Statistics","description":"\n        Endpoints for accessing User Generated Content (UGC) gamemode statistics.\n        \n        Available gamemodes:\n        - **trojan**: Lifesteal - PvP gamemode with health stealing mechanics\n        - **spartan**: Survival - Classic survival experience\n    "},{"name":"Economy","description":"Endpoints for accessing player economy data (balances, profiles)"},{"name":"Statistics","description":"Endpoints for accessing statistic metadata"},{"name":"Matches","description":"Recent minigame and arcade results: who played, who won, kit, map and timing. A match only appears once it ended at least 5 minutes ago, and is kept for 7 days. Duels are kept for 60 seconds, so they never appear."}],"paths":{"/v1/ugc/{gamemode}/statistics":{"get":{"tags":["UGC Statistics"],"summary":"List available statistics for a gamemode","description":"\n            Returns all available statistic types that can be queried for the specified UGC gamemode.\n            \n            **Gamemodes:**\n            - `trojan` - Lifesteal gamemode\n            - `spartan` - Survival gamemode\n        ","operationId":"listStatistics","parameters":[{"name":"gamemode","in":"path","description":"UGC gamemode (trojan = Lifesteal, spartan = Survival)","required":true,"schema":{"type":"string","enum":["trojan","spartan"]}}],"responses":{"200":{"description":"List of available statistics","content":{"*/*":{"schema":{"type":"object"}}}},"400":{"description":"Invalid gamemode","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/ugc/{gamemode}/players/uuid/{uuid}/statistics":{"get":{"tags":["UGC Statistics"],"summary":"Get all statistics for a player by UUID","description":"\n            Retrieves all tracked statistics for a player in a specific UGC gamemode using their Minecraft UUID.\n            \n            **Gamemodes:**\n            - `trojan` - Lifesteal gamemode\n            - `spartan` - Survival gamemode\n        ","operationId":"getPlayerStatsByUuid","parameters":[{"name":"gamemode","in":"path","description":"UGC gamemode (trojan = Lifesteal, spartan = Survival)","required":true,"schema":{"type":"string","enum":["trojan","spartan"]}},{"name":"uuid","in":"path","description":"Minecraft UUID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Player statistics","content":{"*/*":{"schema":{"type":"object"}}}},"400":{"description":"Invalid gamemode or UUID format","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Player not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/ugc/{gamemode}/players/uuid/{uuid}/statistics/{statType}":{"get":{"tags":["UGC Statistics"],"summary":"Get a specific statistic for a player","description":"\n            Retrieves a single statistic value with ranking information for a player.\n            \n            **Gamemodes:**\n            - `trojan` - Lifesteal gamemode\n            - `spartan` - Survival gamemode\n        ","operationId":"getPlayerSpecificStat","parameters":[{"name":"gamemode","in":"path","description":"UGC gamemode (trojan = Lifesteal, spartan = Survival)","required":true,"schema":{"type":"string","enum":["trojan","spartan"]}},{"name":"uuid","in":"path","description":"Minecraft UUID","required":true,"schema":{"type":"string"}},{"name":"statType","in":"path","description":"Statistic type (e.g., kills, deaths, killstreak)","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Statistic value","content":{"*/*":{"schema":{"type":"object"}}}},"400":{"description":"Invalid gamemode or UUID format","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Player or statistic not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/ugc/{gamemode}/players/username/{username}/statistics":{"get":{"tags":["UGC Statistics"],"summary":"Get all statistics for a player by username","description":"\n            Retrieves all tracked statistics for a player in a specific UGC gamemode using their Minecraft username.\n            \n            **Gamemodes:**\n            - `trojan` - Lifesteal gamemode\n            - `spartan` - Survival gamemode\n        ","operationId":"getPlayerStatsByUsername","parameters":[{"name":"gamemode","in":"path","description":"UGC gamemode (trojan = Lifesteal, spartan = Survival)","required":true,"schema":{"type":"string","enum":["trojan","spartan"]}},{"name":"username","in":"path","description":"Minecraft username","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Player statistics","content":{"*/*":{"schema":{"type":"object"}}}},"400":{"description":"Invalid gamemode","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Player not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/ugc/{gamemode}/leaderboard/{statType}":{"get":{"tags":["UGC Statistics"],"summary":"Get leaderboard for a statistic","description":"\n            Returns the top 10 players for a specific statistic in a UGC gamemode.\n            \n            **Gamemodes:**\n            - `trojan` - Lifesteal gamemode\n            - `spartan` - Survival gamemode\n            \n            **Common stat types:** kills, deaths, killstreak, killDeathRatio, blocksMined, blocksWalked, blocksPlaced\n        ","operationId":"getLeaderboard","parameters":[{"name":"gamemode","in":"path","description":"UGC gamemode (trojan = Lifesteal, spartan = Survival)","required":true,"schema":{"type":"string","enum":["trojan","spartan"]}},{"name":"statType","in":"path","description":"Statistic type (e.g., kills, deaths, killstreak)","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Top 10 players","content":{"*/*":{"schema":{"type":"object"}}}},"400":{"description":"Invalid gamemode","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Statistic not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/ugc/{gamemode}/leaderboard/playtime":{"get":{"tags":["UGC Statistics"],"summary":"Get playtime leaderboard for a gamemode","description":"\n            Returns the top 10 players by total playtime in a UGC gamemode.\n            \n            **Gamemodes:**\n            - `trojan` - Lifesteal gamemode\n            - `spartan` - Survival gamemode\n            \n            The leaderboard is cached and refreshed every minute.\n        ","operationId":"getPlaytimeLeaderboard","parameters":[{"name":"gamemode","in":"path","description":"UGC gamemode (trojan = Lifesteal, spartan = Survival)","required":true,"schema":{"type":"string","enum":["trojan","spartan"]}}],"responses":{"200":{"description":"Top 10 players by playtime","content":{"*/*":{"schema":{"type":"object"}}}},"400":{"description":"Invalid gamemode","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/ugc/trojan/players/uuid/{uuid}/profile":{"get":{"tags":["UGC Statistics"],"summary":"Get Lifesteal profile by UUID","description":"\n            Returns a player's Lifesteal (trojan) profile with public statistics.\n            \n            Only hearts and playtime are exposed; homes, settings and everything else stay private.\n        ","operationId":"getLifestealProfileByUuid","parameters":[{"name":"uuid","in":"path","description":"Minecraft UUID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Lifesteal player profile","content":{"*/*":{"schema":{"type":"object"}}}},"400":{"description":"Invalid UUID format","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Profile not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/ugc/trojan/players/username/{username}/profile":{"get":{"tags":["UGC Statistics"],"summary":"Get Lifesteal profile by username","description":"\n            Returns a player's Lifesteal (trojan) profile with public statistics.\n            \n            Only hearts and playtime are exposed; homes, settings and everything else stay private.\n        ","operationId":"getLifestealProfileByUsername","parameters":[{"name":"username","in":"path","description":"Minecraft username","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Lifesteal player profile","content":{"*/*":{"schema":{"type":"object"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Profile not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/ugc/trojan/clans":{"get":{"tags":["UGC Statistics"],"summary":"Get top clans leaderboard","description":"\n            Returns the top 10 clans in the Lifesteal (trojan) gamemode,\n            sorted by clan level (experience / 1000).\n            \n            **Note:** This endpoint is only available for the Lifesteal (trojan) gamemode.\n        ","operationId":"getClanLeaderboard","responses":{"200":{"description":"Top 10 clans","content":{"*/*":{"schema":{"type":"object"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/statistics":{"get":{"tags":["Statistics"],"summary":"List the available statistic IDs","description":"Returns a complete list of all trackable statistic IDs in the system","operationId":"listStatistics_1","responses":{"200":{"description":"List of statistic IDs with metadata","content":{"*/*":{"schema":{"$ref":"#/components/schemas/StatisticsListResponse"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/statistics/{id}":{"get":{"tags":["Statistics"],"summary":"Get detailed information about a specific statistic","description":"Returns metadata and schema for a single statistic ID","operationId":"getStatistic","parameters":[{"name":"id","in":"path","description":"Full statistic ID (e.g., elo:nodebuff:ranked:lifetime)","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Statistic details","content":{"*/*":{"schema":{"type":"object"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Statistic not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/players/uuid/{uuid}/statistics":{"get":{"tags":["Players"],"summary":"Get all statistics for a player by UUID","description":"Retrieves a player's values for the statistics listed by /v1/statistics, by Minecraft UUID","operationId":"getStatsByUuid","parameters":[{"name":"uuid","in":"path","description":"Minecraft UUID","required":true,"schema":{"type":"string"}},{"name":"filter","in":"query","description":"Filter statistics by type (comma-separated)","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Player statistics","content":{"*/*":{"schema":{"type":"object"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"400":{"description":"Invalid UUID format","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Player not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/players/uuid/{uuid}/statistics/{statisticId}":{"get":{"tags":["Players"],"summary":"Get a specific statistic value for a player","description":"Retrieves a single statistic value with position and percentile","operationId":"getSpecificStat","parameters":[{"name":"uuid","in":"path","description":"Minecraft UUID","required":true,"schema":{"type":"string"}},{"name":"statisticId","in":"path","description":"Statistic ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Single statistic value","content":{"*/*":{"schema":{"type":"object"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Player or statistic not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/players/uuid/{uuid}/matches":{"get":{"tags":["Matches"],"summary":"List a player's recent matches by UUID","description":"Returns the player's retained match reports, most recently finished first. Covers BedWars, SkyWars, Battle Royale and the arcade games. Use the `kit` filter to narrow to one gamemode's kit. Matches that ended without a winner, or that the player played disguised, are omitted.","operationId":"getMatchesByUuid","parameters":[{"name":"uuid","in":"path","description":"Minecraft UUID","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Zero-indexed page number","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","description":"Matches per page; values above 50 are clamped to 50","required":false,"schema":{"type":"integer","format":"int32","default":20}},{"name":"kit","in":"query","description":"Only matches played with this kit display name, case-insensitive","required":false,"schema":{"type":"string"},"example":"NoDebuff"},{"name":"map","in":"query","description":"Only matches played on this map id, case-insensitive","required":false,"schema":{"type":"string"}},{"name":"result","in":"query","description":"Only wins or only losses; omit for both","required":false,"schema":{"type":"string","enum":["WIN","LOSS"]}}],"responses":{"200":{"description":"Page of matches, empty when nothing is retained","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MatchPage"}}}},"400":{"description":"Invalid UUID format","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/players/username/{username}/statistics":{"get":{"tags":["Players"],"summary":"Get all statistics for a player by username","description":"Retrieves a player's values for the statistics listed by /v1/statistics, by Minecraft username","operationId":"getStatsByUsername","parameters":[{"name":"username","in":"path","description":"Minecraft username","required":true,"schema":{"type":"string"}},{"name":"filter","in":"query","description":"Filter statistics by type (comma-separated)","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Player statistics","content":{"*/*":{"schema":{"type":"object"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Player not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/players/username/{username}/matches":{"get":{"tags":["Matches"],"summary":"List a player's recent matches by username","description":"Resolves the username through the network UUID cache, then behaves exactly like the UUID variant. A player who has never joined the network cannot be resolved and returns 404.","operationId":"getMatchesByUsername","parameters":[{"name":"username","in":"path","description":"Minecraft username","required":true,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Zero-indexed page number","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","description":"Matches per page; values above 50 are clamped to 50","required":false,"schema":{"type":"integer","format":"int32","default":20}},{"name":"kit","in":"query","description":"Only matches played with this kit display name, case-insensitive","required":false,"schema":{"type":"string"},"example":"NoDebuff"},{"name":"map","in":"query","description":"Only matches played on this map id, case-insensitive","required":false,"schema":{"type":"string"}},{"name":"result","in":"query","description":"Only wins or only losses; omit for both","required":false,"schema":{"type":"string","enum":["WIN","LOSS"]}}],"responses":{"200":{"description":"Page of matches, empty when nothing is retained","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MatchPage"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Player not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/matches/{matchId}":{"get":{"tags":["Matches"],"summary":"Get a single match report","description":"Returns who played, who won, the kit, map and timing. Match ids come from the listing endpoints.","operationId":"getMatch","parameters":[{"name":"matchId","in":"path","description":"Match id from a listing endpoint","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The match report","content":{"*/*":{"schema":{"$ref":"#/components/schemas/MatchSummary"}}}},"400":{"description":"Invalid match id format","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such match, or its report has already been reaped","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/leaderboards/{statisticId}":{"get":{"tags":["Leaderboards"],"summary":"Get top players for a statistic","description":"Returns the top 10 players for a statistic listed by /v1/statistics","operationId":"getLeaderboard_1","parameters":[{"name":"statisticId","in":"path","description":"Full statistic ID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Top 10 players","content":{"*/*":{"schema":{"type":"object"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Statistic not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/guilds":{"get":{"tags":["Guilds"],"summary":"List all guilds","description":"Returns a paginated list of all guilds.","operationId":"getAllGuilds","parameters":[{"name":"page","in":"query","description":"Page number (0-indexed)","required":false,"schema":{"type":"integer","format":"int32","default":0}},{"name":"size","in":"query","description":"Results per page (max 100)","required":false,"schema":{"type":"integer","format":"int32","default":10}}],"responses":{"200":{"description":"Paginated guild list","content":{"*/*":{"schema":{"type":"object"}}}},"400":{"description":"Invalid parameters","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/guilds/{id}":{"get":{"tags":["Guilds"],"summary":"Get guild by ID","description":"Returns a guild by its unique identifier (UUID).","operationId":"getGuildById","parameters":[{"name":"id","in":"path","description":"Guild UUID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Guild information","content":{"*/*":{"schema":{"type":"object"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Guild not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/guilds/search/name":{"get":{"tags":["Guilds"],"summary":"Search guilds by name","description":"Searches for guilds with names containing the query string (case-insensitive). Returns max 50 results.","operationId":"searchGuildsByName","parameters":[{"name":"q","in":"query","description":"Search query (case-insensitive)","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Search results","content":{"*/*":{"schema":{"type":"object"}}}},"400":{"description":"Missing query parameter","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/guilds/search/description":{"get":{"tags":["Guilds"],"summary":"Search guilds by description","description":"Searches for guilds with descriptions containing the query string (case-insensitive). Returns max 50 results.","operationId":"searchGuildsByDescription","parameters":[{"name":"q","in":"query","description":"Search query (case-insensitive)","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Search results","content":{"*/*":{"schema":{"type":"object"}}}},"400":{"description":"Missing query parameter","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/guilds/player/uuid/{uuid}":{"get":{"tags":["Guilds"],"summary":"Get guild by player UUID","description":"Returns the guild that a player belongs to, by player UUID.","operationId":"getGuildByPlayerUuid","parameters":[{"name":"uuid","in":"path","description":"Player's Minecraft UUID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Guild information","content":{"*/*":{"schema":{"type":"object"}}}},"400":{"description":"Invalid UUID format","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Player not in a guild","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/guilds/player/username/{username}":{"get":{"tags":["Guilds"],"summary":"Get guild by player username","description":"Returns the guild that a player belongs to, by player username.","operationId":"getGuildByPlayerUsername","parameters":[{"name":"username","in":"path","description":"Player's Minecraft username","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Guild information","content":{"*/*":{"schema":{"type":"object"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Player not found or not in a guild","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/economy/player/uuid/{uuid}":{"get":{"tags":["Economy"],"summary":"Get economy profile by UUID","description":"Retrieves a player's balance in every currency. Every currency the network defines is reported; one the player has never held reads as zero rather than being omitted.","operationId":"getEconomyProfileByUuid","parameters":[{"name":"uuid","in":"path","description":"Minecraft UUID","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Player economy profile","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EconomyProfileResponse"}}}},"400":{"description":"Invalid UUID format","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Player not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"The currency registry is unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/economy/player/username/{username}":{"get":{"tags":["Economy"],"summary":"Get economy profile by username","description":"Retrieves a player's balance in every currency. Every currency the network defines is reported; one the player has never held reads as zero rather than being omitted.","operationId":"getEconomyProfileByUsername","parameters":[{"name":"username","in":"path","description":"Minecraft username","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Player economy profile","content":{"*/*":{"schema":{"$ref":"#/components/schemas/EconomyProfileResponse"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"Player not found","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"The currency registry is unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/economy/baltop":{"get":{"tags":["Economy"],"summary":"Get balance top leaderboard for all currencies","description":"Returns the top players by balance for every currency the network currently defines (survival-coins, bedwars-experience, etc.). Currencies that have been deleted from the economy config are excluded even while their stale leaderboard lingers in cache.","operationId":"getBalTop","responses":{"200":{"description":"BalTop leaderboard map keyed by currency type","content":{"*/*":{"schema":{"type":"string"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"The currency registry is unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/v1/economy/baltop/{currency}":{"get":{"tags":["Economy"],"summary":"Get balance top leaderboard for a specific currency","description":"Returns the top players by balance for a specific currency type (e.g., survival-coins, bedwars-experience). A currency the network does not define is a 404; a currency that exists but whose leaderboard has not been published yet returns 200 with an empty list, so the two are never confused.","operationId":"getBalTopByCurrency","parameters":[{"name":"currency","in":"path","description":"Currency type (e.g., survival-coins, bedwars-experience)","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"BalTop leaderboard for the specified currency, empty when not yet published","content":{"*/*":{"schema":{"$ref":"#/components/schemas/BalTopResponse"}}}},"401":{"description":"Invalid or missing API key","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"404":{"description":"No such currency","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"429":{"description":"Rate limit exceeded","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"The currency registry is unavailable","content":{"*/*":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"ErrorResponse":{"type":"object","properties":{"error":{"type":"string"},"message":{"type":"string"},"timestamp":{"type":"integer","format":"int64"}}},"StatisticMetadata":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"kit":{"type":["string","null"]},"queueType":{"type":["string","null"]},"lifetime":{"type":"string"},"displayName":{"type":"string"},"defaultValue":{"type":"integer","format":"int64"}}},"StatisticsListResponse":{"type":"object","properties":{"statistics":{"type":"array","items":{"$ref":"#/components/schemas/StatisticMetadata"}},"count":{"type":"integer","format":"int32"}}},"MatchPage":{"type":"object","description":"A page of a player's recorded matches, most recent first","properties":{"uuid":{"type":"string","description":"The player the matches belong to"},"username":{"type":["string","null"]},"matches":{"type":"array","items":{"$ref":"#/components/schemas/MatchSummary"}},"page":{"type":"integer","format":"int32"},"pageSize":{"type":"integer","format":"int32"},"totalElements":{"type":"integer","format":"int64","description":"Total retained matches matching the query, across all pages"},"totalPages":{"type":"integer","format":"int32"}}},"MatchParticipant":{"type":"object","description":"A player who took part in a match","properties":{"uuid":{"type":"string","description":"Participant's Minecraft UUID, dashed"},"username":{"type":["string","null"],"description":"Username recorded on the match, falling back to the network UUID cache"},"bot":{"type":"boolean","description":"Whether this participant was a practice robot rather than a real account"},"result":{"$ref":"#/components/schemas/MatchResult"}}},"MatchResult":{"type":"string","description":"Outcome of a match relative to a single participant","enum":["WIN","LOSS","NONE"]},"MatchStatus":{"type":"string","description":"How a match finished","enum":["COMPLETED","FORCEFULLY_CLOSED","UNKNOWN"]},"MatchSummary":{"type":"object","description":"Summary of a single recorded match","properties":{"matchId":{"type":"string","description":"Match id — pass this to /v1/matches/{matchId}"},"kit":{"type":["string","null"],"description":"Kit the match was played with, as its in-game display name. Minigame matches carry their mode's kit here (for example the BedWars or SkyWars mode kit)","example":"NoDebuff"},"map":{"type":["string","null"],"description":"Map id the match was played on","example":"aerial"},"status":{"$ref":"#/components/schemas/MatchStatus"},"durationMillis":{"type":"integer","format":"int64","description":"How long the match lasted, in milliseconds"},"startedAt":{"type":["integer","null"],"format":"int64","description":"Epoch millis the match started, derived from the end time and duration"},"endedAt":{"type":["integer","null"],"format":"int64","description":"Epoch millis the match ended and the report was written"},"expiresAt":{"type":["integer","null"],"format":"int64","description":"Epoch millis this report is reaped from storage; see the Match History notes on retention"},"winners":{"type":"array","items":{"$ref":"#/components/schemas/MatchParticipant"}},"losers":{"type":"array","items":{"$ref":"#/components/schemas/MatchParticipant"}},"participants":{"type":"array","description":"Every participant the report captured, winners and losers alike","items":{"$ref":"#/components/schemas/MatchParticipant"}},"result":{"description":"Outcome for the player this listing was requested for; null when the match was looked up by id","oneOf":[{"$ref":"#/components/schemas/MatchResult"},{"type":"null"}]}}},"EconomyProfileResponse":{"type":"object","properties":{"uuid":{"type":"string"},"username":{"type":"string"},"balances":{"type":"object","additionalProperties":{"type":"integer","format":"int64"}}}},"BalTopEntry":{"type":"object","properties":{"position":{"type":"integer","format":"int32"},"uuid":{"type":"string"},"username":{"type":"string"},"balance":{"type":"integer","format":"int64"}}},"BalTopResponse":{"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/components/schemas/BalTopEntry"}},"count":{"type":"integer","format":"int32"}}}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","description":"API key obtained from in-game /api command","name":"X-API-KEY","in":"header"}}}}