{"openapi":"3.1.0","info":{"title":"Global Wardogs League API","version":"1","description":"Read your team’s data and answer applications, or read public league data. Documentation: /developers.\n\nKeys are live (gwl_live_…, real data) or test (gwl_test_…, the sandbox: invented, fixed data, 30 requests a minute and 1000 a day). Every answer to a test key carries X-GWL-Mode: test. The examples here are what a test key gets."},"servers":[{"url":"/api/v1","description":"This site"},{"url":"https://YOUR-LEAGUE-ADDRESS/api/v1","description":"Written out"}],"tags":[{"name":"team","description":"A team key, live or test"},{"name":"public","description":"A personal key, or a test key with public.read"},{"name":"test","description":"Test keys only; 404 for a live key"},{"name":"document","description":"No key"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Authorization: Bearer <key>. A live key (gwl_live_<id>_<secret>) reads real data; a test key (gwl_test_<id>_<secret>) reads the sandbox. Same paths, same schemas, same errors."}},"headers":{"Mode":{"description":"test on every answer to a test key; absent for a live key","schema":{"type":"string","enum":["test"]}},"ETag":{"description":"Send it back as If-None-Match to get a 304","schema":{"type":"string"}},"RateLimitLimit":{"description":"Requests allowed this minute","schema":{"type":"integer"}},"RateLimitRemaining":{"description":"Requests left this minute","schema":{"type":"integer"}},"RateLimitReset":{"description":"When the minute ends, in Unix seconds","schema":{"type":"integer"}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_request","invalid_json","missing_key","invalid_key","key_revoked","key_expired","missing_scope","scope_lost","wrong_key_type","team_suspended","key_maker_left","key_maker_no_access","not_found","method_not_allowed","invalid_id","already_on_roster","on_other_team","roster_write_limit","player_not_found","leader_cannot_be_removed","rep_cannot_be_removed_by_api","role_above_you","cannot_remove","application_closed","already_member","already_on_team","steam_required","league_suspended","leads_suspended_team","roster_conflict","body_too_large","unsupported_media_type","rate_limited","daily_limit","too_many_bad_keys","internal_error","public_api_off"],"description":"Stable: match on it"},"message":{"type":"string","description":"For people; it may change"}}}}}}},"paths":{"/team":{"get":{"operationId":"getTeam","summary":"The team this key belongs to","tags":["team"],"x-scope":"team.read","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"},"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","description":"The team’s address on the site (/teams/<slug>): its id here"},"name":{"type":"string","description":"Team name"},"tag":{"type":"string","description":"Team tag"},"region":{"type":"string","description":"Competitive region code: EU, NA, SA, ASIA, OCE or MEA"},"description":{"type":"string","description":"What the team wrote about itself; may be empty"},"flag":{"description":"The team’s primary flag, the one lists show: an ISO country code (GB, DE) or region:<code> for a region flag; null when none is chosen","type":["string","null"]},"flags":{"type":"array","items":{"type":"string"},"description":"The team’s profile flags in order, primary first, up to three: each an ISO country code (GB, DE) or region:<code> for a region flag; empty when none is chosen"},"eloRating":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The Elo Rating: one ongoing all-time number, as on every page"},"ratedMatches":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Rated matches, all time"},"seasonMatches":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Matches this season"},"placements":{"type":"object","properties":{"first":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Times finished 1st"},"second":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Times finished 2nd"},"third":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Times finished 3rd"}},"required":["first","second","third"],"additionalProperties":false,"description":"How often the team finished 1st, 2nd and 3rd"},"seasonPlacements":{"type":"object","properties":{"first":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Times finished 1st"},"second":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Times finished 2nd"},"third":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Times finished 3rd"}},"required":["first","second","third"],"additionalProperties":false,"description":"How often the team finished 1st, 2nd and 3rd this season"},"score":{"type":"number","description":"In-game score summed over counted matches, all time"},"seasonScore":{"type":"number","description":"In-game score summed over counted matches, this season"},"form":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"Last five finishes (1, 2 or 3), oldest first"},"reputationScore":{"type":"number","description":"Reputation, 0 to 100"},"safetyBand":{"type":"string","description":"Excellent, Good, Fair or Poor: the band of the Safety part of the reputation score"},"rosterCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"People on the active roster"},"leagueRank":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Place in the league table; null before a counted match"}},"required":["slug","name","tag","region","description","flag","flags","eloRating","ratedMatches","seasonMatches","placements","seasonPlacements","score","seasonScore","form","reputationScore","safetyBand","rosterCount","leagueRank"],"additionalProperties":false},"example":{"slug":"test-team","name":"Test Team","tag":"TEST","region":"EU","description":"An invented team for building against the API. Nothing here is real.","flag":"GB","flags":["GB"],"eloRating":1482,"ratedMatches":12,"seasonMatches":6,"placements":{"first":2,"second":7,"third":3},"seasonPlacements":{"first":1,"second":4,"third":1},"score":781,"seasonScore":406,"form":[2,2,1,2,2],"reputationScore":79,"safetyBand":"Excellent","rosterCount":8,"leagueRank":6}}}},"304":{"description":"Not modified (If-None-Match)"},"401":{"description":"missing_key, invalid_key, key_revoked, key_expired","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_key":{"summary":"No Authorization header, or not a bearer token.","value":{"error":{"code":"missing_key","message":"Send your key as Authorization: Bearer <key>."}}},"invalid_key":{"summary":"Not a key, a mistyped one, or a key used in the wrong mode.","value":{"error":{"code":"invalid_key","message":"That key is not valid."}}},"key_revoked":{"summary":"The key was revoked, by its team, by league staff or because its team is gone.","value":{"error":{"code":"key_revoked","message":"That key has been revoked."}}},"key_expired":{"summary":"The key passed the expiry chosen when it was made.","value":{"error":{"code":"key_expired","message":"That key has expired."}}}}}}},"403":{"description":"missing_scope, scope_lost, wrong_key_type, team_suspended, key_maker_left, key_maker_no_access","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_scope":{"summary":"The key was made without the scope the route needs. The message names it.","value":{"error":{"code":"missing_scope","message":"This key does not have the team.read scope."}}},"scope_lost":{"summary":"The scope is ticked, but the key’s maker no longer holds the team permission behind it.","value":{"error":{"code":"scope_lost","message":"Whoever made this key no longer has the power behind Team record. Someone who does can rotate it."}}},"wrong_key_type":{"summary":"A personal key on a team route, or a team live key on a public route.","value":{"error":{"code":"wrong_key_type","message":"That needs a team key."}}},"team_suspended":{"summary":"League staff suspended the team. Its keys work again when it is restored.","value":{"error":{"code":"team_suspended","message":"This team is suspended, so its keys are stopped."}}},"key_maker_left":{"summary":"The person who made or last rotated the key left the team. Rotating starts it again.","value":{"error":{"code":"key_maker_left","message":"Whoever made this key is no longer on the team. Someone with access can rotate it."}}},"key_maker_no_access":{"summary":"The person who made or last rotated the key no longer holds Manage API keys. Rotating starts it again.","value":{"error":{"code":"key_maker_no_access","message":"Whoever made this key can no longer manage API keys. Someone with access can rotate it."}}}}}}},"429":{"description":"rate_limited, daily_limit, too_many_bad_keys","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}},"daily_limit":{"summary":"A personal or test key used its requests for the day.","value":{"error":{"code":"daily_limit","message":"This key has used today’s requests."}}},"too_many_bad_keys":{"summary":"Too many wrong keys from one address. Wait for Retry-After.","value":{"error":{"code":"too_many_bad_keys","message":"Too many bad keys from this address."}}}}}}},"500":{"description":"internal_error","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"A fault on the league’s side. Try again later.","value":{"error":{"code":"internal_error","message":"Something went wrong on our side."}}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl \"https://YOUR-LEAGUE-ADDRESS/api/v1/team\" \\\n  -H \"Authorization: Bearer $GWL_API_KEY\""},{"lang":"JavaScript","source":"const res = await fetch('https://YOUR-LEAGUE-ADDRESS/api/v1/team', {\n  headers: {\n    Authorization: `Bearer ${process.env.GWL_API_KEY}`,\n  },\n})\nif (!res.ok) throw new Error((await res.json()).error.code)\nconst data = await res.json()"},{"lang":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://YOUR-LEAGUE-ADDRESS/api/v1/team\",\n    headers={\"Authorization\": f\"Bearer {os.environ['GWL_API_KEY']}\"},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()"}]}},"/team/members":{"get":{"operationId":"listMembers","summary":"The team’s members","description":"Adds discordName with members.discord, discordId with members.discord_id and steamId with members.steam_id. Each field is absent without its scope. Only the team’s own members are listed.","tags":["team"],"x-scope":"members.read","x-optional-scopes":["members.discord","members.discord_id","members.steam_id"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"},"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Display name"},"role":{"type":"string","description":"owner (Team Leader), manager (Team Rep) or player"},"joinedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When they joined the team. UTC, ISO 8601"},"linked":{"type":"boolean","description":"Has a site account (false: a roster row only)"},"playerId":{"description":"Their player page id (/players/<id>), when they have one","type":"string"},"country":{"description":"ISO 3166-1 alpha-2 country the person chose to show","type":"string"},"roleLabels":{"description":"Team roles the team gave them (Pilot, Medic): labels only","type":"array","items":{"type":"string"}},"discordName":{"description":"Discord username. Only with the members.discord scope","type":"string"},"discordId":{"description":"Discord account ID. Only with the members.discord_id scope (absent without it); null when the member has not linked Discord","type":["string","null"]},"steamId":{"description":"SteamID64. Only with the members.steam_id scope (absent without it); null when none is known","type":["string","null"]}},"required":["name","role","joinedAt","linked"],"additionalProperties":false},"description":"Everyone on the team, Leader first"}},"required":["members"],"additionalProperties":false},"example":{"members":[{"name":"Ada Example","role":"owner","joinedAt":"2026-07-19T12:00:00.000Z","linked":true,"playerId":"test-player-01","country":"GB","roleLabels":["Commander"],"discordName":"ada.example","discordId":"10000000000000001","steamId":"76561190000000001"},{"name":"Bram Sample","role":"manager","joinedAt":"2026-07-23T12:00:00.000Z","linked":true,"playerId":"test-player-02","country":"NL","roleLabels":["Pilot"],"discordName":"bram.sample","discordId":"10000000000000002","steamId":"76561190000000002"},{"name":"Cleo Placeholder","role":"manager","joinedAt":"2026-08-18T12:00:00.000Z","linked":true,"playerId":"test-player-03","country":"FR","discordName":"cleo.placeholder","discordId":"10000000000000003","steamId":"76561190000000003"},{"name":"Dmitri Mock","role":"player","joinedAt":"2026-09-17T12:00:00.000Z","linked":true,"playerId":"test-player-04","country":"PL","roleLabels":["Medic"],"discordName":"dmitri.mock","discordId":"10000000000000004","steamId":"76561190000000004"},{"name":"Eun-ji Testcase","role":"player","joinedAt":"2026-10-12T12:00:00.000Z","linked":true,"playerId":"test-player-05","country":"KR","discordName":"eunji.testcase","discordId":"10000000000000005","steamId":"76561190000000005"},{"name":"Femi Dummy","role":"player","joinedAt":"2026-11-16T12:00:00.000Z","linked":true,"playerId":"test-player-06","country":"NG","roleLabels":["Merc"],"discordName":"femi.dummy","discordId":"10000000000000006","steamId":"76561190000000006"},{"name":"Gustav Stub","role":"player","joinedAt":"2026-12-16T12:00:00.000Z","linked":true,"playerId":"test-player-07","discordName":"gustav.stub","discordId":"10000000000000007","steamId":"76561190000000007"},{"name":"Hana Fixture","role":"player","joinedAt":"2027-01-03T12:00:00.000Z","linked":false,"playerId":"test-player-08","country":"JP","discordId":null,"steamId":"76561190000000008"}]}}}},"304":{"description":"Not modified (If-None-Match)"},"401":{"description":"missing_key, invalid_key, key_revoked, key_expired","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_key":{"summary":"No Authorization header, or not a bearer token.","value":{"error":{"code":"missing_key","message":"Send your key as Authorization: Bearer <key>."}}},"invalid_key":{"summary":"Not a key, a mistyped one, or a key used in the wrong mode.","value":{"error":{"code":"invalid_key","message":"That key is not valid."}}},"key_revoked":{"summary":"The key was revoked, by its team, by league staff or because its team is gone.","value":{"error":{"code":"key_revoked","message":"That key has been revoked."}}},"key_expired":{"summary":"The key passed the expiry chosen when it was made.","value":{"error":{"code":"key_expired","message":"That key has expired."}}}}}}},"403":{"description":"missing_scope, scope_lost, wrong_key_type, team_suspended, key_maker_left, key_maker_no_access","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_scope":{"summary":"The key was made without the scope the route needs. The message names it.","value":{"error":{"code":"missing_scope","message":"This key does not have the team.read scope."}}},"scope_lost":{"summary":"The scope is ticked, but the key’s maker no longer holds the team permission behind it.","value":{"error":{"code":"scope_lost","message":"Whoever made this key no longer has the power behind Team record. Someone who does can rotate it."}}},"wrong_key_type":{"summary":"A personal key on a team route, or a team live key on a public route.","value":{"error":{"code":"wrong_key_type","message":"That needs a team key."}}},"team_suspended":{"summary":"League staff suspended the team. Its keys work again when it is restored.","value":{"error":{"code":"team_suspended","message":"This team is suspended, so its keys are stopped."}}},"key_maker_left":{"summary":"The person who made or last rotated the key left the team. Rotating starts it again.","value":{"error":{"code":"key_maker_left","message":"Whoever made this key is no longer on the team. Someone with access can rotate it."}}},"key_maker_no_access":{"summary":"The person who made or last rotated the key no longer holds Manage API keys. Rotating starts it again.","value":{"error":{"code":"key_maker_no_access","message":"Whoever made this key can no longer manage API keys. Someone with access can rotate it."}}}}}}},"429":{"description":"rate_limited, daily_limit, too_many_bad_keys","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}},"daily_limit":{"summary":"A personal or test key used its requests for the day.","value":{"error":{"code":"daily_limit","message":"This key has used today’s requests."}}},"too_many_bad_keys":{"summary":"Too many wrong keys from one address. Wait for Retry-After.","value":{"error":{"code":"too_many_bad_keys","message":"Too many bad keys from this address."}}}}}}},"500":{"description":"internal_error","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"A fault on the league’s side. Try again later.","value":{"error":{"code":"internal_error","message":"Something went wrong on our side."}}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/members\" \\\n  -H \"Authorization: Bearer $GWL_API_KEY\""},{"lang":"JavaScript","source":"const res = await fetch('https://YOUR-LEAGUE-ADDRESS/api/v1/team/members', {\n  headers: {\n    Authorization: `Bearer ${process.env.GWL_API_KEY}`,\n  },\n})\nif (!res.ok) throw new Error((await res.json()).error.code)\nconst data = await res.json()"},{"lang":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/members\",\n    headers={\"Authorization\": f\"Bearer {os.environ['GWL_API_KEY']}\"},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()"}]},"post":{"operationId":"addMember","summary":"Add a recruit to the roster","description":"Puts a player on the roster from a SteamID64 and a name. The Steam ID must be the whole 17 digits, sent as text: a short, long or spaced one is refused, and nothing is trimmed or repaired. If that Steam ID is a linked site account the entry is that person; otherwise it waits until they link Steam. It never makes an account or a member, and refuses a Steam ID already on a roster. Needs the roster.csv power. Every add is on the audit log.","tags":["team"],"x-scope":"members.add","security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"steamId":{"type":"string","pattern":"^7656119\\d{10}$","description":"The whole SteamID64 as text: 17 digits, starting 7656119"},"name":{"type":"string","minLength":1,"maxLength":64,"description":"Display name, up to 64 characters"},"discordName":{"description":"Their Discord username, optional, up to 64 characters","type":"string","minLength":1,"maxLength":64}},"required":["steamId","name"],"additionalProperties":false},"example":{"steamId":"76561190000054321","name":"Recruit One"}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"},"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"type":"object","properties":{"steamId":{"type":"string","pattern":"^7656119\\d{10}$","description":"The Steam ID that was added"},"name":{"type":"string","description":"The name it was saved under"},"linked":{"type":"boolean","description":"The Steam ID is a linked site account, so it is that person"},"rosterCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Players on the roster now"}},"required":["steamId","name","linked","rosterCount"],"additionalProperties":false},"example":{"steamId":"76561190000054321","name":"Recruit One","linked":false,"rosterCount":9}}}},"400":{"description":"invalid_request, invalid_json","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"A query parameter or body field is missing, of the wrong type or out of range.","value":{"error":{"code":"invalid_request","message":"Check the query parameters."}}},"invalid_json":{"summary":"The body of a POST could not be read as JSON.","value":{"error":{"code":"invalid_json","message":"The body is not valid JSON."}}}}}}},"401":{"description":"missing_key, invalid_key, key_revoked, key_expired","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_key":{"summary":"No Authorization header, or not a bearer token.","value":{"error":{"code":"missing_key","message":"Send your key as Authorization: Bearer <key>."}}},"invalid_key":{"summary":"Not a key, a mistyped one, or a key used in the wrong mode.","value":{"error":{"code":"invalid_key","message":"That key is not valid."}}},"key_revoked":{"summary":"The key was revoked, by its team, by league staff or because its team is gone.","value":{"error":{"code":"key_revoked","message":"That key has been revoked."}}},"key_expired":{"summary":"The key passed the expiry chosen when it was made.","value":{"error":{"code":"key_expired","message":"That key has expired."}}}}}}},"403":{"description":"missing_scope, scope_lost, wrong_key_type, team_suspended, key_maker_left, key_maker_no_access","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_scope":{"summary":"The key was made without the scope the route needs. The message names it.","value":{"error":{"code":"missing_scope","message":"This key does not have the team.read scope."}}},"scope_lost":{"summary":"The scope is ticked, but the key’s maker no longer holds the team permission behind it.","value":{"error":{"code":"scope_lost","message":"Whoever made this key no longer has the power behind Team record. Someone who does can rotate it."}}},"wrong_key_type":{"summary":"A personal key on a team route, or a team live key on a public route.","value":{"error":{"code":"wrong_key_type","message":"That needs a team key."}}},"team_suspended":{"summary":"League staff suspended the team. Its keys work again when it is restored.","value":{"error":{"code":"team_suspended","message":"This team is suspended, so its keys are stopped."}}},"key_maker_left":{"summary":"The person who made or last rotated the key left the team. Rotating starts it again.","value":{"error":{"code":"key_maker_left","message":"Whoever made this key is no longer on the team. Someone with access can rotate it."}}},"key_maker_no_access":{"summary":"The person who made or last rotated the key no longer holds Manage API keys. Rotating starts it again.","value":{"error":{"code":"key_maker_no_access","message":"Whoever made this key can no longer manage API keys. Someone with access can rotate it."}}}}}}},"409":{"description":"already_on_roster, on_other_team","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"already_on_roster":{"summary":"The Steam ID is already on the team’s roster.","value":{"error":{"code":"already_on_roster","message":"That player is already on your roster."}}},"on_other_team":{"summary":"The Steam ID is active on another team’s roster. One team at a time.","value":{"error":{"code":"on_other_team","message":"That player is active on another team. They must leave it first."}}}}}}},"413":{"description":"body_too_large","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"body_too_large":{"summary":"A POST body over 4 KB.","value":{"error":{"code":"body_too_large","message":"That body is too large."}}}}}}},"415":{"description":"unsupported_media_type","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unsupported_media_type":{"summary":"A POST without Content-Type: application/json.","value":{"error":{"code":"unsupported_media_type","message":"Send the body as application/json."}}}}}}},"429":{"description":"roster_write_limit, rate_limited, daily_limit, too_many_bad_keys","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"roster_write_limit":{"summary":"More than 60 adds and removals from one team’s tools in an hour.","value":{"error":{"code":"roster_write_limit","message":"Too many roster changes from your tools this hour. Wait a little and try again."}}},"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}},"daily_limit":{"summary":"A personal or test key used its requests for the day.","value":{"error":{"code":"daily_limit","message":"This key has used today’s requests."}}},"too_many_bad_keys":{"summary":"Too many wrong keys from one address. Wait for Retry-After.","value":{"error":{"code":"too_many_bad_keys","message":"Too many bad keys from this address."}}}}}}},"500":{"description":"internal_error","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"A fault on the league’s side. Try again later.","value":{"error":{"code":"internal_error","message":"Something went wrong on our side."}}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl -X POST \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/members\" \\\n  -H \"Authorization: Bearer $GWL_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"steamId\":\"76561190000054321\",\"name\":\"Recruit One\"}'"},{"lang":"JavaScript","source":"const res = await fetch('https://YOUR-LEAGUE-ADDRESS/api/v1/team/members', {\n  method: 'POST',\n  headers: {\n    Authorization: `Bearer ${process.env.GWL_API_KEY}`,\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\"steamId\":\"76561190000054321\",\"name\":\"Recruit One\"}),\n})\nif (!res.ok) throw new Error((await res.json()).error.code)\nconst data = await res.json()"},{"lang":"Python","source":"import os\nimport requests\n\nres = requests.post(\n    \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/members\",\n    headers={\"Authorization\": f\"Bearer {os.environ['GWL_API_KEY']}\"},\n    json={\"steamId\":\"76561190000054321\",\"name\":\"Recruit One\"},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()"}]}},"/team/members/{steamId}":{"delete":{"operationId":"removeMember","summary":"Take a player off the roster","description":"Ends the roster entry with that SteamID64 (history is kept). A site member who is only a player leaves the team too, and their team roles end. The Team Leader and Team Reps are never removed here, and neither is someone who holds a team role with powers. Needs the roster.remove_players power. Every removal is on the audit log.","tags":["team"],"x-scope":"members.remove","security":[{"bearerAuth":[]}],"parameters":[{"name":"steamId","in":"path","required":true,"description":"The whole SteamID64 of the roster entry: 17 digits, starting 7656119","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"},"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"type":"object","properties":{"steamId":{"type":"string","pattern":"^7656119\\d{10}$","description":"The Steam ID that was removed"},"name":{"type":"string","description":"Their name on the roster"},"member":{"type":"boolean","description":"They were a site member as well as a roster entry"},"rosterCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Players on the roster now"}},"required":["steamId","name","member","rosterCount"],"additionalProperties":false},"example":{"steamId":"76561190000000004","name":"Dmitri Mock","member":true,"rosterCount":7}}}},"400":{"description":"invalid_id","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_id":{"summary":"A Steam ID in the path was short, long, spaced or not digits. Nothing is trimmed or guessed.","value":{"error":{"code":"invalid_id","message":"That is not a complete SteamID64: it is 17 digits and starts 7656119."}}}}}}},"401":{"description":"missing_key, invalid_key, key_revoked, key_expired","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_key":{"summary":"No Authorization header, or not a bearer token.","value":{"error":{"code":"missing_key","message":"Send your key as Authorization: Bearer <key>."}}},"invalid_key":{"summary":"Not a key, a mistyped one, or a key used in the wrong mode.","value":{"error":{"code":"invalid_key","message":"That key is not valid."}}},"key_revoked":{"summary":"The key was revoked, by its team, by league staff or because its team is gone.","value":{"error":{"code":"key_revoked","message":"That key has been revoked."}}},"key_expired":{"summary":"The key passed the expiry chosen when it was made.","value":{"error":{"code":"key_expired","message":"That key has expired."}}}}}}},"403":{"description":"missing_scope, scope_lost, wrong_key_type, role_above_you, team_suspended, key_maker_left, key_maker_no_access","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_scope":{"summary":"The key was made without the scope the route needs. The message names it.","value":{"error":{"code":"missing_scope","message":"This key does not have the team.read scope."}}},"scope_lost":{"summary":"The scope is ticked, but the key’s maker no longer holds the team permission behind it.","value":{"error":{"code":"scope_lost","message":"Whoever made this key no longer has the power behind Team record. Someone who does can rotate it."}}},"wrong_key_type":{"summary":"A personal key on a team route, or a team live key on a public route.","value":{"error":{"code":"wrong_key_type","message":"That needs a team key."}}},"role_above_you":{"summary":"The player holds a team role that carries permissions.","value":{"error":{"code":"role_above_you","message":"That person holds a team role with powers. Remove them on the website."}}},"team_suspended":{"summary":"League staff suspended the team. Its keys work again when it is restored.","value":{"error":{"code":"team_suspended","message":"This team is suspended, so its keys are stopped."}}},"key_maker_left":{"summary":"The person who made or last rotated the key left the team. Rotating starts it again.","value":{"error":{"code":"key_maker_left","message":"Whoever made this key is no longer on the team. Someone with access can rotate it."}}},"key_maker_no_access":{"summary":"The person who made or last rotated the key no longer holds Manage API keys. Rotating starts it again.","value":{"error":{"code":"key_maker_no_access","message":"Whoever made this key can no longer manage API keys. Someone with access can rotate it."}}}}}}},"404":{"description":"player_not_found","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"player_not_found":{"summary":"No active roster entry has that Steam ID.","value":{"error":{"code":"player_not_found","message":"That Steam ID is not on your roster."}}}}}}},"409":{"description":"leader_cannot_be_removed, rep_cannot_be_removed_by_api, cannot_remove","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"leader_cannot_be_removed":{"summary":"The Steam ID is the Team Leader’s.","value":{"error":{"code":"leader_cannot_be_removed","message":"The Team Leader cannot be removed."}}},"rep_cannot_be_removed_by_api":{"summary":"The Steam ID is a Team Rep’s.","value":{"error":{"code":"rep_cannot_be_removed_by_api","message":"A Team Rep is removed by the Team Leader on the website."}}},"cannot_remove":{"summary":"The league could not take that member off the team.","value":{"error":{"code":"cannot_remove","message":"That person cannot be removed from the team."}}}}}}},"429":{"description":"roster_write_limit, rate_limited, daily_limit, too_many_bad_keys","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"roster_write_limit":{"summary":"More than 60 adds and removals from one team’s tools in an hour.","value":{"error":{"code":"roster_write_limit","message":"Too many roster changes from your tools this hour. Wait a little and try again."}}},"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}},"daily_limit":{"summary":"A personal or test key used its requests for the day.","value":{"error":{"code":"daily_limit","message":"This key has used today’s requests."}}},"too_many_bad_keys":{"summary":"Too many wrong keys from one address. Wait for Retry-After.","value":{"error":{"code":"too_many_bad_keys","message":"Too many bad keys from this address."}}}}}}},"500":{"description":"internal_error","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"A fault on the league’s side. Try again later.","value":{"error":{"code":"internal_error","message":"Something went wrong on our side."}}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl -X DELETE \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/members/76561190000000004\" \\\n  -H \"Authorization: Bearer $GWL_API_KEY\""},{"lang":"JavaScript","source":"const res = await fetch('https://YOUR-LEAGUE-ADDRESS/api/v1/team/members/76561190000000004', {\n  method: 'DELETE',\n  headers: {\n    Authorization: `Bearer ${process.env.GWL_API_KEY}`,\n  },\n})\nif (!res.ok) throw new Error((await res.json()).error.code)\nconst data = await res.json()"},{"lang":"Python","source":"import os\nimport requests\n\nres = requests.delete(\n    \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/members/76561190000000004\",\n    headers={\"Authorization\": f\"Bearer {os.environ['GWL_API_KEY']}\"},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()"}]}},"/team/applications":{"get":{"operationId":"listApplications","summary":"People waiting to join","description":"Adds each applicant’s discordId with members.discord_id (absent without it). An applicant’s Steam ID is never returned.","tags":["team"],"x-scope":"applications.read","x-optional-scopes":["members.discord_id"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"},"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"type":"object","properties":{"applications":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Application id, for the respond route"},"name":{"type":"string","description":"Display name of the person applying"},"country":{"description":"ISO 3166-1 alpha-2 country the person chose to show; null when none","type":["string","null"]},"regions":{"type":"array","items":{"type":"string"},"description":"Regions they play in, as codes"},"note":{"description":"What they wrote, up to 280 characters; null when nothing","type":["string","null"]},"appliedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When they applied. UTC, ISO 8601"},"deadline":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it expires unanswered. UTC, ISO 8601"},"playerId":{"description":"Their player page id (/players/<id>), when they have one; null when none","type":["string","null"]},"elo":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Their player Elo. The league does not rate players, so expect null"},"ratedMatches":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Matches counted in their player Elo. The league does not rate players, so expect 0"},"discordId":{"description":"Discord account ID. Only with the members.discord_id scope (absent without it). An applicant’s Steam ID is never returned","type":["string","null"]}},"required":["id","name","country","regions","note","appliedAt","deadline","playerId","elo","ratedMatches"],"additionalProperties":false},"description":"Open applications, oldest first"}},"required":["applications"],"additionalProperties":false},"example":{"applications":[{"id":"test-app-01","name":"Ines Sample","country":"PT","regions":["EU"],"note":"Medic main, free most evenings UTC.","appliedAt":"2027-01-13T12:00:00.000Z","deadline":"2027-01-20T12:00:00.000Z","playerId":"test-player-41","elo":1512,"ratedMatches":9,"discordId":"10000000000000041"},{"id":"test-app-02","name":"Kai Placeholder","country":null,"regions":["NA","OCE"],"note":null,"appliedAt":"2027-01-14T12:00:00.000Z","deadline":"2027-01-21T12:00:00.000Z","playerId":null,"elo":null,"ratedMatches":0,"discordId":"10000000000000042"}]}}}},"304":{"description":"Not modified (If-None-Match)"},"401":{"description":"missing_key, invalid_key, key_revoked, key_expired","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_key":{"summary":"No Authorization header, or not a bearer token.","value":{"error":{"code":"missing_key","message":"Send your key as Authorization: Bearer <key>."}}},"invalid_key":{"summary":"Not a key, a mistyped one, or a key used in the wrong mode.","value":{"error":{"code":"invalid_key","message":"That key is not valid."}}},"key_revoked":{"summary":"The key was revoked, by its team, by league staff or because its team is gone.","value":{"error":{"code":"key_revoked","message":"That key has been revoked."}}},"key_expired":{"summary":"The key passed the expiry chosen when it was made.","value":{"error":{"code":"key_expired","message":"That key has expired."}}}}}}},"403":{"description":"missing_scope, scope_lost, wrong_key_type, team_suspended, key_maker_left, key_maker_no_access","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_scope":{"summary":"The key was made without the scope the route needs. The message names it.","value":{"error":{"code":"missing_scope","message":"This key does not have the team.read scope."}}},"scope_lost":{"summary":"The scope is ticked, but the key’s maker no longer holds the team permission behind it.","value":{"error":{"code":"scope_lost","message":"Whoever made this key no longer has the power behind Team record. Someone who does can rotate it."}}},"wrong_key_type":{"summary":"A personal key on a team route, or a team live key on a public route.","value":{"error":{"code":"wrong_key_type","message":"That needs a team key."}}},"team_suspended":{"summary":"League staff suspended the team. Its keys work again when it is restored.","value":{"error":{"code":"team_suspended","message":"This team is suspended, so its keys are stopped."}}},"key_maker_left":{"summary":"The person who made or last rotated the key left the team. Rotating starts it again.","value":{"error":{"code":"key_maker_left","message":"Whoever made this key is no longer on the team. Someone with access can rotate it."}}},"key_maker_no_access":{"summary":"The person who made or last rotated the key no longer holds Manage API keys. Rotating starts it again.","value":{"error":{"code":"key_maker_no_access","message":"Whoever made this key can no longer manage API keys. Someone with access can rotate it."}}}}}}},"429":{"description":"rate_limited, daily_limit, too_many_bad_keys","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}},"daily_limit":{"summary":"A personal or test key used its requests for the day.","value":{"error":{"code":"daily_limit","message":"This key has used today’s requests."}}},"too_many_bad_keys":{"summary":"Too many wrong keys from one address. Wait for Retry-After.","value":{"error":{"code":"too_many_bad_keys","message":"Too many bad keys from this address."}}}}}}},"500":{"description":"internal_error","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"A fault on the league’s side. Try again later.","value":{"error":{"code":"internal_error","message":"Something went wrong on our side."}}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/applications\" \\\n  -H \"Authorization: Bearer $GWL_API_KEY\""},{"lang":"JavaScript","source":"const res = await fetch('https://YOUR-LEAGUE-ADDRESS/api/v1/team/applications', {\n  headers: {\n    Authorization: `Bearer ${process.env.GWL_API_KEY}`,\n  },\n})\nif (!res.ok) throw new Error((await res.json()).error.code)\nconst data = await res.json()"},{"lang":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/applications\",\n    headers={\"Authorization\": f\"Bearer {os.environ['GWL_API_KEY']}\"},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()"}]}},"/team/applications/{id}/respond":{"post":{"operationId":"respondToApplication","summary":"Accept or decline an application","tags":["team"],"x-scope":"applications.write","security":[{"bearerAuth":[]}],"parameters":[{"name":"id","in":"path","required":true,"description":"The application’s id, from /team/applications","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accept":{"type":"boolean","description":"true to take them on, false to decline"},"reason":{"description":"Optional words for them, up to 280 characters","type":"string","maxLength":280}},"required":["accept"],"additionalProperties":false},"example":{"accept":true}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"},"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The application id"},"accepted":{"type":"boolean","description":"Whether they joined"},"name":{"type":"string","description":"Display name of the person"}},"required":["id","accepted","name"],"additionalProperties":false},"example":{"id":"test-app-01","accepted":true,"name":"Ines Sample"}}}},"400":{"description":"invalid_request, invalid_json","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"A query parameter or body field is missing, of the wrong type or out of range.","value":{"error":{"code":"invalid_request","message":"Check the query parameters."}}},"invalid_json":{"summary":"The body of a POST could not be read as JSON.","value":{"error":{"code":"invalid_json","message":"The body is not valid JSON."}}}}}}},"401":{"description":"missing_key, invalid_key, key_revoked, key_expired","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_key":{"summary":"No Authorization header, or not a bearer token.","value":{"error":{"code":"missing_key","message":"Send your key as Authorization: Bearer <key>."}}},"invalid_key":{"summary":"Not a key, a mistyped one, or a key used in the wrong mode.","value":{"error":{"code":"invalid_key","message":"That key is not valid."}}},"key_revoked":{"summary":"The key was revoked, by its team, by league staff or because its team is gone.","value":{"error":{"code":"key_revoked","message":"That key has been revoked."}}},"key_expired":{"summary":"The key passed the expiry chosen when it was made.","value":{"error":{"code":"key_expired","message":"That key has expired."}}}}}}},"403":{"description":"missing_scope, scope_lost, wrong_key_type, team_suspended, key_maker_left, key_maker_no_access","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_scope":{"summary":"The key was made without the scope the route needs. The message names it.","value":{"error":{"code":"missing_scope","message":"This key does not have the team.read scope."}}},"scope_lost":{"summary":"The scope is ticked, but the key’s maker no longer holds the team permission behind it.","value":{"error":{"code":"scope_lost","message":"Whoever made this key no longer has the power behind Team record. Someone who does can rotate it."}}},"wrong_key_type":{"summary":"A personal key on a team route, or a team live key on a public route.","value":{"error":{"code":"wrong_key_type","message":"That needs a team key."}}},"team_suspended":{"summary":"League staff suspended the team. Its keys work again when it is restored.","value":{"error":{"code":"team_suspended","message":"This team is suspended, so its keys are stopped."}}},"key_maker_left":{"summary":"The person who made or last rotated the key left the team. Rotating starts it again.","value":{"error":{"code":"key_maker_left","message":"Whoever made this key is no longer on the team. Someone with access can rotate it."}}},"key_maker_no_access":{"summary":"The person who made or last rotated the key no longer holds Manage API keys. Rotating starts it again.","value":{"error":{"code":"key_maker_no_access","message":"Whoever made this key can no longer manage API keys. Someone with access can rotate it."}}}}}}},"404":{"description":"not_found","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"Nothing at that address, or another team’s match or application (so their existence does not leak).","value":{"error":{"code":"not_found","message":"We could not find that."}}}}}}},"409":{"description":"application_closed, already_member, already_on_team, steam_required, league_suspended, leads_suspended_team, roster_conflict","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"application_closed":{"summary":"The application was accepted, declined, withdrawn or expired before your answer.","value":{"error":{"code":"application_closed","message":"That application has already ended."}}},"already_member":{"summary":"Accepting someone who is on your team already.","value":{"error":{"code":"already_member","message":"That person is already on this team."}}},"already_on_team":{"summary":"Accepting someone who joined another team. The message names it.","value":{"error":{"code":"already_on_team","message":"That person is already on another team. A person is on one team at a time."}}},"steam_required":{"summary":"Accepting someone with no Steam account linked.","value":{"error":{"code":"steam_required","message":"That person has not linked their Steam account yet. They can do it from their account page, then try again."}}},"league_suspended":{"summary":"Accepting someone the league has suspended.","value":{"error":{"code":"league_suspended","message":"That person is suspended from the league, so they cannot join a team. Lift the suspension first."}}},"leads_suspended_team":{"summary":"Accepting the Team Leader of a suspended team. The message names it.","value":{"error":{"code":"leads_suspended_team","message":"That person leads a suspended team. A Team Leader stays with their team until it is restored."}}},"roster_conflict":{"summary":"Accepting someone whose Steam ID is on another roster or another account’s record.","value":{"error":{"code":"roster_conflict","message":"That changed while you were looking. Try again."}}}}}}},"413":{"description":"body_too_large","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"body_too_large":{"summary":"A POST body over 4 KB.","value":{"error":{"code":"body_too_large","message":"That body is too large."}}}}}}},"415":{"description":"unsupported_media_type","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"unsupported_media_type":{"summary":"A POST without Content-Type: application/json.","value":{"error":{"code":"unsupported_media_type","message":"Send the body as application/json."}}}}}}},"429":{"description":"rate_limited, daily_limit, too_many_bad_keys","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}},"daily_limit":{"summary":"A personal or test key used its requests for the day.","value":{"error":{"code":"daily_limit","message":"This key has used today’s requests."}}},"too_many_bad_keys":{"summary":"Too many wrong keys from one address. Wait for Retry-After.","value":{"error":{"code":"too_many_bad_keys","message":"Too many bad keys from this address."}}}}}}},"500":{"description":"internal_error","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"A fault on the league’s side. Try again later.","value":{"error":{"code":"internal_error","message":"Something went wrong on our side."}}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl -X POST \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/applications/test-app-01/respond\" \\\n  -H \"Authorization: Bearer $GWL_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"accept\":true}'"},{"lang":"JavaScript","source":"const res = await fetch('https://YOUR-LEAGUE-ADDRESS/api/v1/team/applications/test-app-01/respond', {\n  method: 'POST',\n  headers: {\n    Authorization: `Bearer ${process.env.GWL_API_KEY}`,\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\"accept\":true}),\n})\nif (!res.ok) throw new Error((await res.json()).error.code)\nconst data = await res.json()"},{"lang":"Python","source":"import os\nimport requests\n\nres = requests.post(\n    \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/applications/test-app-01/respond\",\n    headers={\"Authorization\": f\"Bearer {os.environ['GWL_API_KEY']}\"},\n    json={\"accept\":True},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()"}]}},"/team/fixtures":{"get":{"operationId":"listFixtures","summary":"Upcoming and recent matches","tags":["team"],"x-scope":"matches.read","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"How many, up to 100","schema":{"default":10,"description":"How many, up to 100","type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"},"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"type":"object","properties":{"upcoming":{"type":"array","items":{"type":"object","properties":{"number":{"type":"string","description":"The match number, as on the website"},"status":{"type":"string","description":"scheduled (locked, not played), reported (played, nothing counts yet: no result, or one that waits to be confirmed), confirmed (the result counts) or disputed (a team disputed it: nothing counts until league staff settle it). A result read from the game is confirmed as soon as the league reads it, and can still become disputed until disputeUntil"},"rated":{"type":"boolean","description":"Whether the result is moving Elo now. False again while the match is disputed"},"region":{"type":"string","description":"Competitive region code: EU, NA, SA, ASIA, OCE or MEA"},"map":{"type":"string","description":"Map id, the game’s own: kavkazi, europe, north-america or sabatulo"},"mapName":{"type":"string","description":"The map’s name as the website shows it, for example Zestafona for north-america"},"layer":{"description":"Zone key as stored on the match; null for Random or none","type":["string","null"]},"zone":{"description":"The zone as the website shows it. \"Random zone\" when no zone was picked or rolled; null only when the map itself is Random","type":["string","null"]},"weather":{"description":"Weather key (clear, overcast, rain, fog, storm), or null for any","type":["string","null"]},"season":{"description":"Name of the season the match belongs to; null when none was running","type":["string","null"]},"startsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it starts. UTC, ISO 8601"},"concludedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the result that counts was confirmed: set with status confirmed, null otherwise (and again while disputed). It moves when league staff settle a dispute. UTC, ISO 8601"},"disputeUntil":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"Set while the result already counts and a team can still dispute it: the end of that window. Null otherwise. UTC, ISO 8601"},"durationSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How long it was played, in seconds; null when unknown"},"host":{"description":"Team slug of the host; null when no team hosts (a GWL official server, or the host team is gone)","type":["string","null"]},"sides":{"type":"array","items":{"type":"object","properties":{"team":{"type":"object","properties":{"slug":{"type":"string","description":"The team’s address on the site (/teams/<slug>): its id here"},"name":{"description":"Team name; null if it is gone","type":["string","null"]},"tag":{"description":"Team tag; null if it is gone","type":["string","null"]}},"required":["slug","name","tag"],"additionalProperties":false,"description":"A team, by slug, name and tag"},"faction":{"description":"Faction code once a moderator assigns one, else null","type":["string","null"]},"score":{"description":"The side’s in-game score, 0 to 100; null before a result","type":["number","null"]},"placement":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"1, 2 or 3; null before a result"},"points":{"description":"Placement points for the match: 5 for 1st, 3 for 2nd, 1 for 3rd. They count only while the status is confirmed","type":["number","null"]},"eloDelta":{"description":"Elo change from this match as it counts now; null while it is not rated, a disputed match included","type":["number","null"]}},"required":["team","faction","score","placement","points","eloDelta"],"additionalProperties":false,"description":"One of the three teams in a match"},"description":"The three teams, host first"},"lockedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the third team joined and it became a match. UTC, ISO 8601"},"serverPosted":{"type":"boolean","description":"Whether server details have been posted. This route never returns them: see /team/matches/{number}/server"},"readyTeams":{"type":"array","items":{"type":"string"},"description":"Slugs of the teams that pressed Ready"}},"required":["number","status","rated","region","map","mapName","layer","zone","weather","season","startsAt","concludedAt","disputeUntil","durationSeconds","host","sides","lockedAt","serverPosted","readyTeams"],"additionalProperties":false,"description":"One of your team’s matches"},"description":"Matches not played yet, soonest first"},"recent":{"type":"array","items":{"type":"object","properties":{"number":{"type":"string","description":"The match number, as on the website"},"status":{"type":"string","description":"scheduled (locked, not played), reported (played, nothing counts yet: no result, or one that waits to be confirmed), confirmed (the result counts) or disputed (a team disputed it: nothing counts until league staff settle it). A result read from the game is confirmed as soon as the league reads it, and can still become disputed until disputeUntil"},"rated":{"type":"boolean","description":"Whether the result is moving Elo now. False again while the match is disputed"},"region":{"type":"string","description":"Competitive region code: EU, NA, SA, ASIA, OCE or MEA"},"map":{"type":"string","description":"Map id, the game’s own: kavkazi, europe, north-america or sabatulo"},"mapName":{"type":"string","description":"The map’s name as the website shows it, for example Zestafona for north-america"},"layer":{"description":"Zone key as stored on the match; null for Random or none","type":["string","null"]},"zone":{"description":"The zone as the website shows it. \"Random zone\" when no zone was picked or rolled; null only when the map itself is Random","type":["string","null"]},"weather":{"description":"Weather key (clear, overcast, rain, fog, storm), or null for any","type":["string","null"]},"season":{"description":"Name of the season the match belongs to; null when none was running","type":["string","null"]},"startsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it starts. UTC, ISO 8601"},"concludedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the result that counts was confirmed: set with status confirmed, null otherwise (and again while disputed). It moves when league staff settle a dispute. UTC, ISO 8601"},"disputeUntil":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"Set while the result already counts and a team can still dispute it: the end of that window. Null otherwise. UTC, ISO 8601"},"durationSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How long it was played, in seconds; null when unknown"},"host":{"description":"Team slug of the host; null when no team hosts (a GWL official server, or the host team is gone)","type":["string","null"]},"sides":{"type":"array","items":{"type":"object","properties":{"team":{"type":"object","properties":{"slug":{"type":"string","description":"The team’s address on the site (/teams/<slug>): its id here"},"name":{"description":"Team name; null if it is gone","type":["string","null"]},"tag":{"description":"Team tag; null if it is gone","type":["string","null"]}},"required":["slug","name","tag"],"additionalProperties":false,"description":"A team, by slug, name and tag"},"faction":{"description":"Faction code once a moderator assigns one, else null","type":["string","null"]},"score":{"description":"The side’s in-game score, 0 to 100; null before a result","type":["number","null"]},"placement":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"1, 2 or 3; null before a result"},"points":{"description":"Placement points for the match: 5 for 1st, 3 for 2nd, 1 for 3rd. They count only while the status is confirmed","type":["number","null"]},"eloDelta":{"description":"Elo change from this match as it counts now; null while it is not rated, a disputed match included","type":["number","null"]}},"required":["team","faction","score","placement","points","eloDelta"],"additionalProperties":false,"description":"One of the three teams in a match"},"description":"The three teams, host first"},"lockedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the third team joined and it became a match. UTC, ISO 8601"},"serverPosted":{"type":"boolean","description":"Whether server details have been posted. This route never returns them: see /team/matches/{number}/server"},"readyTeams":{"type":"array","items":{"type":"string"},"description":"Slugs of the teams that pressed Ready"}},"required":["number","status","rated","region","map","mapName","layer","zone","weather","season","startsAt","concludedAt","disputeUntil","durationSeconds","host","sides","lockedAt","serverPosted","readyTeams"],"additionalProperties":false,"description":"One of your team’s matches"},"description":"Played matches, newest first"}},"required":["upcoming","recent"],"additionalProperties":false},"example":{"upcoming":[{"number":"9105","status":"scheduled","rated":false,"region":"EU","map":"sabatulo","mapName":"Sabatulo","layer":"Default","zone":"Hospital - Default","weather":"clear","season":"Sandbox Season","startsAt":"2027-01-17T19:00:00.000Z","concludedAt":null,"disputeUntil":null,"durationSeconds":null,"host":"test-team","sides":[{"team":{"slug":"test-team","name":"Test Team","tag":"TEST"},"faction":"lonestar","score":null,"placement":null,"points":null,"eloDelta":null},{"team":{"slug":"example-eagles","name":"Example Eagles","tag":"EXEG"},"faction":null,"score":null,"placement":null,"points":null,"eloDelta":null},{"team":{"slug":"sample-sappers","name":"Sample Sappers","tag":"SMPL"},"faction":null,"score":null,"placement":null,"points":null,"eloDelta":null}],"lockedAt":"2027-01-14T19:00:00.000Z","serverPosted":false,"readyTeams":["test-team"]},{"number":"9106","status":"scheduled","rated":false,"region":"EU","map":"kavkazi","mapName":"Bakurani","layer":"Farmland","zone":"Farmland","weather":null,"season":"Sandbox Season","startsAt":"2027-01-20T19:00:00.000Z","concludedAt":null,"disputeUntil":null,"durationSeconds":null,"host":"stub-strikers","sides":[{"team":{"slug":"stub-strikers","name":"Stub Strikers","tag":"STUB"},"faction":"lonestar","score":null,"placement":null,"points":null,"eloDelta":null},{"team":{"slug":"test-team","name":"Test Team","tag":"TEST"},"faction":null,"score":null,"placement":null,"points":null,"eloDelta":null},{"team":{"slug":"mock-mortars","name":"Mock Mortars","tag":"MOCK"},"faction":null,"score":null,"placement":null,"points":null,"eloDelta":null}],"lockedAt":"2027-01-17T19:00:00.000Z","serverPosted":true,"readyTeams":[]}],"recent":[{"number":"9104","status":"reported","rated":false,"region":"EU","map":"europe","mapName":"Ozeti","layer":"River","zone":"River","weather":null,"season":"Sandbox Season","startsAt":"2027-01-14T19:00:00.000Z","concludedAt":null,"disputeUntil":null,"durationSeconds":3360,"host":"lorem-lancers","sides":[{"team":{"slug":"lorem-lancers","name":"Lorem Lancers","tag":"LORM"},"faction":"lonestar","score":74,"placement":2,"points":3,"eloDelta":null},{"team":{"slug":"test-team","name":"Test Team","tag":"TEST"},"faction":"valkyra","score":100,"placement":1,"points":5,"eloDelta":null},{"team":{"slug":"ipsum-infantry","name":"Ipsum Infantry","tag":"IPSM"},"faction":"manticore","score":38,"placement":3,"points":1,"eloDelta":null}],"lockedAt":"2027-01-11T19:00:00.000Z","serverPosted":true,"readyTeams":["lorem-lancers","test-team","ipsum-infantry"]},{"number":"9103","status":"confirmed","rated":true,"region":"EU","map":"north-america","mapName":"Zestafona","layer":"Houses","zone":"Houses","weather":"rain","season":"Sandbox Season","startsAt":"2027-01-11T19:00:00.000Z","concludedAt":"2027-01-11T21:59:00.000Z","disputeUntil":null,"durationSeconds":3540,"host":"test-team","sides":[{"team":{"slug":"test-team","name":"Test Team","tag":"TEST"},"faction":"lonestar","score":65,"placement":2,"points":3,"eloDelta":0},{"team":{"slug":"dummy-dragoons","name":"Dummy Dragoons","tag":"DUMY"},"faction":"valkyra","score":100,"placement":1,"points":5,"eloDelta":18},{"team":{"slug":"fixture-falcons","name":"Fixture Falcons","tag":"FIXT"},"faction":"manticore","score":34,"placement":3,"points":1,"eloDelta":-16}],"lockedAt":"2027-01-08T19:00:00.000Z","serverPosted":true,"readyTeams":["test-team","dummy-dragoons","fixture-falcons"]}]}}}},"304":{"description":"Not modified (If-None-Match)"},"400":{"description":"invalid_request","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"A query parameter or body field is missing, of the wrong type or out of range.","value":{"error":{"code":"invalid_request","message":"Check the query parameters."}}}}}}},"401":{"description":"missing_key, invalid_key, key_revoked, key_expired","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_key":{"summary":"No Authorization header, or not a bearer token.","value":{"error":{"code":"missing_key","message":"Send your key as Authorization: Bearer <key>."}}},"invalid_key":{"summary":"Not a key, a mistyped one, or a key used in the wrong mode.","value":{"error":{"code":"invalid_key","message":"That key is not valid."}}},"key_revoked":{"summary":"The key was revoked, by its team, by league staff or because its team is gone.","value":{"error":{"code":"key_revoked","message":"That key has been revoked."}}},"key_expired":{"summary":"The key passed the expiry chosen when it was made.","value":{"error":{"code":"key_expired","message":"That key has expired."}}}}}}},"403":{"description":"missing_scope, scope_lost, wrong_key_type, team_suspended, key_maker_left, key_maker_no_access","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_scope":{"summary":"The key was made without the scope the route needs. The message names it.","value":{"error":{"code":"missing_scope","message":"This key does not have the team.read scope."}}},"scope_lost":{"summary":"The scope is ticked, but the key’s maker no longer holds the team permission behind it.","value":{"error":{"code":"scope_lost","message":"Whoever made this key no longer has the power behind Team record. Someone who does can rotate it."}}},"wrong_key_type":{"summary":"A personal key on a team route, or a team live key on a public route.","value":{"error":{"code":"wrong_key_type","message":"That needs a team key."}}},"team_suspended":{"summary":"League staff suspended the team. Its keys work again when it is restored.","value":{"error":{"code":"team_suspended","message":"This team is suspended, so its keys are stopped."}}},"key_maker_left":{"summary":"The person who made or last rotated the key left the team. Rotating starts it again.","value":{"error":{"code":"key_maker_left","message":"Whoever made this key is no longer on the team. Someone with access can rotate it."}}},"key_maker_no_access":{"summary":"The person who made or last rotated the key no longer holds Manage API keys. Rotating starts it again.","value":{"error":{"code":"key_maker_no_access","message":"Whoever made this key can no longer manage API keys. Someone with access can rotate it."}}}}}}},"429":{"description":"rate_limited, daily_limit, too_many_bad_keys","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}},"daily_limit":{"summary":"A personal or test key used its requests for the day.","value":{"error":{"code":"daily_limit","message":"This key has used today’s requests."}}},"too_many_bad_keys":{"summary":"Too many wrong keys from one address. Wait for Retry-After.","value":{"error":{"code":"too_many_bad_keys","message":"Too many bad keys from this address."}}}}}}},"500":{"description":"internal_error","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"A fault on the league’s side. Try again later.","value":{"error":{"code":"internal_error","message":"Something went wrong on our side."}}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/fixtures?limit=2\" \\\n  -H \"Authorization: Bearer $GWL_API_KEY\""},{"lang":"JavaScript","source":"const res = await fetch('https://YOUR-LEAGUE-ADDRESS/api/v1/team/fixtures?limit=2', {\n  headers: {\n    Authorization: `Bearer ${process.env.GWL_API_KEY}`,\n  },\n})\nif (!res.ok) throw new Error((await res.json()).error.code)\nconst data = await res.json()"},{"lang":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/fixtures?limit=2\",\n    headers={\"Authorization\": f\"Bearer {os.environ['GWL_API_KEY']}\"},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()"}]}},"/team/matches/{number}":{"get":{"operationId":"getTeamMatch","summary":"One of the team’s matches, with its player stats","description":"The result and playerStats of all three teams. Ask again when you hear match.stats, match.confirmed, match.disputed or match.settled.","tags":["team"],"x-scope":"matches.read","security":[{"bearerAuth":[]}],"parameters":[{"name":"number","in":"path","required":true,"description":"The match number, as on the website","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"},"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"The match number, as on the website"},"status":{"type":"string","description":"scheduled (locked, not played), reported (played, nothing counts yet: no result, or one that waits to be confirmed), confirmed (the result counts) or disputed (a team disputed it: nothing counts until league staff settle it). A result read from the game is confirmed as soon as the league reads it, and can still become disputed until disputeUntil"},"rated":{"type":"boolean","description":"Whether the result is moving Elo now. False again while the match is disputed"},"region":{"type":"string","description":"Competitive region code: EU, NA, SA, ASIA, OCE or MEA"},"map":{"type":"string","description":"Map id, the game’s own: kavkazi, europe, north-america or sabatulo"},"mapName":{"type":"string","description":"The map’s name as the website shows it, for example Zestafona for north-america"},"layer":{"description":"Zone key as stored on the match; null for Random or none","type":["string","null"]},"zone":{"description":"The zone as the website shows it. \"Random zone\" when no zone was picked or rolled; null only when the map itself is Random","type":["string","null"]},"weather":{"description":"Weather key (clear, overcast, rain, fog, storm), or null for any","type":["string","null"]},"season":{"description":"Name of the season the match belongs to; null when none was running","type":["string","null"]},"startsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it starts. UTC, ISO 8601"},"concludedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the result that counts was confirmed: set with status confirmed, null otherwise (and again while disputed). It moves when league staff settle a dispute. UTC, ISO 8601"},"disputeUntil":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"Set while the result already counts and a team can still dispute it: the end of that window. Null otherwise. UTC, ISO 8601"},"durationSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How long it was played, in seconds; null when unknown"},"host":{"description":"Team slug of the host; null when no team hosts (a GWL official server, or the host team is gone)","type":["string","null"]},"sides":{"type":"array","items":{"type":"object","properties":{"team":{"type":"object","properties":{"slug":{"type":"string","description":"The team’s address on the site (/teams/<slug>): its id here"},"name":{"description":"Team name; null if it is gone","type":["string","null"]},"tag":{"description":"Team tag; null if it is gone","type":["string","null"]}},"required":["slug","name","tag"],"additionalProperties":false,"description":"A team, by slug, name and tag"},"faction":{"description":"Faction code once a moderator assigns one, else null","type":["string","null"]},"score":{"description":"The side’s in-game score, 0 to 100; null before a result","type":["number","null"]},"placement":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"1, 2 or 3; null before a result"},"points":{"description":"Placement points for the match: 5 for 1st, 3 for 2nd, 1 for 3rd. They count only while the status is confirmed","type":["number","null"]},"eloDelta":{"description":"Elo change from this match as it counts now; null while it is not rated, a disputed match included","type":["number","null"]}},"required":["team","faction","score","placement","points","eloDelta"],"additionalProperties":false,"description":"One of the three teams in a match"},"description":"The three teams, host first"},"lockedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the third team joined and it became a match. UTC, ISO 8601"},"serverPosted":{"type":"boolean","description":"Whether server details have been posted. This route never returns them: see /team/matches/{number}/server"},"readyTeams":{"type":"array","items":{"type":"string"},"description":"Slugs of the teams that pressed Ready"},"playerStats":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Their name in the game, as the match page shows it"},"team":{"type":"object","properties":{"slug":{"type":"string","description":"The team’s address on the site (/teams/<slug>): its id here"},"name":{"description":"Team name; null if it is gone","type":["string","null"]},"tag":{"description":"Team tag; null if it is gone","type":["string","null"]}},"required":["slug","name","tag"],"additionalProperties":false,"description":"The team they played for in this match"},"kills":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Kills"},"deaths":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Deaths"},"headshots":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Headshot kills; null when the match file does not say"}},"required":["name","team","kills","deaths","headshots"],"additionalProperties":false},"description":"Each team’s players, in the order of sides, most kills first. There as soon as the league has built the match file from its game server; empty before that, and for a match with no file or called off. The same privacy rules as the public match page: nobody who hid their stats, team kills and suicides never counted as kills, and never a Steam or Discord ID"}},"required":["number","status","rated","region","map","mapName","layer","zone","weather","season","startsAt","concludedAt","disputeUntil","durationSeconds","host","sides","lockedAt","serverPosted","readyTeams","playerStats"],"additionalProperties":false,"description":"One of your team’s matches, with its player stats"},"example":{"number":"9103","status":"confirmed","rated":true,"region":"EU","map":"north-america","mapName":"Zestafona","layer":"Houses","zone":"Houses","weather":"rain","season":"Sandbox Season","startsAt":"2027-01-11T19:00:00.000Z","concludedAt":"2027-01-11T21:59:00.000Z","disputeUntil":null,"durationSeconds":3540,"host":"test-team","sides":[{"team":{"slug":"test-team","name":"Test Team","tag":"TEST"},"faction":"lonestar","score":65,"placement":2,"points":3,"eloDelta":0},{"team":{"slug":"dummy-dragoons","name":"Dummy Dragoons","tag":"DUMY"},"faction":"valkyra","score":100,"placement":1,"points":5,"eloDelta":18},{"team":{"slug":"fixture-falcons","name":"Fixture Falcons","tag":"FIXT"},"faction":"manticore","score":34,"placement":3,"points":1,"eloDelta":-16}],"lockedAt":"2027-01-08T19:00:00.000Z","serverPosted":true,"readyTeams":["test-team","dummy-dragoons","fixture-falcons"],"playerStats":[{"name":"Sandbox Four","team":{"slug":"test-team","name":"Test Team","tag":"TEST"},"kills":1,"deaths":1,"headshots":0},{"name":"Sandbox Two","team":{"slug":"test-team","name":"Test Team","tag":"TEST"},"kills":1,"deaths":2,"headshots":0},{"name":"Sandbox One","team":{"slug":"dummy-dragoons","name":"Dummy Dragoons","tag":"DUMY"},"kills":2,"deaths":1,"headshots":1},{"name":"Sandbox Three","team":{"slug":"fixture-falcons","name":"Fixture Falcons","tag":"FIXT"},"kills":1,"deaths":1,"headshots":0}]}}}},"304":{"description":"Not modified (If-None-Match)"},"401":{"description":"missing_key, invalid_key, key_revoked, key_expired","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_key":{"summary":"No Authorization header, or not a bearer token.","value":{"error":{"code":"missing_key","message":"Send your key as Authorization: Bearer <key>."}}},"invalid_key":{"summary":"Not a key, a mistyped one, or a key used in the wrong mode.","value":{"error":{"code":"invalid_key","message":"That key is not valid."}}},"key_revoked":{"summary":"The key was revoked, by its team, by league staff or because its team is gone.","value":{"error":{"code":"key_revoked","message":"That key has been revoked."}}},"key_expired":{"summary":"The key passed the expiry chosen when it was made.","value":{"error":{"code":"key_expired","message":"That key has expired."}}}}}}},"403":{"description":"missing_scope, scope_lost, wrong_key_type, team_suspended, key_maker_left, key_maker_no_access","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_scope":{"summary":"The key was made without the scope the route needs. The message names it.","value":{"error":{"code":"missing_scope","message":"This key does not have the team.read scope."}}},"scope_lost":{"summary":"The scope is ticked, but the key’s maker no longer holds the team permission behind it.","value":{"error":{"code":"scope_lost","message":"Whoever made this key no longer has the power behind Team record. Someone who does can rotate it."}}},"wrong_key_type":{"summary":"A personal key on a team route, or a team live key on a public route.","value":{"error":{"code":"wrong_key_type","message":"That needs a team key."}}},"team_suspended":{"summary":"League staff suspended the team. Its keys work again when it is restored.","value":{"error":{"code":"team_suspended","message":"This team is suspended, so its keys are stopped."}}},"key_maker_left":{"summary":"The person who made or last rotated the key left the team. Rotating starts it again.","value":{"error":{"code":"key_maker_left","message":"Whoever made this key is no longer on the team. Someone with access can rotate it."}}},"key_maker_no_access":{"summary":"The person who made or last rotated the key no longer holds Manage API keys. Rotating starts it again.","value":{"error":{"code":"key_maker_no_access","message":"Whoever made this key can no longer manage API keys. Someone with access can rotate it."}}}}}}},"404":{"description":"not_found","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"Nothing at that address, or another team’s match or application (so their existence does not leak).","value":{"error":{"code":"not_found","message":"We could not find that."}}}}}}},"429":{"description":"rate_limited, daily_limit, too_many_bad_keys","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}},"daily_limit":{"summary":"A personal or test key used its requests for the day.","value":{"error":{"code":"daily_limit","message":"This key has used today’s requests."}}},"too_many_bad_keys":{"summary":"Too many wrong keys from one address. Wait for Retry-After.","value":{"error":{"code":"too_many_bad_keys","message":"Too many bad keys from this address."}}}}}}},"500":{"description":"internal_error","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"A fault on the league’s side. Try again later.","value":{"error":{"code":"internal_error","message":"Something went wrong on our side."}}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/matches/9103\" \\\n  -H \"Authorization: Bearer $GWL_API_KEY\""},{"lang":"JavaScript","source":"const res = await fetch('https://YOUR-LEAGUE-ADDRESS/api/v1/team/matches/9103', {\n  headers: {\n    Authorization: `Bearer ${process.env.GWL_API_KEY}`,\n  },\n})\nif (!res.ok) throw new Error((await res.json()).error.code)\nconst data = await res.json()"},{"lang":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/matches/9103\",\n    headers={\"Authorization\": f\"Bearer {os.environ['GWL_API_KEY']}\"},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()"}]}},"/team/matches/{number}/players":{"get":{"operationId":"getMatchPlayers","summary":"Who is playing in a match that has not finished","description":"For a server that lets people in by Steam ID before the match. If your team hosts the match you get all three teams, so you can open the server to everyone playing; if you do not, only your own team. Each player carries their team and its faction, so a server can put them on the right side. Adds steamId on each player with the members.steam_id scope (absent without it). Only people with a site account and a linked Steam account are listed with an ID: a roster entry nobody has proved reads null, and a mercenary is not listed. 404 for a match your team is not in and for one that has finished.","tags":["team"],"x-scope":"matches.read","x-optional-scopes":["members.steam_id"],"security":[{"bearerAuth":[]}],"parameters":[{"name":"number","in":"path","required":true,"description":"The number of a match that has not finished","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"},"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"The match number"},"startsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the match starts. UTC, ISO 8601"},"host":{"description":"Slug of the team hosting the match; null on a GWL official server","type":["string","null"]},"yourTeamHosts":{"type":"boolean","description":"Your team hosts, so every team is listed"},"teams":{"type":"array","items":{"type":"object","properties":{"team":{"type":"object","properties":{"slug":{"type":"string","description":"The team’s address on the site (/teams/<slug>): its id here"},"name":{"description":"Team name; null if it is gone","type":["string","null"]},"tag":{"description":"Team tag; null if it is gone","type":["string","null"]}},"required":["slug","name","tag"],"additionalProperties":false,"description":"A team, by slug, name and tag"},"faction":{"description":"The faction the team plays; null until it is drawn","type":["string","null"]},"yours":{"type":"boolean","description":"This is your own team"},"players":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Display name"},"role":{"type":"string","description":"owner, manager or player"},"team":{"type":"object","properties":{"slug":{"type":"string","description":"The team’s address on the site (/teams/<slug>): its id here"},"name":{"description":"Team name; null if it is gone","type":["string","null"]},"tag":{"description":"Team tag; null if it is gone","type":["string","null"]}},"required":["slug","name","tag"],"additionalProperties":false,"description":"The team they play for in this match"},"faction":{"description":"Their team’s faction; null until it is drawn","type":["string","null"]},"steamId":{"description":"SteamID64. Only with the members.steam_id scope (absent without it); null when the person has no linked Steam account","anyOf":[{"type":"string","pattern":"^7656119\\d{10}$"},{"type":"null"}]}},"required":["name","role","team","faction"],"additionalProperties":false},"description":"Members of the team, Leader first"}},"required":["team","faction","yours","players"],"additionalProperties":false},"description":"The teams in the match, yours first"}},"required":["number","startsAt","host","yourTeamHosts","teams"],"additionalProperties":false},"example":{"number":"9105","startsAt":"2027-01-17T19:00:00.000Z","host":"test-team","yourTeamHosts":true,"teams":[{"team":{"slug":"test-team","name":"Test Team","tag":"TEST"},"faction":"lonestar","yours":true,"players":[{"name":"Ada Example","role":"owner","team":{"slug":"test-team","name":"Test Team","tag":"TEST"},"faction":"lonestar","steamId":"76561190000000001"},{"name":"Bram Sample","role":"manager","team":{"slug":"test-team","name":"Test Team","tag":"TEST"},"faction":"lonestar","steamId":"76561190000000002"},{"name":"Cleo Placeholder","role":"manager","team":{"slug":"test-team","name":"Test Team","tag":"TEST"},"faction":"lonestar","steamId":"76561190000000003"},{"name":"Dmitri Mock","role":"player","team":{"slug":"test-team","name":"Test Team","tag":"TEST"},"faction":"lonestar","steamId":"76561190000000004"},{"name":"Eun-ji Testcase","role":"player","team":{"slug":"test-team","name":"Test Team","tag":"TEST"},"faction":"lonestar","steamId":"76561190000000005"},{"name":"Femi Dummy","role":"player","team":{"slug":"test-team","name":"Test Team","tag":"TEST"},"faction":"lonestar","steamId":"76561190000000006"},{"name":"Gustav Stub","role":"player","team":{"slug":"test-team","name":"Test Team","tag":"TEST"},"faction":"lonestar","steamId":"76561190000000007"},{"name":"Hana Fixture","role":"player","team":{"slug":"test-team","name":"Test Team","tag":"TEST"},"faction":"lonestar","steamId":"76561190000000008"}]},{"team":{"slug":"example-eagles","name":"Example Eagles","tag":"EXEG"},"faction":null,"yours":false,"players":[{"name":"Sandbox example-eagles 1","role":"owner","team":{"slug":"example-eagles","name":"Example Eagles","tag":"EXEG"},"faction":null,"steamId":"76561190000000101"},{"name":"Sandbox example-eagles 2","role":"player","team":{"slug":"example-eagles","name":"Example Eagles","tag":"EXEG"},"faction":null,"steamId":"76561190000000102"},{"name":"Sandbox example-eagles 3","role":"player","team":{"slug":"example-eagles","name":"Example Eagles","tag":"EXEG"},"faction":null,"steamId":"76561190000000103"}]},{"team":{"slug":"sample-sappers","name":"Sample Sappers","tag":"SMPL"},"faction":null,"yours":false,"players":[{"name":"Sandbox sample-sappers 1","role":"owner","team":{"slug":"sample-sappers","name":"Sample Sappers","tag":"SMPL"},"faction":null,"steamId":"76561190000000201"},{"name":"Sandbox sample-sappers 2","role":"player","team":{"slug":"sample-sappers","name":"Sample Sappers","tag":"SMPL"},"faction":null,"steamId":"76561190000000202"},{"name":"Sandbox sample-sappers 3","role":"player","team":{"slug":"sample-sappers","name":"Sample Sappers","tag":"SMPL"},"faction":null,"steamId":"76561190000000203"}]}]}}}},"304":{"description":"Not modified (If-None-Match)"},"401":{"description":"missing_key, invalid_key, key_revoked, key_expired","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_key":{"summary":"No Authorization header, or not a bearer token.","value":{"error":{"code":"missing_key","message":"Send your key as Authorization: Bearer <key>."}}},"invalid_key":{"summary":"Not a key, a mistyped one, or a key used in the wrong mode.","value":{"error":{"code":"invalid_key","message":"That key is not valid."}}},"key_revoked":{"summary":"The key was revoked, by its team, by league staff or because its team is gone.","value":{"error":{"code":"key_revoked","message":"That key has been revoked."}}},"key_expired":{"summary":"The key passed the expiry chosen when it was made.","value":{"error":{"code":"key_expired","message":"That key has expired."}}}}}}},"403":{"description":"missing_scope, scope_lost, wrong_key_type, team_suspended, key_maker_left, key_maker_no_access","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_scope":{"summary":"The key was made without the scope the route needs. The message names it.","value":{"error":{"code":"missing_scope","message":"This key does not have the team.read scope."}}},"scope_lost":{"summary":"The scope is ticked, but the key’s maker no longer holds the team permission behind it.","value":{"error":{"code":"scope_lost","message":"Whoever made this key no longer has the power behind Team record. Someone who does can rotate it."}}},"wrong_key_type":{"summary":"A personal key on a team route, or a team live key on a public route.","value":{"error":{"code":"wrong_key_type","message":"That needs a team key."}}},"team_suspended":{"summary":"League staff suspended the team. Its keys work again when it is restored.","value":{"error":{"code":"team_suspended","message":"This team is suspended, so its keys are stopped."}}},"key_maker_left":{"summary":"The person who made or last rotated the key left the team. Rotating starts it again.","value":{"error":{"code":"key_maker_left","message":"Whoever made this key is no longer on the team. Someone with access can rotate it."}}},"key_maker_no_access":{"summary":"The person who made or last rotated the key no longer holds Manage API keys. Rotating starts it again.","value":{"error":{"code":"key_maker_no_access","message":"Whoever made this key can no longer manage API keys. Someone with access can rotate it."}}}}}}},"404":{"description":"not_found","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"Nothing at that address, or another team’s match or application (so their existence does not leak).","value":{"error":{"code":"not_found","message":"We could not find that."}}}}}}},"429":{"description":"rate_limited, daily_limit, too_many_bad_keys","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}},"daily_limit":{"summary":"A personal or test key used its requests for the day.","value":{"error":{"code":"daily_limit","message":"This key has used today’s requests."}}},"too_many_bad_keys":{"summary":"Too many wrong keys from one address. Wait for Retry-After.","value":{"error":{"code":"too_many_bad_keys","message":"Too many bad keys from this address."}}}}}}},"500":{"description":"internal_error","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"A fault on the league’s side. Try again later.","value":{"error":{"code":"internal_error","message":"Something went wrong on our side."}}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/matches/9105/players\" \\\n  -H \"Authorization: Bearer $GWL_API_KEY\""},{"lang":"JavaScript","source":"const res = await fetch('https://YOUR-LEAGUE-ADDRESS/api/v1/team/matches/9105/players', {\n  headers: {\n    Authorization: `Bearer ${process.env.GWL_API_KEY}`,\n  },\n})\nif (!res.ok) throw new Error((await res.json()).error.code)\nconst data = await res.json()"},{"lang":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/matches/9105/players\",\n    headers={\"Authorization\": f\"Bearer {os.environ['GWL_API_KEY']}\"},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()"}]}},"/team/matches/{number}/server":{"get":{"operationId":"getMatchServer","summary":"How to join the server of one of the team’s matches","description":"The details posted for the match, the same ones its teams see on the match page. server is null until they are posted, and again once the match has a result, is called off or is more than 4 hours past its start. Poll it while the match is coming up (once a minute is plenty): the join details can change. 404 for a match your team is not in. Keep the answer out of public channels and logs.","tags":["team"],"x-scope":"matches.server_details","security":[{"bearerAuth":[]}],"parameters":[{"name":"number","in":"path","required":true,"description":"The match number, as on the website","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"},"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"The match number"},"server":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","description":"The server’s name, as it reads in the game’s server list"},"joinCode":{"description":"The code to join with; null when none was given","type":["string","null"]},"note":{"type":"string","description":"The notes posted with it, which can hold the password"},"postedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When these details were posted. UTC, ISO 8601"}},"required":["name","joinCode","note","postedAt"],"additionalProperties":false},{"type":"null"}],"description":"Null when there is nothing to join"}},"required":["number","server"],"additionalProperties":false},"example":{"number":"9105","server":{"name":"Sandbox match server","joinCode":"SANDBOX-CODE","note":"Password: sandbox-only","postedAt":"2027-01-15T12:00:00.000Z"}}}}},"304":{"description":"Not modified (If-None-Match)"},"401":{"description":"missing_key, invalid_key, key_revoked, key_expired","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_key":{"summary":"No Authorization header, or not a bearer token.","value":{"error":{"code":"missing_key","message":"Send your key as Authorization: Bearer <key>."}}},"invalid_key":{"summary":"Not a key, a mistyped one, or a key used in the wrong mode.","value":{"error":{"code":"invalid_key","message":"That key is not valid."}}},"key_revoked":{"summary":"The key was revoked, by its team, by league staff or because its team is gone.","value":{"error":{"code":"key_revoked","message":"That key has been revoked."}}},"key_expired":{"summary":"The key passed the expiry chosen when it was made.","value":{"error":{"code":"key_expired","message":"That key has expired."}}}}}}},"403":{"description":"missing_scope, scope_lost, wrong_key_type, team_suspended, key_maker_left, key_maker_no_access","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_scope":{"summary":"The key was made without the scope the route needs. The message names it.","value":{"error":{"code":"missing_scope","message":"This key does not have the team.read scope."}}},"scope_lost":{"summary":"The scope is ticked, but the key’s maker no longer holds the team permission behind it.","value":{"error":{"code":"scope_lost","message":"Whoever made this key no longer has the power behind Team record. Someone who does can rotate it."}}},"wrong_key_type":{"summary":"A personal key on a team route, or a team live key on a public route.","value":{"error":{"code":"wrong_key_type","message":"That needs a team key."}}},"team_suspended":{"summary":"League staff suspended the team. Its keys work again when it is restored.","value":{"error":{"code":"team_suspended","message":"This team is suspended, so its keys are stopped."}}},"key_maker_left":{"summary":"The person who made or last rotated the key left the team. Rotating starts it again.","value":{"error":{"code":"key_maker_left","message":"Whoever made this key is no longer on the team. Someone with access can rotate it."}}},"key_maker_no_access":{"summary":"The person who made or last rotated the key no longer holds Manage API keys. Rotating starts it again.","value":{"error":{"code":"key_maker_no_access","message":"Whoever made this key can no longer manage API keys. Someone with access can rotate it."}}}}}}},"404":{"description":"not_found","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"Nothing at that address, or another team’s match or application (so their existence does not leak).","value":{"error":{"code":"not_found","message":"We could not find that."}}}}}}},"429":{"description":"rate_limited, daily_limit, too_many_bad_keys","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}},"daily_limit":{"summary":"A personal or test key used its requests for the day.","value":{"error":{"code":"daily_limit","message":"This key has used today’s requests."}}},"too_many_bad_keys":{"summary":"Too many wrong keys from one address. Wait for Retry-After.","value":{"error":{"code":"too_many_bad_keys","message":"Too many bad keys from this address."}}}}}}},"500":{"description":"internal_error","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"A fault on the league’s side. Try again later.","value":{"error":{"code":"internal_error","message":"Something went wrong on our side."}}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/matches/9105/server\" \\\n  -H \"Authorization: Bearer $GWL_API_KEY\""},{"lang":"JavaScript","source":"const res = await fetch('https://YOUR-LEAGUE-ADDRESS/api/v1/team/matches/9105/server', {\n  headers: {\n    Authorization: `Bearer ${process.env.GWL_API_KEY}`,\n  },\n})\nif (!res.ok) throw new Error((await res.json()).error.code)\nconst data = await res.json()"},{"lang":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/matches/9105/server\",\n    headers={\"Authorization\": f\"Bearer {os.environ['GWL_API_KEY']}\"},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()"}]}},"/team/matches/{number}/file":{"get":{"operationId":"getMatchFile","summary":"The raw match file of one of the team’s matches","description":"Built from the league server’s live feed after the match, in the format the league reads. Includes Steam IDs. 404 until the file exists, and for a match the team was not in.","tags":["team"],"x-scope":"matches.file","security":[{"bearerAuth":[]}],"parameters":[{"name":"number","in":"path","required":true,"description":"The match number, as on the website","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"},"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The file’s id"},"map":{"type":"string","description":"The map"},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the game said play began. When the feed carried no such message, the first kill, so it can be later than the real start (with no kill, the scheduled start). UTC, ISO 8601"},"endedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the game said the match ended; null when it did not. UTC, ISO 8601"},"reason":{"description":"Why it started; usually null","type":["string","null"]},"endReason":{"description":"How it ended, when the game said","type":["string","null"]},"coverage":{"type":"string","description":"\"observed\": built by the league from the live feed, so its end and any final score are unconfirmed"},"eventCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Number of events"},"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"The game’s id for the event"},"type":{"type":"string","enum":["player_killed","player_suicide","player_died"],"description":"A kill, a suicide, or a death with no killer"},"sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Position in the file, from 0"},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened. UTC, ISO 8601"},"victimSteamId":{"type":"string","description":"SteamID64 of the player who died"},"victimName":{"type":"string","description":"Their name in the game"},"victimFaction":{"type":"string","description":"Their faction, when the server said"},"killerSteamId":{"type":"string","description":"SteamID64 of the killer; absent for a death"},"killerName":{"type":"string","description":"The killer’s name in the game"},"killerFaction":{"type":"string","description":"The killer’s faction, when the server said"},"cause":{"type":"string","description":"What killed them, as the game names it"},"weaponId":{"type":"string","description":"The weapon, when the cause is one"},"mapName":{"type":"string","description":"The map the game reported"},"matchId":{"type":"string","description":"The game’s own match id: not one of ours"},"distance":{"type":"number","description":"Kill distance in centimetres, when the game said"},"eventTime":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The game’s time for it, seconds since 1970"},"contextTags":{"type":"array","items":{"type":"string"},"description":"The game’s tags, such as headshot"}},"required":["id","type","sequence","at","victimSteamId","mapName","matchId","eventTime","contextTags"],"additionalProperties":false,"description":"One event"},"description":"Every kill, suicide and death, in order"},"scores":{"type":"array","items":{"type":"object","properties":{"sequence":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Position, from 0"},"observedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it was seen. UTC, ISO 8601"},"map":{"type":"string","description":"The map"},"scores":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Faction name"},"score":{"type":"number","description":"Its score"},"color":{"type":"string","description":"Its colour"}},"required":["name","score","color"],"additionalProperties":false},"description":"One entry per faction"}},"required":["sequence","observedAt","map","scores"],"additionalProperties":false},"description":"Faction scores in time order. The last is the final score; any before it are readings taken while the match ran, about one a minute, and there can be gaps. Empty when the game gave no final score"},"notice":{"description":"A note about how the file was made","type":["string","null"]}},"required":["id","map","startedAt","endedAt","reason","endReason","coverage","eventCount","events","scores","notice"],"additionalProperties":false,"description":"The raw match file"},"example":{"id":"gwl-9103","map":"north-america","startedAt":"2027-01-11T19:10:00.000Z","endedAt":null,"reason":null,"endReason":null,"coverage":"observed","eventCount":5,"events":[{"id":"sandbox-9103-0","type":"player_killed","sequence":0,"at":"2027-01-11T19:10:00.000Z","victimSteamId":"76561190000000002","victimName":"Sandbox Two","killerSteamId":"76561190000000001","killerName":"Sandbox One","cause":"AK74","weaponId":"AK74","mapName":"north-america","matchId":"9103","distance":14200,"eventTime":1799694600,"contextTags":[]},{"id":"sandbox-9103-1","type":"player_killed","sequence":1,"at":"2027-01-11T19:17:00.000Z","victimSteamId":"76561190000000004","victimName":"Sandbox Four","killerSteamId":"76561190000000003","killerName":"Sandbox Three","cause":"M4A1","weaponId":"M4A1","mapName":"north-america","matchId":"9103","distance":3100,"eventTime":1799695020,"contextTags":[]},{"id":"sandbox-9103-2","type":"player_killed","sequence":2,"at":"2027-01-11T19:24:00.000Z","victimSteamId":"76561190000000003","victimName":"Sandbox Three","killerSteamId":"76561190000000001","killerName":"Sandbox One","cause":"SVD","weaponId":"SVD","mapName":"north-america","matchId":"9103","distance":30500,"eventTime":1799695440,"contextTags":["Meta.Progression.Context.Player.KillContext.Headshot"]},{"id":"sandbox-9103-3","type":"player_killed","sequence":3,"at":"2027-01-11T19:31:00.000Z","victimSteamId":"76561190000000001","victimName":"Sandbox One","killerSteamId":"76561190000000002","killerName":"Sandbox Two","cause":"AK74","weaponId":"AK74","mapName":"north-america","matchId":"9103","distance":1800,"eventTime":1799695860,"contextTags":[]},{"id":"sandbox-9103-4","type":"player_killed","sequence":4,"at":"2027-01-11T19:38:00.000Z","victimSteamId":"76561190000000002","victimName":"Sandbox Two","killerSteamId":"76561190000000004","killerName":"Sandbox Four","cause":"M4A1","weaponId":"M4A1","mapName":"north-america","matchId":"9103","distance":7700,"eventTime":1799696280,"contextTags":[]}],"scores":[],"notice":"Built by the league from the server's live feed."}}}},"304":{"description":"Not modified (If-None-Match)"},"401":{"description":"missing_key, invalid_key, key_revoked, key_expired","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_key":{"summary":"No Authorization header, or not a bearer token.","value":{"error":{"code":"missing_key","message":"Send your key as Authorization: Bearer <key>."}}},"invalid_key":{"summary":"Not a key, a mistyped one, or a key used in the wrong mode.","value":{"error":{"code":"invalid_key","message":"That key is not valid."}}},"key_revoked":{"summary":"The key was revoked, by its team, by league staff or because its team is gone.","value":{"error":{"code":"key_revoked","message":"That key has been revoked."}}},"key_expired":{"summary":"The key passed the expiry chosen when it was made.","value":{"error":{"code":"key_expired","message":"That key has expired."}}}}}}},"403":{"description":"missing_scope, scope_lost, wrong_key_type, team_suspended, key_maker_left, key_maker_no_access","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_scope":{"summary":"The key was made without the scope the route needs. The message names it.","value":{"error":{"code":"missing_scope","message":"This key does not have the team.read scope."}}},"scope_lost":{"summary":"The scope is ticked, but the key’s maker no longer holds the team permission behind it.","value":{"error":{"code":"scope_lost","message":"Whoever made this key no longer has the power behind Team record. Someone who does can rotate it."}}},"wrong_key_type":{"summary":"A personal key on a team route, or a team live key on a public route.","value":{"error":{"code":"wrong_key_type","message":"That needs a team key."}}},"team_suspended":{"summary":"League staff suspended the team. Its keys work again when it is restored.","value":{"error":{"code":"team_suspended","message":"This team is suspended, so its keys are stopped."}}},"key_maker_left":{"summary":"The person who made or last rotated the key left the team. Rotating starts it again.","value":{"error":{"code":"key_maker_left","message":"Whoever made this key is no longer on the team. Someone with access can rotate it."}}},"key_maker_no_access":{"summary":"The person who made or last rotated the key no longer holds Manage API keys. Rotating starts it again.","value":{"error":{"code":"key_maker_no_access","message":"Whoever made this key can no longer manage API keys. Someone with access can rotate it."}}}}}}},"404":{"description":"not_found","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"Nothing at that address, or another team’s match or application (so their existence does not leak).","value":{"error":{"code":"not_found","message":"We could not find that."}}}}}}},"429":{"description":"rate_limited, daily_limit, too_many_bad_keys","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}},"daily_limit":{"summary":"A personal or test key used its requests for the day.","value":{"error":{"code":"daily_limit","message":"This key has used today’s requests."}}},"too_many_bad_keys":{"summary":"Too many wrong keys from one address. Wait for Retry-After.","value":{"error":{"code":"too_many_bad_keys","message":"Too many bad keys from this address."}}}}}}},"500":{"description":"internal_error","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"A fault on the league’s side. Try again later.","value":{"error":{"code":"internal_error","message":"Something went wrong on our side."}}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/matches/9103/file\" \\\n  -H \"Authorization: Bearer $GWL_API_KEY\""},{"lang":"JavaScript","source":"const res = await fetch('https://YOUR-LEAGUE-ADDRESS/api/v1/team/matches/9103/file', {\n  headers: {\n    Authorization: `Bearer ${process.env.GWL_API_KEY}`,\n  },\n})\nif (!res.ok) throw new Error((await res.json()).error.code)\nconst data = await res.json()"},{"lang":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/matches/9103/file\",\n    headers={\"Authorization\": f\"Bearer {os.environ['GWL_API_KEY']}\"},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()"}]}},"/team/elo":{"get":{"operationId":"getElo","summary":"The Elo Rating now and over time","tags":["team"],"x-scope":"elo.read","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"How many, up to 100","schema":{"default":100,"description":"How many, up to 100","type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"},"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"type":"object","properties":{"eloRating":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The Elo Rating: one ongoing all-time number, as on every page"},"ratedMatches":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Rated matches, all time"},"changeLast5":{"type":"number","description":"Elo change over the last five rated matches"},"history":{"type":"array","items":{"type":"number"},"description":"The Elo Rating after each rated match, oldest first"}},"required":["eloRating","ratedMatches","changeLast5","history"],"additionalProperties":false},"example":{"eloRating":1482,"ratedMatches":12,"changeLast5":14,"history":[1470,1468,1485,1482,1482]}}}},"304":{"description":"Not modified (If-None-Match)"},"400":{"description":"invalid_request","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"A query parameter or body field is missing, of the wrong type or out of range.","value":{"error":{"code":"invalid_request","message":"Check the query parameters."}}}}}}},"401":{"description":"missing_key, invalid_key, key_revoked, key_expired","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_key":{"summary":"No Authorization header, or not a bearer token.","value":{"error":{"code":"missing_key","message":"Send your key as Authorization: Bearer <key>."}}},"invalid_key":{"summary":"Not a key, a mistyped one, or a key used in the wrong mode.","value":{"error":{"code":"invalid_key","message":"That key is not valid."}}},"key_revoked":{"summary":"The key was revoked, by its team, by league staff or because its team is gone.","value":{"error":{"code":"key_revoked","message":"That key has been revoked."}}},"key_expired":{"summary":"The key passed the expiry chosen when it was made.","value":{"error":{"code":"key_expired","message":"That key has expired."}}}}}}},"403":{"description":"missing_scope, scope_lost, wrong_key_type, team_suspended, key_maker_left, key_maker_no_access","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_scope":{"summary":"The key was made without the scope the route needs. The message names it.","value":{"error":{"code":"missing_scope","message":"This key does not have the team.read scope."}}},"scope_lost":{"summary":"The scope is ticked, but the key’s maker no longer holds the team permission behind it.","value":{"error":{"code":"scope_lost","message":"Whoever made this key no longer has the power behind Team record. Someone who does can rotate it."}}},"wrong_key_type":{"summary":"A personal key on a team route, or a team live key on a public route.","value":{"error":{"code":"wrong_key_type","message":"That needs a team key."}}},"team_suspended":{"summary":"League staff suspended the team. Its keys work again when it is restored.","value":{"error":{"code":"team_suspended","message":"This team is suspended, so its keys are stopped."}}},"key_maker_left":{"summary":"The person who made or last rotated the key left the team. Rotating starts it again.","value":{"error":{"code":"key_maker_left","message":"Whoever made this key is no longer on the team. Someone with access can rotate it."}}},"key_maker_no_access":{"summary":"The person who made or last rotated the key no longer holds Manage API keys. Rotating starts it again.","value":{"error":{"code":"key_maker_no_access","message":"Whoever made this key can no longer manage API keys. Someone with access can rotate it."}}}}}}},"429":{"description":"rate_limited, daily_limit, too_many_bad_keys","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}},"daily_limit":{"summary":"A personal or test key used its requests for the day.","value":{"error":{"code":"daily_limit","message":"This key has used today’s requests."}}},"too_many_bad_keys":{"summary":"Too many wrong keys from one address. Wait for Retry-After.","value":{"error":{"code":"too_many_bad_keys","message":"Too many bad keys from this address."}}}}}}},"500":{"description":"internal_error","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"A fault on the league’s side. Try again later.","value":{"error":{"code":"internal_error","message":"Something went wrong on our side."}}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/elo?limit=5\" \\\n  -H \"Authorization: Bearer $GWL_API_KEY\""},{"lang":"JavaScript","source":"const res = await fetch('https://YOUR-LEAGUE-ADDRESS/api/v1/team/elo?limit=5', {\n  headers: {\n    Authorization: `Bearer ${process.env.GWL_API_KEY}`,\n  },\n})\nif (!res.ok) throw new Error((await res.json()).error.code)\nconst data = await res.json()"},{"lang":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/elo?limit=5\",\n    headers={\"Authorization\": f\"Bearer {os.environ['GWL_API_KEY']}\"},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()"}]}},"/team/events":{"get":{"operationId":"listEvents","summary":"What happened to the team, in order","description":"A feed to catch up from: pass the last id you handled as after and keep the next it returns. Events are kept 14 days. Each carries the slot or match as the other routes draw it (null once it is gone) and, for an application, only its id. Webhooks send the same objects.","tags":["team"],"x-scope":"events.read","security":[{"bearerAuth":[]}],"parameters":[{"name":"after","in":"query","required":false,"description":"Return events after this id; 0 for the oldest kept","schema":{"default":0,"description":"Return events after this id; 0 for the oldest kept","type":"integer","minimum":0,"maximum":9007199254740991}},{"name":"limit","in":"query","required":false,"description":"How many, up to 100","schema":{"default":50,"description":"How many, up to 100","type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"},"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Increases with every event; use it as the cursor"},"type":{"type":"string","description":"One of the event types listed in the handbook"},"createdAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it happened. UTC, ISO 8601"},"team":{"type":"string","description":"Slug of the team it is for"},"data":{"type":"object","properties":{"slot":{"description":"The slot, for slot.* events; null once it is gone","anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Slot id; /matches?slot=<id> on the site"},"startsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the match would start. UTC, ISO 8601"},"region":{"type":"string","description":"Competitive region code: EU, NA, SA, ASIA, OCE or MEA"},"map":{"type":"string","description":"Map id, the game’s own, or random"},"mapName":{"type":"string","description":"The map’s name as the website shows it; Random for a random map"},"layer":{"description":"Zone key; null for none","type":["string","null"]},"zone":{"description":"The zone as the website shows it (\"Random zone\" when none was picked); null for a random map","type":["string","null"]},"weather":{"description":"Weather key (clear, overcast, rain, fog, storm), or null for any","type":["string","null"]},"seatsFilled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Teams in it so far, of three"},"seatsFree":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Seats still open, of three"},"host":{"type":"string","description":"Slug of the team that posted it"},"teams":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"The team’s address on the site (/teams/<slug>): its id here"},"name":{"description":"Team name; null if it is gone","type":["string","null"]},"tag":{"description":"Team tag; null if it is gone","type":["string","null"]}},"required":["slug","name","tag"],"additionalProperties":false,"description":"A team, by slug, name and tag"},"description":"The teams in it so far, the poster first, with names and tags"},"yours":{"type":"boolean","description":"Whether your team is one of the teams in it"},"private":{"type":"boolean","description":"Whether it is an invitation only slot. You only see one you posted or were invited to"},"joinedTeam":{"description":"Slug of the second team; null while that seat is free","type":["string","null"]}},"required":["id","startsAt","region","map","mapName","layer","zone","weather","seatsFilled","seatsFree","host","teams","yours","private","joinedTeam"],"additionalProperties":false},{"type":"null"}]},"match":{"description":"The match, for match.* events; null if it is gone","anyOf":[{"type":"object","properties":{"number":{"type":"string","description":"The match number, as on the website"},"status":{"type":"string","description":"scheduled (locked, not played), reported (played, nothing counts yet: no result, or one that waits to be confirmed), confirmed (the result counts) or disputed (a team disputed it: nothing counts until league staff settle it). A result read from the game is confirmed as soon as the league reads it, and can still become disputed until disputeUntil"},"rated":{"type":"boolean","description":"Whether the result is moving Elo now. False again while the match is disputed"},"region":{"type":"string","description":"Competitive region code: EU, NA, SA, ASIA, OCE or MEA"},"map":{"type":"string","description":"Map id, the game’s own: kavkazi, europe, north-america or sabatulo"},"mapName":{"type":"string","description":"The map’s name as the website shows it, for example Zestafona for north-america"},"layer":{"description":"Zone key as stored on the match; null for Random or none","type":["string","null"]},"zone":{"description":"The zone as the website shows it. \"Random zone\" when no zone was picked or rolled; null only when the map itself is Random","type":["string","null"]},"weather":{"description":"Weather key (clear, overcast, rain, fog, storm), or null for any","type":["string","null"]},"season":{"description":"Name of the season the match belongs to; null when none was running","type":["string","null"]},"startsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it starts. UTC, ISO 8601"},"concludedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the result that counts was confirmed: set with status confirmed, null otherwise (and again while disputed). It moves when league staff settle a dispute. UTC, ISO 8601"},"disputeUntil":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"Set while the result already counts and a team can still dispute it: the end of that window. Null otherwise. UTC, ISO 8601"},"durationSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How long it was played, in seconds; null when unknown"},"host":{"description":"Team slug of the host; null when no team hosts (a GWL official server, or the host team is gone)","type":["string","null"]},"sides":{"type":"array","items":{"type":"object","properties":{"team":{"type":"object","properties":{"slug":{"type":"string","description":"The team’s address on the site (/teams/<slug>): its id here"},"name":{"description":"Team name; null if it is gone","type":["string","null"]},"tag":{"description":"Team tag; null if it is gone","type":["string","null"]}},"required":["slug","name","tag"],"additionalProperties":false,"description":"A team, by slug, name and tag"},"faction":{"description":"Faction code once a moderator assigns one, else null","type":["string","null"]},"score":{"description":"The side’s in-game score, 0 to 100; null before a result","type":["number","null"]},"placement":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"1, 2 or 3; null before a result"},"points":{"description":"Placement points for the match: 5 for 1st, 3 for 2nd, 1 for 3rd. They count only while the status is confirmed","type":["number","null"]},"eloDelta":{"description":"Elo change from this match as it counts now; null while it is not rated, a disputed match included","type":["number","null"]}},"required":["team","faction","score","placement","points","eloDelta"],"additionalProperties":false,"description":"One of the three teams in a match"},"description":"The three teams, host first"},"lockedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the third team joined and it became a match. UTC, ISO 8601"},"serverPosted":{"type":"boolean","description":"Whether server details have been posted. This route never returns them: see /team/matches/{number}/server"},"readyTeams":{"type":"array","items":{"type":"string"},"description":"Slugs of the teams that pressed Ready"}},"required":["number","status","rated","region","map","mapName","layer","zone","weather","season","startsAt","concludedAt","disputeUntil","durationSeconds","host","sides","lockedAt","serverPosted","readyTeams"],"additionalProperties":false,"description":"One of your team’s matches"},{"type":"null"}]},"applicationId":{"description":"The application, for application.submitted","type":"string"}},"additionalProperties":false,"description":"What it is about"}},"required":["id","type","createdAt","team","data"],"additionalProperties":false,"description":"One thing that happened to your team"},"description":"Oldest first"},"next":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Pass this as after next time"},"hasMore":{"type":"boolean","description":"Whether there are more after these"}},"required":["events","next","hasMore"],"additionalProperties":false},"example":{"events":[{"id":1,"type":"slot.posted","createdAt":"2027-01-13T20:00:00.000Z","team":"test-team","data":{"slot":{"id":"test-slot-01","startsAt":"2027-01-18T19:00:00.000Z","region":"EU","map":"sabatulo","mapName":"Sabatulo","layer":"Default","zone":"Hospital - Default","weather":"fog","seatsFilled":1,"seatsFree":2,"host":"test-team","teams":[{"slug":"test-team","name":"Test Team","tag":"TEST"}],"yours":true,"private":false,"joinedTeam":null}}},{"id":2,"type":"slot.posted","createdAt":"2027-01-14T01:00:00.000Z","team":"test-team","data":{"slot":{"id":"test-slot-02","startsAt":"2027-01-21T19:00:00.000Z","region":"EU","map":"europe","mapName":"Ozeti","layer":"Church","zone":"Church","weather":null,"seatsFilled":2,"seatsFree":1,"host":"stub-strikers","teams":[{"slug":"stub-strikers","name":"Stub Strikers","tag":"STUB"},{"slug":"test-team","name":"Test Team","tag":"TEST"}],"yours":true,"private":false,"joinedTeam":"test-team"}}},{"id":3,"type":"match.locked","createdAt":"2027-01-14T06:00:00.000Z","team":"test-team","data":{"match":{"number":"9105","status":"scheduled","rated":false,"region":"EU","map":"sabatulo","mapName":"Sabatulo","layer":"Default","zone":"Hospital - Default","weather":"clear","season":"Sandbox Season","startsAt":"2027-01-17T19:00:00.000Z","concludedAt":null,"disputeUntil":null,"durationSeconds":null,"host":"test-team","sides":[{"team":{"slug":"test-team","name":"Test Team","tag":"TEST"},"faction":"lonestar","score":null,"placement":null,"points":null,"eloDelta":null},{"team":{"slug":"example-eagles","name":"Example Eagles","tag":"EXEG"},"faction":null,"score":null,"placement":null,"points":null,"eloDelta":null},{"team":{"slug":"sample-sappers","name":"Sample Sappers","tag":"SMPL"},"faction":null,"score":null,"placement":null,"points":null,"eloDelta":null}],"lockedAt":"2027-01-14T19:00:00.000Z","serverPosted":false,"readyTeams":["test-team"]}}}],"next":3,"hasMore":true}}}},"304":{"description":"Not modified (If-None-Match)"},"400":{"description":"invalid_request","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"A query parameter or body field is missing, of the wrong type or out of range.","value":{"error":{"code":"invalid_request","message":"Check the query parameters."}}}}}}},"401":{"description":"missing_key, invalid_key, key_revoked, key_expired","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_key":{"summary":"No Authorization header, or not a bearer token.","value":{"error":{"code":"missing_key","message":"Send your key as Authorization: Bearer <key>."}}},"invalid_key":{"summary":"Not a key, a mistyped one, or a key used in the wrong mode.","value":{"error":{"code":"invalid_key","message":"That key is not valid."}}},"key_revoked":{"summary":"The key was revoked, by its team, by league staff or because its team is gone.","value":{"error":{"code":"key_revoked","message":"That key has been revoked."}}},"key_expired":{"summary":"The key passed the expiry chosen when it was made.","value":{"error":{"code":"key_expired","message":"That key has expired."}}}}}}},"403":{"description":"missing_scope, scope_lost, wrong_key_type, team_suspended, key_maker_left, key_maker_no_access","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_scope":{"summary":"The key was made without the scope the route needs. The message names it.","value":{"error":{"code":"missing_scope","message":"This key does not have the team.read scope."}}},"scope_lost":{"summary":"The scope is ticked, but the key’s maker no longer holds the team permission behind it.","value":{"error":{"code":"scope_lost","message":"Whoever made this key no longer has the power behind Team record. Someone who does can rotate it."}}},"wrong_key_type":{"summary":"A personal key on a team route, or a team live key on a public route.","value":{"error":{"code":"wrong_key_type","message":"That needs a team key."}}},"team_suspended":{"summary":"League staff suspended the team. Its keys work again when it is restored.","value":{"error":{"code":"team_suspended","message":"This team is suspended, so its keys are stopped."}}},"key_maker_left":{"summary":"The person who made or last rotated the key left the team. Rotating starts it again.","value":{"error":{"code":"key_maker_left","message":"Whoever made this key is no longer on the team. Someone with access can rotate it."}}},"key_maker_no_access":{"summary":"The person who made or last rotated the key no longer holds Manage API keys. Rotating starts it again.","value":{"error":{"code":"key_maker_no_access","message":"Whoever made this key can no longer manage API keys. Someone with access can rotate it."}}}}}}},"429":{"description":"rate_limited, daily_limit, too_many_bad_keys","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}},"daily_limit":{"summary":"A personal or test key used its requests for the day.","value":{"error":{"code":"daily_limit","message":"This key has used today’s requests."}}},"too_many_bad_keys":{"summary":"Too many wrong keys from one address. Wait for Retry-After.","value":{"error":{"code":"too_many_bad_keys","message":"Too many bad keys from this address."}}}}}}},"500":{"description":"internal_error","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"A fault on the league’s side. Try again later.","value":{"error":{"code":"internal_error","message":"Something went wrong on our side."}}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/events?limit=3\" \\\n  -H \"Authorization: Bearer $GWL_API_KEY\""},{"lang":"JavaScript","source":"const res = await fetch('https://YOUR-LEAGUE-ADDRESS/api/v1/team/events?limit=3', {\n  headers: {\n    Authorization: `Bearer ${process.env.GWL_API_KEY}`,\n  },\n})\nif (!res.ok) throw new Error((await res.json()).error.code)\nconst data = await res.json()"},{"lang":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/events?limit=3\",\n    headers={\"Authorization\": f\"Bearer {os.environ['GWL_API_KEY']}\"},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()"}]}},"/team/slots":{"get":{"operationId":"listTeamSlots","summary":"Open slots: your team’s, or everyone’s","tags":["team"],"x-scope":"slots.read","security":[{"bearerAuth":[]}],"parameters":[{"name":"scope","in":"query","required":false,"description":"mine: slots your team posted or joined. open: every open slot you could see, anyone’s, including invitation only slots made for your team","schema":{"default":"mine","description":"mine: slots your team posted or joined. open: every open slot you could see, anyone’s, including invitation only slots made for your team","type":"string","enum":["mine","open"]}},{"name":"team","in":"query","required":false,"description":"Only slots this team (a slug) posted or joined. Works with either scope","schema":{"description":"Only slots this team (a slug) posted or joined. Works with either scope","type":"string","maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"},"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"type":"object","properties":{"slots":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Slot id; /matches?slot=<id> on the site"},"startsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the match would start. UTC, ISO 8601"},"region":{"type":"string","description":"Competitive region code: EU, NA, SA, ASIA, OCE or MEA"},"map":{"type":"string","description":"Map id, the game’s own, or random"},"mapName":{"type":"string","description":"The map’s name as the website shows it; Random for a random map"},"layer":{"description":"Zone key; null for none","type":["string","null"]},"zone":{"description":"The zone as the website shows it (\"Random zone\" when none was picked); null for a random map","type":["string","null"]},"weather":{"description":"Weather key (clear, overcast, rain, fog, storm), or null for any","type":["string","null"]},"seatsFilled":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Teams in it so far, of three"},"seatsFree":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Seats still open, of three"},"host":{"type":"string","description":"Slug of the team that posted it"},"teams":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"The team’s address on the site (/teams/<slug>): its id here"},"name":{"description":"Team name; null if it is gone","type":["string","null"]},"tag":{"description":"Team tag; null if it is gone","type":["string","null"]}},"required":["slug","name","tag"],"additionalProperties":false,"description":"A team, by slug, name and tag"},"description":"The teams in it so far, the poster first, with names and tags"},"yours":{"type":"boolean","description":"Whether your team is one of the teams in it"},"private":{"type":"boolean","description":"Whether it is an invitation only slot. You only see one you posted or were invited to"},"joinedTeam":{"description":"Slug of the second team; null while that seat is free","type":["string","null"]}},"required":["id","startsAt","region","map","mapName","layer","zone","weather","seatsFilled","seatsFree","host","teams","yours","private","joinedTeam"],"additionalProperties":false},"description":"Open slots, soonest first. Once a third team joins, a slot becomes a match and appears in /team/fixtures instead"}},"required":["slots"],"additionalProperties":false},"example":{"slots":[{"id":"test-slot-01","startsAt":"2027-01-18T19:00:00.000Z","region":"EU","map":"sabatulo","mapName":"Sabatulo","layer":"Default","zone":"Hospital - Default","weather":"fog","seatsFilled":1,"seatsFree":2,"host":"test-team","teams":[{"slug":"test-team","name":"Test Team","tag":"TEST"}],"yours":true,"private":false,"joinedTeam":null},{"id":"test-slot-02","startsAt":"2027-01-21T19:00:00.000Z","region":"EU","map":"europe","mapName":"Ozeti","layer":"Church","zone":"Church","weather":null,"seatsFilled":2,"seatsFree":1,"host":"stub-strikers","teams":[{"slug":"stub-strikers","name":"Stub Strikers","tag":"STUB"},{"slug":"test-team","name":"Test Team","tag":"TEST"}],"yours":true,"private":false,"joinedTeam":"test-team"},{"id":"test-slot-03","startsAt":"2027-01-23T19:00:00.000Z","region":"EU","map":"random","mapName":"Random","layer":null,"zone":null,"weather":null,"seatsFilled":1,"seatsFree":2,"host":"test-team","teams":[{"slug":"test-team","name":"Test Team","tag":"TEST"}],"yours":true,"private":false,"joinedTeam":null},{"id":"test-slot-04","startsAt":"2027-01-24T19:00:00.000Z","region":"EU","map":"kavkazi","mapName":"Bakurani","layer":"Default","zone":"Default","weather":null,"seatsFilled":2,"seatsFree":1,"host":"test-team","teams":[{"slug":"test-team","name":"Test Team","tag":"TEST"},{"slug":"sample-sappers","name":"Sample Sappers","tag":"SMPL"}],"yours":true,"private":false,"joinedTeam":"sample-sappers"},{"id":"test-slot-05","startsAt":"2027-01-25T19:00:00.000Z","region":"EU","map":"north-america","mapName":"Zestafona","layer":"Houses","zone":"Houses","weather":null,"seatsFilled":2,"seatsFree":1,"host":"lorem-lancers","teams":[{"slug":"lorem-lancers","name":"Lorem Lancers","tag":"LORM"},{"slug":"test-team","name":"Test Team","tag":"TEST"}],"yours":true,"private":false,"joinedTeam":"test-team"}]}}}},"304":{"description":"Not modified (If-None-Match)"},"400":{"description":"invalid_request","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"A query parameter or body field is missing, of the wrong type or out of range.","value":{"error":{"code":"invalid_request","message":"Check the query parameters."}}}}}}},"401":{"description":"missing_key, invalid_key, key_revoked, key_expired","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_key":{"summary":"No Authorization header, or not a bearer token.","value":{"error":{"code":"missing_key","message":"Send your key as Authorization: Bearer <key>."}}},"invalid_key":{"summary":"Not a key, a mistyped one, or a key used in the wrong mode.","value":{"error":{"code":"invalid_key","message":"That key is not valid."}}},"key_revoked":{"summary":"The key was revoked, by its team, by league staff or because its team is gone.","value":{"error":{"code":"key_revoked","message":"That key has been revoked."}}},"key_expired":{"summary":"The key passed the expiry chosen when it was made.","value":{"error":{"code":"key_expired","message":"That key has expired."}}}}}}},"403":{"description":"missing_scope, scope_lost, wrong_key_type, team_suspended, key_maker_left, key_maker_no_access","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_scope":{"summary":"The key was made without the scope the route needs. The message names it.","value":{"error":{"code":"missing_scope","message":"This key does not have the team.read scope."}}},"scope_lost":{"summary":"The scope is ticked, but the key’s maker no longer holds the team permission behind it.","value":{"error":{"code":"scope_lost","message":"Whoever made this key no longer has the power behind Team record. Someone who does can rotate it."}}},"wrong_key_type":{"summary":"A personal key on a team route, or a team live key on a public route.","value":{"error":{"code":"wrong_key_type","message":"That needs a team key."}}},"team_suspended":{"summary":"League staff suspended the team. Its keys work again when it is restored.","value":{"error":{"code":"team_suspended","message":"This team is suspended, so its keys are stopped."}}},"key_maker_left":{"summary":"The person who made or last rotated the key left the team. Rotating starts it again.","value":{"error":{"code":"key_maker_left","message":"Whoever made this key is no longer on the team. Someone with access can rotate it."}}},"key_maker_no_access":{"summary":"The person who made or last rotated the key no longer holds Manage API keys. Rotating starts it again.","value":{"error":{"code":"key_maker_no_access","message":"Whoever made this key can no longer manage API keys. Someone with access can rotate it."}}}}}}},"429":{"description":"rate_limited, daily_limit, too_many_bad_keys","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}},"daily_limit":{"summary":"A personal or test key used its requests for the day.","value":{"error":{"code":"daily_limit","message":"This key has used today’s requests."}}},"too_many_bad_keys":{"summary":"Too many wrong keys from one address. Wait for Retry-After.","value":{"error":{"code":"too_many_bad_keys","message":"Too many bad keys from this address."}}}}}}},"500":{"description":"internal_error","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"A fault on the league’s side. Try again later.","value":{"error":{"code":"internal_error","message":"Something went wrong on our side."}}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/slots?scope=open\" \\\n  -H \"Authorization: Bearer $GWL_API_KEY\""},{"lang":"JavaScript","source":"const res = await fetch('https://YOUR-LEAGUE-ADDRESS/api/v1/team/slots?scope=open', {\n  headers: {\n    Authorization: `Bearer ${process.env.GWL_API_KEY}`,\n  },\n})\nif (!res.ok) throw new Error((await res.json()).error.code)\nconst data = await res.json()"},{"lang":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://YOUR-LEAGUE-ADDRESS/api/v1/team/slots?scope=open\",\n    headers={\"Authorization\": f\"Bearer {os.environ['GWL_API_KEY']}\"},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()"}]}},"/standings":{"get":{"operationId":"getStandings","summary":"The league table","tags":["public"],"x-scope":"public.read","security":[{"bearerAuth":[]}],"parameters":[{"name":"period","in":"query","required":false,"description":"season (the Friendly League) or all-time","schema":{"default":"season","description":"season (the Friendly League) or all-time","type":"string","enum":["season","all-time"]}},{"name":"region","in":"query","required":false,"description":"all, or one region code","schema":{"default":"all","description":"all, or one region code","type":"string","enum":["all","EU","NA","SA","ASIA","OCE","MEA"]}},{"name":"limit","in":"query","required":false,"description":"Page size, up to 50","schema":{"default":25,"description":"Page size, up to 50","type":"integer","minimum":1,"maximum":50}},{"name":"page","in":"query","required":false,"description":"Page, up to 10","schema":{"default":1,"description":"Page, up to 10","type":"integer","minimum":1,"maximum":10}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"},"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"rank":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Place in this table"},"team":{"type":"string","description":"The team’s address on the site (/teams/<slug>): its id here"},"name":{"type":"string","description":"Team name"},"tag":{"type":"string","description":"Team tag"},"region":{"type":"string","description":"Competitive region code: EU, NA, SA, ASIA, OCE or MEA"},"played":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Matches played in the period"},"wins":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"1st places in the period"},"placements":{"type":"object","properties":{"first":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Times finished 1st"},"second":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Times finished 2nd"},"third":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Times finished 3rd"}},"required":["first","second","third"],"additionalProperties":false,"description":"How often the team finished 1st, 2nd and 3rd"},"score":{"type":"number","description":"In-game score summed over the period"},"eloRating":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The Elo Rating: one ongoing all-time number, as on every page"},"form":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"description":"Last five finishes, oldest first"},"reputation":{"type":"number","description":"Reputation, 0 to 100"},"mainFaction":{"description":"Faction code the team played most; null when none","type":["string","null"]}},"required":["rank","team","name","tag","region","played","wins","placements","score","eloRating","form","reputation","mainFaction"],"additionalProperties":false},"description":"This page"},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"This page’s number, from 1"},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Page size asked for"},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many there are in all"},"hasMore":{"type":"boolean","description":"Whether there is a next page"}},"required":["items","page","limit","total","hasMore"],"additionalProperties":false},"example":{"items":[{"rank":1,"team":"fixture-falcons","name":"Fixture Falcons","tag":"FIXT","region":"MEA","played":6,"wins":4,"placements":{"first":4,"second":2,"third":0},"score":524,"eloRating":1554,"form":[1,2,1,2,1],"reputation":86,"mainFaction":"lonestar"},{"rank":2,"team":"lorem-lancers","name":"Lorem Lancers","tag":"LORM","region":"NA","played":7,"wins":4,"placements":{"first":4,"second":1,"third":2},"score":545,"eloRating":1546,"form":[3,3,1,1,1],"reputation":68,"mainFaction":"lonestar"},{"rank":3,"team":"placeholder-pioneers","name":"Placeholder Pioneers","tag":"PLCH","region":"OCE","played":8,"wins":2,"placements":{"first":2,"second":2,"third":4},"score":476,"eloRating":1458,"form":[3,3,3,1,3],"reputation":81,"mainFaction":"manticore"}],"page":1,"limit":3,"total":10,"hasMore":true}}}},"304":{"description":"Not modified (If-None-Match)"},"400":{"description":"invalid_request","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"A query parameter or body field is missing, of the wrong type or out of range.","value":{"error":{"code":"invalid_request","message":"Check the query parameters."}}}}}}},"401":{"description":"missing_key, invalid_key, key_revoked, key_expired","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_key":{"summary":"No Authorization header, or not a bearer token.","value":{"error":{"code":"missing_key","message":"Send your key as Authorization: Bearer <key>."}}},"invalid_key":{"summary":"Not a key, a mistyped one, or a key used in the wrong mode.","value":{"error":{"code":"invalid_key","message":"That key is not valid."}}},"key_revoked":{"summary":"The key was revoked, by its team, by league staff or because its team is gone.","value":{"error":{"code":"key_revoked","message":"That key has been revoked."}}},"key_expired":{"summary":"The key passed the expiry chosen when it was made.","value":{"error":{"code":"key_expired","message":"That key has expired."}}}}}}},"403":{"description":"missing_scope, scope_lost, wrong_key_type, team_suspended, key_maker_left, key_maker_no_access","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_scope":{"summary":"The key was made without the scope the route needs. The message names it.","value":{"error":{"code":"missing_scope","message":"This key does not have the team.read scope."}}},"scope_lost":{"summary":"The scope is ticked, but the key’s maker no longer holds the team permission behind it.","value":{"error":{"code":"scope_lost","message":"Whoever made this key no longer has the power behind Team record. Someone who does can rotate it."}}},"wrong_key_type":{"summary":"A personal key on a team route, or a team live key on a public route.","value":{"error":{"code":"wrong_key_type","message":"That needs a team key."}}},"team_suspended":{"summary":"League staff suspended the team. Its keys work again when it is restored.","value":{"error":{"code":"team_suspended","message":"This team is suspended, so its keys are stopped."}}},"key_maker_left":{"summary":"The person who made or last rotated the key left the team. Rotating starts it again.","value":{"error":{"code":"key_maker_left","message":"Whoever made this key is no longer on the team. Someone with access can rotate it."}}},"key_maker_no_access":{"summary":"The person who made or last rotated the key no longer holds Manage API keys. Rotating starts it again.","value":{"error":{"code":"key_maker_no_access","message":"Whoever made this key can no longer manage API keys. Someone with access can rotate it."}}}}}}},"429":{"description":"rate_limited, daily_limit, too_many_bad_keys","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}},"daily_limit":{"summary":"A personal or test key used its requests for the day.","value":{"error":{"code":"daily_limit","message":"This key has used today’s requests."}}},"too_many_bad_keys":{"summary":"Too many wrong keys from one address. Wait for Retry-After.","value":{"error":{"code":"too_many_bad_keys","message":"Too many bad keys from this address."}}}}}}},"500":{"description":"internal_error","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"A fault on the league’s side. Try again later.","value":{"error":{"code":"internal_error","message":"Something went wrong on our side."}}}}}}},"503":{"description":"public_api_off","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"public_api_off":{"summary":"The league switched the public tier off for now. Team routes still work.","value":{"error":{"code":"public_api_off","message":"The public API is switched off."}}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl \"https://YOUR-LEAGUE-ADDRESS/api/v1/standings?period=season&region=all&limit=3\" \\\n  -H \"Authorization: Bearer $GWL_API_KEY\""},{"lang":"JavaScript","source":"const res = await fetch('https://YOUR-LEAGUE-ADDRESS/api/v1/standings?period=season&region=all&limit=3', {\n  headers: {\n    Authorization: `Bearer ${process.env.GWL_API_KEY}`,\n  },\n})\nif (!res.ok) throw new Error((await res.json()).error.code)\nconst data = await res.json()"},{"lang":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://YOUR-LEAGUE-ADDRESS/api/v1/standings?period=season&region=all&limit=3\",\n    headers={\"Authorization\": f\"Bearer {os.environ['GWL_API_KEY']}\"},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()"}]}},"/teams":{"get":{"operationId":"listTeams","summary":"Every active team","tags":["public"],"x-scope":"public.read","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, up to 50","schema":{"default":25,"description":"Page size, up to 50","type":"integer","minimum":1,"maximum":50}},{"name":"page","in":"query","required":false,"description":"Page, up to 10","schema":{"default":1,"description":"Page, up to 10","type":"integer","minimum":1,"maximum":10}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"},"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","description":"The team’s address on the site (/teams/<slug>): its id here"},"name":{"type":"string","description":"Team name"},"tag":{"type":"string","description":"Team tag"},"region":{"type":"string","description":"Competitive region code: EU, NA, SA, ASIA, OCE or MEA"},"flag":{"description":"The team’s primary flag, the one lists show: an ISO country code (GB, DE) or region:<code> for a region flag; null when none is chosen","type":["string","null"]},"flags":{"type":"array","items":{"type":"string"},"description":"The team’s profile flags in order, primary first, up to three: each an ISO country code (GB, DE) or region:<code> for a region flag; empty when none is chosen"},"eloRating":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The Elo Rating: one ongoing all-time number, as on every page"},"reputationScore":{"type":"number","description":"Reputation, 0 to 100"},"safetyBand":{"type":"string","description":"Excellent, Good, Fair or Poor: the band of the Safety part of the reputation score"},"provisional":{"type":"boolean","description":"Too few rated matches for the reputation to settle"},"ratedMatches":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Rated matches, all time"},"seasonMatches":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Matches this season"},"placements":{"type":"object","properties":{"first":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Times finished 1st"},"second":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Times finished 2nd"},"third":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Times finished 3rd"}},"required":["first","second","third"],"additionalProperties":false,"description":"How often the team finished 1st, 2nd and 3rd"},"rosterCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"People on the active roster"},"mainFaction":{"description":"Faction code the team played most; null when none","type":["string","null"]},"openSlots":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Open slots it has posted or joined"},"rank":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Place in the Elo Global Rankings; null when unranked"}},"required":["slug","name","tag","region","flag","flags","eloRating","reputationScore","safetyBand","provisional","ratedMatches","seasonMatches","placements","rosterCount","mainFaction","openSlots","rank"],"additionalProperties":false},"description":"This page"},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"This page’s number, from 1"},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Page size asked for"},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many there are in all"},"hasMore":{"type":"boolean","description":"Whether there is a next page"}},"required":["items","page","limit","total","hasMore"],"additionalProperties":false},"example":{"items":[{"slug":"stub-strikers","name":"Stub Strikers","tag":"STUB","region":"EU","flag":"PL","flags":["PL"],"eloRating":1645,"reputationScore":82,"safetyBand":"Excellent","provisional":false,"ratedMatches":18,"seasonMatches":5,"placements":{"first":10,"second":7,"third":1},"rosterCount":3,"mainFaction":"valkyra","openSlots":0,"rank":1},{"slug":"fixture-falcons","name":"Fixture Falcons","tag":"FIXT","region":"MEA","flag":"ZA","flags":["ZA"],"eloRating":1554,"reputationScore":86,"safetyBand":"Fair","provisional":false,"ratedMatches":10,"seasonMatches":6,"placements":{"first":5,"second":4,"third":1},"rosterCount":3,"mainFaction":"lonestar","openSlots":2,"rank":2}],"page":1,"limit":2,"total":10,"hasMore":true}}}},"304":{"description":"Not modified (If-None-Match)"},"400":{"description":"invalid_request","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"A query parameter or body field is missing, of the wrong type or out of range.","value":{"error":{"code":"invalid_request","message":"Check the query parameters."}}}}}}},"401":{"description":"missing_key, invalid_key, key_revoked, key_expired","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_key":{"summary":"No Authorization header, or not a bearer token.","value":{"error":{"code":"missing_key","message":"Send your key as Authorization: Bearer <key>."}}},"invalid_key":{"summary":"Not a key, a mistyped one, or a key used in the wrong mode.","value":{"error":{"code":"invalid_key","message":"That key is not valid."}}},"key_revoked":{"summary":"The key was revoked, by its team, by league staff or because its team is gone.","value":{"error":{"code":"key_revoked","message":"That key has been revoked."}}},"key_expired":{"summary":"The key passed the expiry chosen when it was made.","value":{"error":{"code":"key_expired","message":"That key has expired."}}}}}}},"403":{"description":"missing_scope, scope_lost, wrong_key_type, team_suspended, key_maker_left, key_maker_no_access","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_scope":{"summary":"The key was made without the scope the route needs. The message names it.","value":{"error":{"code":"missing_scope","message":"This key does not have the team.read scope."}}},"scope_lost":{"summary":"The scope is ticked, but the key’s maker no longer holds the team permission behind it.","value":{"error":{"code":"scope_lost","message":"Whoever made this key no longer has the power behind Team record. Someone who does can rotate it."}}},"wrong_key_type":{"summary":"A personal key on a team route, or a team live key on a public route.","value":{"error":{"code":"wrong_key_type","message":"That needs a team key."}}},"team_suspended":{"summary":"League staff suspended the team. Its keys work again when it is restored.","value":{"error":{"code":"team_suspended","message":"This team is suspended, so its keys are stopped."}}},"key_maker_left":{"summary":"The person who made or last rotated the key left the team. Rotating starts it again.","value":{"error":{"code":"key_maker_left","message":"Whoever made this key is no longer on the team. Someone with access can rotate it."}}},"key_maker_no_access":{"summary":"The person who made or last rotated the key no longer holds Manage API keys. Rotating starts it again.","value":{"error":{"code":"key_maker_no_access","message":"Whoever made this key can no longer manage API keys. Someone with access can rotate it."}}}}}}},"429":{"description":"rate_limited, daily_limit, too_many_bad_keys","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}},"daily_limit":{"summary":"A personal or test key used its requests for the day.","value":{"error":{"code":"daily_limit","message":"This key has used today’s requests."}}},"too_many_bad_keys":{"summary":"Too many wrong keys from one address. Wait for Retry-After.","value":{"error":{"code":"too_many_bad_keys","message":"Too many bad keys from this address."}}}}}}},"500":{"description":"internal_error","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"A fault on the league’s side. Try again later.","value":{"error":{"code":"internal_error","message":"Something went wrong on our side."}}}}}}},"503":{"description":"public_api_off","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"public_api_off":{"summary":"The league switched the public tier off for now. Team routes still work.","value":{"error":{"code":"public_api_off","message":"The public API is switched off."}}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl \"https://YOUR-LEAGUE-ADDRESS/api/v1/teams?limit=2\" \\\n  -H \"Authorization: Bearer $GWL_API_KEY\""},{"lang":"JavaScript","source":"const res = await fetch('https://YOUR-LEAGUE-ADDRESS/api/v1/teams?limit=2', {\n  headers: {\n    Authorization: `Bearer ${process.env.GWL_API_KEY}`,\n  },\n})\nif (!res.ok) throw new Error((await res.json()).error.code)\nconst data = await res.json()"},{"lang":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://YOUR-LEAGUE-ADDRESS/api/v1/teams?limit=2\",\n    headers={\"Authorization\": f\"Bearer {os.environ['GWL_API_KEY']}\"},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()"}]}},"/teams/{slug}":{"get":{"operationId":"getPublicTeam","summary":"One team’s public page","tags":["public"],"x-scope":"public.read","security":[{"bearerAuth":[]}],"parameters":[{"name":"slug","in":"path","required":true,"description":"The team’s address on the site (/teams/<slug>)","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"},"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"type":"object","properties":{"slug":{"type":"string","description":"The team’s address on the site (/teams/<slug>): its id here"},"name":{"type":"string","description":"Team name"},"tag":{"type":"string","description":"Team tag"},"region":{"type":"string","description":"Competitive region code: EU, NA, SA, ASIA, OCE or MEA"},"description":{"type":"string","description":"What the team wrote about itself; may be empty"},"flag":{"description":"The team’s primary flag, the one lists show: an ISO country code (GB, DE) or region:<code> for a region flag; null when none is chosen","type":["string","null"]},"flags":{"type":"array","items":{"type":"string"},"description":"The team’s profile flags in order, primary first, up to three: each an ISO country code (GB, DE) or region:<code> for a region flag; empty when none is chosen"},"eloRating":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The Elo Rating: one ongoing all-time number, as on every page"},"ratedMatches":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Rated matches, all time"},"placements":{"type":"object","properties":{"first":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Times finished 1st"},"second":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Times finished 2nd"},"third":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Times finished 3rd"}},"required":["first","second","third"],"additionalProperties":false,"description":"How often the team finished 1st, 2nd and 3rd"},"reputationScore":{"type":"number","description":"Reputation, 0 to 100"},"safetyBand":{"type":"string","description":"Excellent, Good, Fair or Poor: the band of the Safety part of the reputation score"},"rosterCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"People on the active roster"},"rank":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Place in the league table; null when unranked"},"founders":{"type":"array","items":{"type":"string"},"description":"Names of the Team Leader and Co-founders, Leader first"},"roster":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Display name"},"role":{"type":"string","description":"owner (Team Leader), manager (Team Rep) or player"},"playerId":{"description":"Their player page id (/players/<id>), when they have one","type":"string"},"country":{"description":"ISO 3166-1 alpha-2 country the person chose to show","type":"string"}},"required":["name","role"],"additionalProperties":false},"description":"The public roster"}},"required":["slug","name","tag","region","description","flag","flags","eloRating","ratedMatches","placements","reputationScore","safetyBand","rosterCount","rank","founders","roster"],"additionalProperties":false},"example":{"slug":"test-team","name":"Test Team","tag":"TEST","region":"EU","description":"An invented team for building against the API. Nothing here is real.","flag":"GB","flags":["GB"],"eloRating":1482,"ratedMatches":12,"placements":{"first":2,"second":7,"third":3},"reputationScore":79,"safetyBand":"Excellent","rosterCount":8,"rank":6,"founders":["Ada Example","Bram Sample"],"roster":[{"name":"Ada Example","role":"owner","playerId":"test-player-01","country":"GB"},{"name":"Bram Sample","role":"manager","playerId":"test-player-02","country":"NL"},{"name":"Cleo Placeholder","role":"manager","playerId":"test-player-03","country":"FR"},{"name":"Dmitri Mock","role":"player","playerId":"test-player-04","country":"PL"},{"name":"Eun-ji Testcase","role":"player","playerId":"test-player-05","country":"KR"},{"name":"Femi Dummy","role":"player","playerId":"test-player-06","country":"NG"},{"name":"Gustav Stub","role":"player","playerId":"test-player-07"},{"name":"Hana Fixture","role":"player","playerId":"test-player-08","country":"JP"}]}}}},"304":{"description":"Not modified (If-None-Match)"},"401":{"description":"missing_key, invalid_key, key_revoked, key_expired","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_key":{"summary":"No Authorization header, or not a bearer token.","value":{"error":{"code":"missing_key","message":"Send your key as Authorization: Bearer <key>."}}},"invalid_key":{"summary":"Not a key, a mistyped one, or a key used in the wrong mode.","value":{"error":{"code":"invalid_key","message":"That key is not valid."}}},"key_revoked":{"summary":"The key was revoked, by its team, by league staff or because its team is gone.","value":{"error":{"code":"key_revoked","message":"That key has been revoked."}}},"key_expired":{"summary":"The key passed the expiry chosen when it was made.","value":{"error":{"code":"key_expired","message":"That key has expired."}}}}}}},"403":{"description":"missing_scope, scope_lost, wrong_key_type, team_suspended, key_maker_left, key_maker_no_access","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_scope":{"summary":"The key was made without the scope the route needs. The message names it.","value":{"error":{"code":"missing_scope","message":"This key does not have the team.read scope."}}},"scope_lost":{"summary":"The scope is ticked, but the key’s maker no longer holds the team permission behind it.","value":{"error":{"code":"scope_lost","message":"Whoever made this key no longer has the power behind Team record. Someone who does can rotate it."}}},"wrong_key_type":{"summary":"A personal key on a team route, or a team live key on a public route.","value":{"error":{"code":"wrong_key_type","message":"That needs a team key."}}},"team_suspended":{"summary":"League staff suspended the team. Its keys work again when it is restored.","value":{"error":{"code":"team_suspended","message":"This team is suspended, so its keys are stopped."}}},"key_maker_left":{"summary":"The person who made or last rotated the key left the team. Rotating starts it again.","value":{"error":{"code":"key_maker_left","message":"Whoever made this key is no longer on the team. Someone with access can rotate it."}}},"key_maker_no_access":{"summary":"The person who made or last rotated the key no longer holds Manage API keys. Rotating starts it again.","value":{"error":{"code":"key_maker_no_access","message":"Whoever made this key can no longer manage API keys. Someone with access can rotate it."}}}}}}},"404":{"description":"not_found","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"Nothing at that address, or another team’s match or application (so their existence does not leak).","value":{"error":{"code":"not_found","message":"We could not find that."}}}}}}},"429":{"description":"rate_limited, daily_limit, too_many_bad_keys","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}},"daily_limit":{"summary":"A personal or test key used its requests for the day.","value":{"error":{"code":"daily_limit","message":"This key has used today’s requests."}}},"too_many_bad_keys":{"summary":"Too many wrong keys from one address. Wait for Retry-After.","value":{"error":{"code":"too_many_bad_keys","message":"Too many bad keys from this address."}}}}}}},"500":{"description":"internal_error","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"A fault on the league’s side. Try again later.","value":{"error":{"code":"internal_error","message":"Something went wrong on our side."}}}}}}},"503":{"description":"public_api_off","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"public_api_off":{"summary":"The league switched the public tier off for now. Team routes still work.","value":{"error":{"code":"public_api_off","message":"The public API is switched off."}}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl \"https://YOUR-LEAGUE-ADDRESS/api/v1/teams/test-team\" \\\n  -H \"Authorization: Bearer $GWL_API_KEY\""},{"lang":"JavaScript","source":"const res = await fetch('https://YOUR-LEAGUE-ADDRESS/api/v1/teams/test-team', {\n  headers: {\n    Authorization: `Bearer ${process.env.GWL_API_KEY}`,\n  },\n})\nif (!res.ok) throw new Error((await res.json()).error.code)\nconst data = await res.json()"},{"lang":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://YOUR-LEAGUE-ADDRESS/api/v1/teams/test-team\",\n    headers={\"Authorization\": f\"Bearer {os.environ['GWL_API_KEY']}\"},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()"}]}},"/matches":{"get":{"operationId":"listMatches","summary":"Upcoming matches or results","tags":["public"],"x-scope":"public.read","security":[{"bearerAuth":[]}],"parameters":[{"name":"status","in":"query","required":false,"description":"upcoming, or results (newest first)","schema":{"default":"results","description":"upcoming, or results (newest first)","type":"string","enum":["upcoming","results"]}},{"name":"limit","in":"query","required":false,"description":"Page size, up to 50","schema":{"default":25,"description":"Page size, up to 50","type":"integer","minimum":1,"maximum":50}},{"name":"page","in":"query","required":false,"description":"Page, up to 10","schema":{"default":1,"description":"Page, up to 10","type":"integer","minimum":1,"maximum":10}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"},"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"number":{"type":"string","description":"The match number, as on the website"},"status":{"type":"string","description":"scheduled (locked, not played), reported (played, nothing counts yet: no result, or one that waits to be confirmed), confirmed (the result counts) or disputed (a team disputed it: nothing counts until league staff settle it). A result read from the game is confirmed as soon as the league reads it, and can still become disputed until disputeUntil"},"rated":{"type":"boolean","description":"Whether the result is moving Elo now. False again while the match is disputed"},"region":{"type":"string","description":"Competitive region code: EU, NA, SA, ASIA, OCE or MEA"},"map":{"type":"string","description":"Map id, the game’s own: kavkazi, europe, north-america or sabatulo"},"mapName":{"type":"string","description":"The map’s name as the website shows it, for example Zestafona for north-america"},"layer":{"description":"Zone key as stored on the match; null for Random or none","type":["string","null"]},"zone":{"description":"The zone as the website shows it. \"Random zone\" when no zone was picked or rolled; null only when the map itself is Random","type":["string","null"]},"weather":{"description":"Weather key (clear, overcast, rain, fog, storm), or null for any","type":["string","null"]},"season":{"description":"Name of the season the match belongs to; null when none was running","type":["string","null"]},"startsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it starts. UTC, ISO 8601"},"concludedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the result that counts was confirmed: set with status confirmed, null otherwise (and again while disputed). It moves when league staff settle a dispute. UTC, ISO 8601"},"disputeUntil":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"Set while the result already counts and a team can still dispute it: the end of that window. Null otherwise. UTC, ISO 8601"},"durationSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How long it was played, in seconds; null when unknown"},"host":{"description":"Team slug of the host; null when no team hosts (a GWL official server, or the host team is gone)","type":["string","null"]},"sides":{"type":"array","items":{"type":"object","properties":{"team":{"type":"object","properties":{"slug":{"type":"string","description":"The team’s address on the site (/teams/<slug>): its id here"},"name":{"description":"Team name; null if it is gone","type":["string","null"]},"tag":{"description":"Team tag; null if it is gone","type":["string","null"]}},"required":["slug","name","tag"],"additionalProperties":false,"description":"A team, by slug, name and tag"},"faction":{"description":"Faction code once a moderator assigns one, else null","type":["string","null"]},"score":{"description":"The side’s in-game score, 0 to 100; null before a result","type":["number","null"]},"placement":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"1, 2 or 3; null before a result"},"points":{"description":"Placement points for the match: 5 for 1st, 3 for 2nd, 1 for 3rd. They count only while the status is confirmed","type":["number","null"]},"eloDelta":{"description":"Elo change from this match as it counts now; null while it is not rated, a disputed match included","type":["number","null"]}},"required":["team","faction","score","placement","points","eloDelta"],"additionalProperties":false,"description":"One of the three teams in a match"},"description":"The three teams, host first"}},"required":["number","status","rated","region","map","mapName","layer","zone","weather","season","startsAt","concludedAt","disputeUntil","durationSeconds","host","sides"],"additionalProperties":false,"description":"A match"},"description":"This page"},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"This page’s number, from 1"},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Page size asked for"},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many there are in all"},"hasMore":{"type":"boolean","description":"Whether there is a next page"}},"required":["items","page","limit","total","hasMore"],"additionalProperties":false},"example":{"items":[{"number":"9090","status":"confirmed","rated":true,"region":"EU","map":"kavkazi","mapName":"Bakurani","layer":"Default","zone":"Default","weather":null,"season":"Sandbox Season","startsAt":"2027-01-13T19:00:00.000Z","concludedAt":"2027-01-13T21:57:00.000Z","disputeUntil":"2027-01-15T21:57:00.000Z","durationSeconds":3420,"host":"example-eagles","sides":[{"team":{"slug":"example-eagles","name":"Example Eagles","tag":"EXEG"},"faction":"lonestar","score":100,"placement":1,"points":5,"eloDelta":15},{"team":{"slug":"mock-mortars","name":"Mock Mortars","tag":"MOCK"},"faction":"valkyra","score":72,"placement":2,"points":3,"eloDelta":6},{"team":{"slug":"stub-strikers","name":"Stub Strikers","tag":"STUB"},"faction":"manticore","score":41,"placement":3,"points":1,"eloDelta":-17}]},{"number":"9089","status":"confirmed","rated":true,"region":"EU","map":"europe","mapName":"Ozeti","layer":"Default","zone":"Default","weather":null,"season":"Sandbox Season","startsAt":"2027-01-12T07:00:00.000Z","concludedAt":"2027-01-12T09:58:30.000Z","disputeUntil":null,"durationSeconds":3510,"host":"sample-sappers","sides":[{"team":{"slug":"sample-sappers","name":"Sample Sappers","tag":"SMPL"},"faction":"lonestar","score":100,"placement":1,"points":5,"eloDelta":14},{"team":{"slug":"placeholder-pioneers","name":"Placeholder Pioneers","tag":"PLCH"},"faction":"valkyra","score":61,"placement":2,"points":3,"eloDelta":0},{"team":{"slug":"fixture-falcons","name":"Fixture Falcons","tag":"FIXT"},"faction":"manticore","score":29,"placement":3,"points":1,"eloDelta":-16}]}],"page":1,"limit":2,"total":11,"hasMore":true}}}},"304":{"description":"Not modified (If-None-Match)"},"400":{"description":"invalid_request","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"A query parameter or body field is missing, of the wrong type or out of range.","value":{"error":{"code":"invalid_request","message":"Check the query parameters."}}}}}}},"401":{"description":"missing_key, invalid_key, key_revoked, key_expired","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_key":{"summary":"No Authorization header, or not a bearer token.","value":{"error":{"code":"missing_key","message":"Send your key as Authorization: Bearer <key>."}}},"invalid_key":{"summary":"Not a key, a mistyped one, or a key used in the wrong mode.","value":{"error":{"code":"invalid_key","message":"That key is not valid."}}},"key_revoked":{"summary":"The key was revoked, by its team, by league staff or because its team is gone.","value":{"error":{"code":"key_revoked","message":"That key has been revoked."}}},"key_expired":{"summary":"The key passed the expiry chosen when it was made.","value":{"error":{"code":"key_expired","message":"That key has expired."}}}}}}},"403":{"description":"missing_scope, scope_lost, wrong_key_type, team_suspended, key_maker_left, key_maker_no_access","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_scope":{"summary":"The key was made without the scope the route needs. The message names it.","value":{"error":{"code":"missing_scope","message":"This key does not have the team.read scope."}}},"scope_lost":{"summary":"The scope is ticked, but the key’s maker no longer holds the team permission behind it.","value":{"error":{"code":"scope_lost","message":"Whoever made this key no longer has the power behind Team record. Someone who does can rotate it."}}},"wrong_key_type":{"summary":"A personal key on a team route, or a team live key on a public route.","value":{"error":{"code":"wrong_key_type","message":"That needs a team key."}}},"team_suspended":{"summary":"League staff suspended the team. Its keys work again when it is restored.","value":{"error":{"code":"team_suspended","message":"This team is suspended, so its keys are stopped."}}},"key_maker_left":{"summary":"The person who made or last rotated the key left the team. Rotating starts it again.","value":{"error":{"code":"key_maker_left","message":"Whoever made this key is no longer on the team. Someone with access can rotate it."}}},"key_maker_no_access":{"summary":"The person who made or last rotated the key no longer holds Manage API keys. Rotating starts it again.","value":{"error":{"code":"key_maker_no_access","message":"Whoever made this key can no longer manage API keys. Someone with access can rotate it."}}}}}}},"429":{"description":"rate_limited, daily_limit, too_many_bad_keys","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}},"daily_limit":{"summary":"A personal or test key used its requests for the day.","value":{"error":{"code":"daily_limit","message":"This key has used today’s requests."}}},"too_many_bad_keys":{"summary":"Too many wrong keys from one address. Wait for Retry-After.","value":{"error":{"code":"too_many_bad_keys","message":"Too many bad keys from this address."}}}}}}},"500":{"description":"internal_error","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"A fault on the league’s side. Try again later.","value":{"error":{"code":"internal_error","message":"Something went wrong on our side."}}}}}}},"503":{"description":"public_api_off","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"public_api_off":{"summary":"The league switched the public tier off for now. Team routes still work.","value":{"error":{"code":"public_api_off","message":"The public API is switched off."}}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl \"https://YOUR-LEAGUE-ADDRESS/api/v1/matches?status=results&limit=2\" \\\n  -H \"Authorization: Bearer $GWL_API_KEY\""},{"lang":"JavaScript","source":"const res = await fetch('https://YOUR-LEAGUE-ADDRESS/api/v1/matches?status=results&limit=2', {\n  headers: {\n    Authorization: `Bearer ${process.env.GWL_API_KEY}`,\n  },\n})\nif (!res.ok) throw new Error((await res.json()).error.code)\nconst data = await res.json()"},{"lang":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://YOUR-LEAGUE-ADDRESS/api/v1/matches?status=results&limit=2\",\n    headers={\"Authorization\": f\"Bearer {os.environ['GWL_API_KEY']}\"},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()"}]}},"/matches/{number}":{"get":{"operationId":"getPublicMatch","summary":"One match, with its player stats","description":"A league match as the public match page shows it. 404 for a match that is not listed there, such as a cancelled one.","tags":["public"],"x-scope":"public.read","security":[{"bearerAuth":[]}],"parameters":[{"name":"number","in":"path","required":true,"description":"The match number, as on the website","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"},"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"type":"object","properties":{"number":{"type":"string","description":"The match number, as on the website"},"status":{"type":"string","description":"scheduled (locked, not played), reported (played, nothing counts yet: no result, or one that waits to be confirmed), confirmed (the result counts) or disputed (a team disputed it: nothing counts until league staff settle it). A result read from the game is confirmed as soon as the league reads it, and can still become disputed until disputeUntil"},"rated":{"type":"boolean","description":"Whether the result is moving Elo now. False again while the match is disputed"},"region":{"type":"string","description":"Competitive region code: EU, NA, SA, ASIA, OCE or MEA"},"map":{"type":"string","description":"Map id, the game’s own: kavkazi, europe, north-america or sabatulo"},"mapName":{"type":"string","description":"The map’s name as the website shows it, for example Zestafona for north-america"},"layer":{"description":"Zone key as stored on the match; null for Random or none","type":["string","null"]},"zone":{"description":"The zone as the website shows it. \"Random zone\" when no zone was picked or rolled; null only when the map itself is Random","type":["string","null"]},"weather":{"description":"Weather key (clear, overcast, rain, fog, storm), or null for any","type":["string","null"]},"season":{"description":"Name of the season the match belongs to; null when none was running","type":["string","null"]},"startsAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When it starts. UTC, ISO 8601"},"concludedAt":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"When the result that counts was confirmed: set with status confirmed, null otherwise (and again while disputed). It moves when league staff settle a dispute. UTC, ISO 8601"},"disputeUntil":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"},{"type":"null"}],"description":"Set while the result already counts and a team can still dispute it: the end of that window. Null otherwise. UTC, ISO 8601"},"durationSeconds":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"How long it was played, in seconds; null when unknown"},"host":{"description":"Team slug of the host; null when no team hosts (a GWL official server, or the host team is gone)","type":["string","null"]},"sides":{"type":"array","items":{"type":"object","properties":{"team":{"type":"object","properties":{"slug":{"type":"string","description":"The team’s address on the site (/teams/<slug>): its id here"},"name":{"description":"Team name; null if it is gone","type":["string","null"]},"tag":{"description":"Team tag; null if it is gone","type":["string","null"]}},"required":["slug","name","tag"],"additionalProperties":false,"description":"A team, by slug, name and tag"},"faction":{"description":"Faction code once a moderator assigns one, else null","type":["string","null"]},"score":{"description":"The side’s in-game score, 0 to 100; null before a result","type":["number","null"]},"placement":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"1, 2 or 3; null before a result"},"points":{"description":"Placement points for the match: 5 for 1st, 3 for 2nd, 1 for 3rd. They count only while the status is confirmed","type":["number","null"]},"eloDelta":{"description":"Elo change from this match as it counts now; null while it is not rated, a disputed match included","type":["number","null"]}},"required":["team","faction","score","placement","points","eloDelta"],"additionalProperties":false,"description":"One of the three teams in a match"},"description":"The three teams, host first"},"playerStats":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Their name in the game, as the match page shows it"},"team":{"type":"object","properties":{"slug":{"type":"string","description":"The team’s address on the site (/teams/<slug>): its id here"},"name":{"description":"Team name; null if it is gone","type":["string","null"]},"tag":{"description":"Team tag; null if it is gone","type":["string","null"]}},"required":["slug","name","tag"],"additionalProperties":false,"description":"The team they played for in this match"},"kills":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Kills"},"deaths":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Deaths"},"headshots":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Headshot kills; null when the match file does not say"}},"required":["name","team","kills","deaths","headshots"],"additionalProperties":false},"description":"Each team’s players, in the order of sides, most kills first. There as soon as the league has built the match file from its game server; empty before that, and for a match with no file or called off. The same privacy rules as the public match page: nobody who hid their stats, team kills and suicides never counted as kills, and never a Steam or Discord ID"}},"required":["number","status","rated","region","map","mapName","layer","zone","weather","season","startsAt","concludedAt","disputeUntil","durationSeconds","host","sides","playerStats"],"additionalProperties":false,"description":"A match, with its player stats"},"example":{"number":"9103","status":"confirmed","rated":true,"region":"EU","map":"north-america","mapName":"Zestafona","layer":"Houses","zone":"Houses","weather":"rain","season":"Sandbox Season","startsAt":"2027-01-11T19:00:00.000Z","concludedAt":"2027-01-11T21:59:00.000Z","disputeUntil":null,"durationSeconds":3540,"host":"test-team","sides":[{"team":{"slug":"test-team","name":"Test Team","tag":"TEST"},"faction":"lonestar","score":65,"placement":2,"points":3,"eloDelta":0},{"team":{"slug":"dummy-dragoons","name":"Dummy Dragoons","tag":"DUMY"},"faction":"valkyra","score":100,"placement":1,"points":5,"eloDelta":18},{"team":{"slug":"fixture-falcons","name":"Fixture Falcons","tag":"FIXT"},"faction":"manticore","score":34,"placement":3,"points":1,"eloDelta":-16}],"playerStats":[{"name":"Sandbox Four","team":{"slug":"test-team","name":"Test Team","tag":"TEST"},"kills":1,"deaths":1,"headshots":0},{"name":"Sandbox Two","team":{"slug":"test-team","name":"Test Team","tag":"TEST"},"kills":1,"deaths":2,"headshots":0},{"name":"Sandbox One","team":{"slug":"dummy-dragoons","name":"Dummy Dragoons","tag":"DUMY"},"kills":2,"deaths":1,"headshots":1},{"name":"Sandbox Three","team":{"slug":"fixture-falcons","name":"Fixture Falcons","tag":"FIXT"},"kills":1,"deaths":1,"headshots":0}]}}}},"304":{"description":"Not modified (If-None-Match)"},"401":{"description":"missing_key, invalid_key, key_revoked, key_expired","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_key":{"summary":"No Authorization header, or not a bearer token.","value":{"error":{"code":"missing_key","message":"Send your key as Authorization: Bearer <key>."}}},"invalid_key":{"summary":"Not a key, a mistyped one, or a key used in the wrong mode.","value":{"error":{"code":"invalid_key","message":"That key is not valid."}}},"key_revoked":{"summary":"The key was revoked, by its team, by league staff or because its team is gone.","value":{"error":{"code":"key_revoked","message":"That key has been revoked."}}},"key_expired":{"summary":"The key passed the expiry chosen when it was made.","value":{"error":{"code":"key_expired","message":"That key has expired."}}}}}}},"403":{"description":"missing_scope, scope_lost, wrong_key_type, team_suspended, key_maker_left, key_maker_no_access","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_scope":{"summary":"The key was made without the scope the route needs. The message names it.","value":{"error":{"code":"missing_scope","message":"This key does not have the team.read scope."}}},"scope_lost":{"summary":"The scope is ticked, but the key’s maker no longer holds the team permission behind it.","value":{"error":{"code":"scope_lost","message":"Whoever made this key no longer has the power behind Team record. Someone who does can rotate it."}}},"wrong_key_type":{"summary":"A personal key on a team route, or a team live key on a public route.","value":{"error":{"code":"wrong_key_type","message":"That needs a team key."}}},"team_suspended":{"summary":"League staff suspended the team. Its keys work again when it is restored.","value":{"error":{"code":"team_suspended","message":"This team is suspended, so its keys are stopped."}}},"key_maker_left":{"summary":"The person who made or last rotated the key left the team. Rotating starts it again.","value":{"error":{"code":"key_maker_left","message":"Whoever made this key is no longer on the team. Someone with access can rotate it."}}},"key_maker_no_access":{"summary":"The person who made or last rotated the key no longer holds Manage API keys. Rotating starts it again.","value":{"error":{"code":"key_maker_no_access","message":"Whoever made this key can no longer manage API keys. Someone with access can rotate it."}}}}}}},"404":{"description":"not_found","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"Nothing at that address, or another team’s match or application (so their existence does not leak).","value":{"error":{"code":"not_found","message":"We could not find that."}}}}}}},"429":{"description":"rate_limited, daily_limit, too_many_bad_keys","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}},"daily_limit":{"summary":"A personal or test key used its requests for the day.","value":{"error":{"code":"daily_limit","message":"This key has used today’s requests."}}},"too_many_bad_keys":{"summary":"Too many wrong keys from one address. Wait for Retry-After.","value":{"error":{"code":"too_many_bad_keys","message":"Too many bad keys from this address."}}}}}}},"500":{"description":"internal_error","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"A fault on the league’s side. Try again later.","value":{"error":{"code":"internal_error","message":"Something went wrong on our side."}}}}}}},"503":{"description":"public_api_off","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"public_api_off":{"summary":"The league switched the public tier off for now. Team routes still work.","value":{"error":{"code":"public_api_off","message":"The public API is switched off."}}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl \"https://YOUR-LEAGUE-ADDRESS/api/v1/matches/9103\" \\\n  -H \"Authorization: Bearer $GWL_API_KEY\""},{"lang":"JavaScript","source":"const res = await fetch('https://YOUR-LEAGUE-ADDRESS/api/v1/matches/9103', {\n  headers: {\n    Authorization: `Bearer ${process.env.GWL_API_KEY}`,\n  },\n})\nif (!res.ok) throw new Error((await res.json()).error.code)\nconst data = await res.json()"},{"lang":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://YOUR-LEAGUE-ADDRESS/api/v1/matches/9103\",\n    headers={\"Authorization\": f\"Bearer {os.environ['GWL_API_KEY']}\"},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()"}]}},"/players/leaderboard":{"get":{"operationId":"getLeaderboard","summary":"Players by Elo Rating","description":"Players on a team. A player on no team is not listed.","tags":["public"],"x-scope":"public.read","security":[{"bearerAuth":[]}],"parameters":[{"name":"limit","in":"query","required":false,"description":"Page size, up to 50","schema":{"default":25,"description":"Page size, up to 50","type":"integer","minimum":1,"maximum":50}},{"name":"page","in":"query","required":false,"description":"Page, up to 10","schema":{"default":1,"description":"Page, up to 10","type":"integer","minimum":1,"maximum":10}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"},"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"rank":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}],"description":"Place by player Elo Rating (not the website’s leaderboard by kills); null before a rated match. The league does not rate players, so expect null"},"playerId":{"type":"string","description":"Player page id (/players/<id>)"},"name":{"type":"string","description":"Display name"},"team":{"type":"object","properties":{"slug":{"type":"string","description":"The team’s address on the site (/teams/<slug>): its id here"},"name":{"type":"string","description":"Team name"},"tag":{"type":"string","description":"Team tag"}},"required":["slug","name","tag"],"additionalProperties":false,"description":"Their team"},"region":{"type":"string","description":"Competitive region code: EU, NA, SA, ASIA, OCE or MEA"},"eloRating":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The player’s Elo Rating. The league does not rate players, so expect the starting 1500"},"matches":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Rated matches played in player Elo"},"wins":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"1st places"},"winRate":{"description":"Wins divided by matches, 0 to 1; null before a match","type":["number","null"]},"country":{"description":"ISO 3166-1 alpha-2 country the person chose to show","type":"string"}},"required":["rank","playerId","name","team","region","eloRating","matches","wins","winRate"],"additionalProperties":false},"description":"This page"},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"This page’s number, from 1"},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Page size asked for"},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How many there are in all"},"hasMore":{"type":"boolean","description":"Whether there is a next page"}},"required":["items","page","limit","total","hasMore"],"additionalProperties":false},"example":{"items":[{"rank":1,"playerId":"test-player-53","name":"Bea Sapper","team":{"slug":"sample-sappers","name":"Sample Sappers","tag":"SMPL"},"region":"EU","eloRating":1708,"matches":28,"wins":9,"winRate":0.321,"country":"DE"},{"rank":2,"playerId":"test-player-58","name":"Bea Mortar","team":{"slug":"mock-mortars","name":"Mock Mortars","tag":"MOCK"},"region":"ASIA","eloRating":1695,"matches":17,"wins":9,"winRate":0.529},{"rank":3,"playerId":"test-player-64","name":"Dana Dragoon","team":{"slug":"dummy-dragoons","name":"Dummy Dragoons","tag":"DUMY"},"region":"SA","eloRating":1682,"matches":3,"wins":1,"winRate":0.333}],"page":1,"limit":3,"total":34,"hasMore":true}}}},"304":{"description":"Not modified (If-None-Match)"},"400":{"description":"invalid_request","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"invalid_request":{"summary":"A query parameter or body field is missing, of the wrong type or out of range.","value":{"error":{"code":"invalid_request","message":"Check the query parameters."}}}}}}},"401":{"description":"missing_key, invalid_key, key_revoked, key_expired","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_key":{"summary":"No Authorization header, or not a bearer token.","value":{"error":{"code":"missing_key","message":"Send your key as Authorization: Bearer <key>."}}},"invalid_key":{"summary":"Not a key, a mistyped one, or a key used in the wrong mode.","value":{"error":{"code":"invalid_key","message":"That key is not valid."}}},"key_revoked":{"summary":"The key was revoked, by its team, by league staff or because its team is gone.","value":{"error":{"code":"key_revoked","message":"That key has been revoked."}}},"key_expired":{"summary":"The key passed the expiry chosen when it was made.","value":{"error":{"code":"key_expired","message":"That key has expired."}}}}}}},"403":{"description":"missing_scope, scope_lost, wrong_key_type, team_suspended, key_maker_left, key_maker_no_access","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"missing_scope":{"summary":"The key was made without the scope the route needs. The message names it.","value":{"error":{"code":"missing_scope","message":"This key does not have the team.read scope."}}},"scope_lost":{"summary":"The scope is ticked, but the key’s maker no longer holds the team permission behind it.","value":{"error":{"code":"scope_lost","message":"Whoever made this key no longer has the power behind Team record. Someone who does can rotate it."}}},"wrong_key_type":{"summary":"A personal key on a team route, or a team live key on a public route.","value":{"error":{"code":"wrong_key_type","message":"That needs a team key."}}},"team_suspended":{"summary":"League staff suspended the team. Its keys work again when it is restored.","value":{"error":{"code":"team_suspended","message":"This team is suspended, so its keys are stopped."}}},"key_maker_left":{"summary":"The person who made or last rotated the key left the team. Rotating starts it again.","value":{"error":{"code":"key_maker_left","message":"Whoever made this key is no longer on the team. Someone with access can rotate it."}}},"key_maker_no_access":{"summary":"The person who made or last rotated the key no longer holds Manage API keys. Rotating starts it again.","value":{"error":{"code":"key_maker_no_access","message":"Whoever made this key can no longer manage API keys. Someone with access can rotate it."}}}}}}},"429":{"description":"rate_limited, daily_limit, too_many_bad_keys","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}},"daily_limit":{"summary":"A personal or test key used its requests for the day.","value":{"error":{"code":"daily_limit","message":"This key has used today’s requests."}}},"too_many_bad_keys":{"summary":"Too many wrong keys from one address. Wait for Retry-After.","value":{"error":{"code":"too_many_bad_keys","message":"Too many bad keys from this address."}}}}}}},"500":{"description":"internal_error","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"A fault on the league’s side. Try again later.","value":{"error":{"code":"internal_error","message":"Something went wrong on our side."}}}}}}},"503":{"description":"public_api_off","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"public_api_off":{"summary":"The league switched the public tier off for now. Team routes still work.","value":{"error":{"code":"public_api_off","message":"The public API is switched off."}}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl \"https://YOUR-LEAGUE-ADDRESS/api/v1/players/leaderboard?limit=3\" \\\n  -H \"Authorization: Bearer $GWL_API_KEY\""},{"lang":"JavaScript","source":"const res = await fetch('https://YOUR-LEAGUE-ADDRESS/api/v1/players/leaderboard?limit=3', {\n  headers: {\n    Authorization: `Bearer ${process.env.GWL_API_KEY}`,\n  },\n})\nif (!res.ok) throw new Error((await res.json()).error.code)\nconst data = await res.json()"},{"lang":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://YOUR-LEAGUE-ADDRESS/api/v1/players/leaderboard?limit=3\",\n    headers={\"Authorization\": f\"Bearer {os.environ['GWL_API_KEY']}\"},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()"}]}},"/test/scenarios":{"get":{"operationId":"listScenarios","summary":"The sandbox’s scenarios and forced errors","description":"Test keys only; a live key gets 404. Pass a scenario as ?scenario=<name> on any read, and ?force_error=<code> to get that error.","tags":["test"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"},"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"type":"object","properties":{"scenarios":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Pass it as ?scenario=<name>"},"description":{"type":"string","description":"What the sandbox answers in it"}},"required":["name","description"],"additionalProperties":false},"description":"Every scenario"},"forceErrors":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string","description":"Pass it as ?force_error=<code>"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The HTTP status it answers with"}},"required":["code","status"],"additionalProperties":false},"description":"Every error code force_error can produce"}},"required":["scenarios","forceErrors"],"additionalProperties":false},"example":{"scenarios":[{"name":"default","description":"Test Team with 8 members, 2 upcoming and 3 recent matches, 2 applications and 2 open slots. Used when no scenario is given."},{"name":"empty-team","description":"A team made today: only its Team Leader, no matches, applications, slots or Elo history, and no rank."},{"name":"busy-week","description":"A busy week: 7 upcoming and 4 recent matches (one disputed), 6 applications and 5 open slots."},{"name":"full-roster","description":"The default team with a full roster of 32."},{"name":"errors","description":"Every call answers an error: the one named by force_error, or internal_error without it."}],"forceErrors":[{"code":"invalid_request","status":400},{"code":"invalid_json","status":400},{"code":"missing_key","status":401},{"code":"invalid_key","status":401},{"code":"key_revoked","status":401},{"code":"key_expired","status":401},{"code":"missing_scope","status":403},{"code":"scope_lost","status":403},{"code":"wrong_key_type","status":403},{"code":"team_suspended","status":403},{"code":"key_maker_left","status":403},{"code":"key_maker_no_access","status":403},{"code":"not_found","status":404},{"code":"method_not_allowed","status":405},{"code":"invalid_id","status":400},{"code":"already_on_roster","status":409},{"code":"on_other_team","status":409},{"code":"roster_write_limit","status":429},{"code":"player_not_found","status":404},{"code":"leader_cannot_be_removed","status":409},{"code":"rep_cannot_be_removed_by_api","status":409},{"code":"role_above_you","status":403},{"code":"cannot_remove","status":409},{"code":"application_closed","status":409},{"code":"already_member","status":409},{"code":"already_on_team","status":409},{"code":"steam_required","status":409},{"code":"league_suspended","status":409},{"code":"leads_suspended_team","status":409},{"code":"roster_conflict","status":409},{"code":"body_too_large","status":413},{"code":"unsupported_media_type","status":415},{"code":"rate_limited","status":429},{"code":"daily_limit","status":429},{"code":"too_many_bad_keys","status":429},{"code":"internal_error","status":500},{"code":"public_api_off","status":503}]}}}},"304":{"description":"Not modified (If-None-Match)"},"404":{"description":"not_found","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"Nothing at that address, or another team’s match or application (so their existence does not leak).","value":{"error":{"code":"not_found","message":"We could not find that."}}}}}}},"429":{"description":"rate_limited, daily_limit, too_many_bad_keys","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}},"daily_limit":{"summary":"A personal or test key used its requests for the day.","value":{"error":{"code":"daily_limit","message":"This key has used today’s requests."}}},"too_many_bad_keys":{"summary":"Too many wrong keys from one address. Wait for Retry-After.","value":{"error":{"code":"too_many_bad_keys","message":"Too many bad keys from this address."}}}}}}},"500":{"description":"internal_error","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"A fault on the league’s side. Try again later.","value":{"error":{"code":"internal_error","message":"Something went wrong on our side."}}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl \"https://YOUR-LEAGUE-ADDRESS/api/v1/test/scenarios\" \\\n  -H \"Authorization: Bearer $GWL_API_KEY\""},{"lang":"JavaScript","source":"const res = await fetch('https://YOUR-LEAGUE-ADDRESS/api/v1/test/scenarios', {\n  headers: {\n    Authorization: `Bearer ${process.env.GWL_API_KEY}`,\n  },\n})\nif (!res.ok) throw new Error((await res.json()).error.code)\nconst data = await res.json()"},{"lang":"Python","source":"import os\nimport requests\n\nres = requests.get(\n    \"https://YOUR-LEAGUE-ADDRESS/api/v1/test/scenarios\",\n    headers={\"Authorization\": f\"Bearer {os.environ['GWL_API_KEY']}\"},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()"}]}},"/test/reset":{"post":{"operationId":"resetSandbox","summary":"Forget this test key’s answers to applications","description":"Test keys only; a live key gets 404. The sandbox also forgets them by itself 10 minutes after the first answer.","tags":["test"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/RateLimitLimit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/RateLimitRemaining"},"X-RateLimit-Reset":{"$ref":"#/components/headers/RateLimitReset"},"ETag":{"$ref":"#/components/headers/ETag"},"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"type":"object","properties":{"reset":{"type":"boolean","description":"Always true"}},"required":["reset"],"additionalProperties":false},"example":{"reset":true}}}},"404":{"description":"not_found","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"not_found":{"summary":"Nothing at that address, or another team’s match or application (so their existence does not leak).","value":{"error":{"code":"not_found","message":"We could not find that."}}}}}}},"429":{"description":"rate_limited, daily_limit, too_many_bad_keys","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}},"daily_limit":{"summary":"A personal or test key used its requests for the day.","value":{"error":{"code":"daily_limit","message":"This key has used today’s requests."}}},"too_many_bad_keys":{"summary":"Too many wrong keys from one address. Wait for Retry-After.","value":{"error":{"code":"too_many_bad_keys","message":"Too many bad keys from this address."}}}}}}},"500":{"description":"internal_error","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"internal_error":{"summary":"A fault on the league’s side. Try again later.","value":{"error":{"code":"internal_error","message":"Something went wrong on our side."}}}}}}}},"x-codeSamples":[{"lang":"curl","source":"curl -X POST \"https://YOUR-LEAGUE-ADDRESS/api/v1/test/reset\" \\\n  -H \"Authorization: Bearer $GWL_API_KEY\""},{"lang":"JavaScript","source":"const res = await fetch('https://YOUR-LEAGUE-ADDRESS/api/v1/test/reset', {\n  method: 'POST',\n  headers: {\n    Authorization: `Bearer ${process.env.GWL_API_KEY}`,\n  },\n})\nif (!res.ok) throw new Error((await res.json()).error.code)\nconst data = await res.json()"},{"lang":"Python","source":"import os\nimport requests\n\nres = requests.post(\n    \"https://YOUR-LEAGUE-ADDRESS/api/v1/test/reset\",\n    headers={\"Authorization\": f\"Bearer {os.environ['GWL_API_KEY']}\"},\n    timeout=10,\n)\nres.raise_for_status()\ndata = res.json()"}]}},"/openapi.json":{"get":{"operationId":"getOpenApi","summary":"This document","tags":["document"],"security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"rate_limited","headers":{"X-GWL-Mode":{"$ref":"#/components/headers/Mode"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"examples":{"rate_limited":{"summary":"Over the per-minute limit for the key or the address. Wait for Retry-After.","value":{"error":{"code":"rate_limited","message":"Too many requests for this key."}}}}}}}}}}}}