{
  "openapi": "3.1.0",
  "info": {
    "title": "Krunker API",
    "version": "0.1.4",
    "summary": "The Krunker.io developer API, the game's public endpoints and the token bound ones, as krapio wraps them",
    "description": "Generated from the krapio source and docs. The developer API is the official one from FRVR and needs an API key; the game and token tiers are the endpoints the game itself reads, documented from observation. Full docs: https://github.com/NullDev/krapio",
    "license": {
      "name": "MIT",
      "identifier": "MIT"
    }
  },
  "servers": [
    {
      "url": "https://gapi.svc.krunker.io",
      "description": "developer API and most game endpoints"
    },
    {
      "url": "https://api.krunker.io",
      "description": "the old rest api and the ranked api"
    },
    {
      "url": "https://matchmaker.krunker.io",
      "description": "the lobby list"
    }
  ],
  "tags": [
    {
      "name": "developer/player",
      "x-displayName": "Player Endpoints",
      "description": "GET /api/player/*: profile, inventory, listings, ranked matches and posts of a player"
    },
    {
      "name": "developer/match",
      "x-displayName": "Match Endpoints",
      "description": "GET /api/match/*: one ranked match with its participants"
    },
    {
      "name": "developer/clan",
      "x-displayName": "Clan Endpoints",
      "description": "GET /api/clan/*: a clan's profile and members"
    },
    {
      "name": "developer/leaderboard",
      "x-displayName": "Leaderboard Endpoints",
      "description": "GET /api/leaderboard/*: the ranked leaderboard per region"
    },
    {
      "name": "developer/map",
      "x-displayName": "Map Endpoints",
      "description": "GET /api/map/* and /api/maps/*: map details, featured maps and map leaderboards"
    },
    {
      "name": "developer/mods",
      "x-displayName": "Mod Endpoints",
      "description": "GET /api/mods/*: the mod list and single mods"
    },
    {
      "name": "developer/market",
      "x-displayName": "Market Endpoints",
      "description": "GET /api/market/*: listings, owners and price history per skin"
    },
    {
      "name": "developer/skins",
      "x-displayName": "Skin Definitions",
      "description": "GET /api/skins/*: the skin definitions"
    },
    {
      "name": "developer/kpd",
      "x-displayName": "KPD Endpoints",
      "description": "player hacker reports; needs the `kpd` scope on the key"
    },
    {
      "name": "developer/events",
      "x-displayName": "Events",
      "description": "Events tell you when something happens on Krunker, such as a map being featured. You can poll for them, or have them pushed to a webhook (below). Both use the same events.\n\nEach event type belongs to one **events scope**. A key only sees the types whose scope it holds; ask for a scope from the partner portal.\n\n| Type | Scope | Sent when |\n| --- | --- | --- |\n| `map.featured` | `events.maps` | A map was featured |\n| `map.unfeatured` | `events.maps` | A map is no longer featured |\n\nEvery key with the scope gets the event. Events are kept for 30 days."
    },
    {
      "name": "game/players",
      "x-displayName": "Players",
      "description": "The social profile popup and its tabs."
    },
    {
      "name": "game/clans",
      "x-displayName": "Clans",
      "description": "The in-game clan window and the recruitment board."
    },
    {
      "name": "game/turf",
      "x-displayName": "Turf Wars",
      "description": "`https://gapi.svc.krunker.io/territorial-wars/*`. Days are whole UTC days since the season epoch `2026-03-17` (`TURF_EPOCH_UTC`, `turfDay(date)` in krapio). `map_id` is the Turf map: 0 Burg, 2 Sandstorm, 3 Subzero (`TURF_MAPS`). Leaderboards return 100 rows, `kd` is a float."
    },
    {
      "name": "game/leaderboards",
      "x-displayName": "Leaderboards",
      "description": "GET /leaderboards/*: player, clan, raid and KrunkCup boards"
    },
    {
      "name": "game/game",
      "x-displayName": "Game",
      "description": "Static data the page loads at start, and the community map and mod records."
    },
    {
      "name": "game/market",
      "x-displayName": "Market",
      "description": "The reads of the market tab that answer without a token. Listings, the player's inventory and history need one, see the [token API](token-api.md)."
    },
    {
      "name": "game/items",
      "x-displayName": "Items",
      "description": "The item page of the social market, by skin index."
    },
    {
      "name": "game/social",
      "x-displayName": "Social",
      "description": "the social feed; a player's own posts are players.feed"
    },
    {
      "name": "game/shop",
      "x-displayName": "Shop",
      "description": "The shop's catalogue. The wild offer and every purchase need the player's token."
    },
    {
      "name": "game/matchmaker",
      "x-displayName": "Matchmaker",
      "description": "`https://matchmaker.krunker.io`, plain JSON without an envelope. The game polls the list every 60 seconds. krapio adds `hostname=krunker.io` to every call."
    },
    {
      "name": "game/legacy",
      "x-displayName": "Legacy",
      "description": "`https://api.krunker.io`, the old REST API. Only the paths the page calls without a token."
    },
    {
      "name": "token/player",
      "x-displayName": "Player",
      "description": "The token's own account."
    },
    {
      "name": "token/market",
      "x-displayName": "Market",
      "description": "The market behind a login. Market stats and item pages answer without a token, see the [game API](game-api.md#market)."
    },
    {
      "name": "token/trades",
      "x-displayName": "Trades",
      "description": "Player to player trades. Creating, accepting and cancelling are writes and are not in krapio."
    },
    {
      "name": "token/shop",
      "x-displayName": "Shop",
      "description": "Per player shop state and the player's own custom skins."
    },
    {
      "name": "token/creator",
      "x-displayName": "Creator",
      "description": "What a creator sees of their own maps and studios, plus the player's clan applications. The studio replies are untyped in krapio (`unknown`), only their existence was verified."
    },
    {
      "name": "token/staff",
      "x-displayName": "Staff",
      "description": "Role gated reads for moderators and KPD reviewers. A normal account gets a 403 `insufficient permissions` (or `not authorized` for reports). The replies are untyped in krapio, no account with the role was available to verify them.\n\n`me.staff.chatBan(playerName)`, `.reports(playerName)`, `.kpdDemos({ off, q })`, `.kpdDemo(demoId, ct?)`, `.kpdReviewers()`\n\n`chatBan` is a player's chat ban, `kpdDemos` the demo review queue (`off` is the offset, `q` a search), `kpdDemo` one demo where `ct` is the review ticket the game passes along."
    },
    {
      "name": "token/ranked",
      "x-displayName": "Ranked",
      "description": "`https://api.krunker.io`, the ranked system's own API. Every call answers 401 `Access token required` without a token, including the public leaderboard."
    }
  ],
  "x-tagGroups": [
    {
      "name": "Developer API",
      "tags": [
        "developer/player",
        "developer/match",
        "developer/clan",
        "developer/leaderboard",
        "developer/map",
        "developer/mods",
        "developer/market",
        "developer/skins",
        "developer/kpd",
        "developer/events"
      ]
    },
    {
      "name": "Game API",
      "tags": [
        "game/players",
        "game/clans",
        "game/turf",
        "game/leaderboards",
        "game/game",
        "game/market",
        "game/items",
        "game/social",
        "game/shop",
        "game/matchmaker",
        "game/legacy"
      ]
    },
    {
      "name": "Token API",
      "tags": [
        "token/player",
        "token/market",
        "token/trades",
        "token/shop",
        "token/creator",
        "token/staff",
        "token/ranked"
      ]
    }
  ],
  "paths": {
    "/api/clan/{clanName}": {
      "get": {
        "operationId": "clan.profile",
        "summary": "Get Clan Profile",
        "description": "Retrieve a clan's public information.\n\n**Parameters:**\n\n| Name | Type | Location | Required | Description |\n| --- | --- | --- | --- | --- |\n| clanname | string | path | yes | The clan's name |\n\n**Response Fields:**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| name | string | Clan name |\n| owner_name | string | Name of the clan owner |\n| score | int64 | Clan's total score |\n| rank | int | Clan's leaderboard rank |\n| member_count | int | Number of members in the clan |\n| created_at | string | Clan creation date |\n| discord | string | Discord invite code (empty string if not set) |",
        "tags": [
          "developer/clan"
        ],
        "x-krapio": "krunker.clan.profile()",
        "x-routes": [
          "clan.profile"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker({ apiKey: process.env.KRUNKER_API_KEY });\nconst profile = await krunker.clan.profile(clanName);\n"
          }
        ],
        "security": [
          {
            "developerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "clanName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "The clan's name"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClanProfile"
                },
                "example": {
                  "name": "Elite Squad",
                  "owner_name": "ClanLeader",
                  "score": 5000000,
                  "rank": 15,
                  "member_count": 25,
                  "created_at": "2023-06-01T00:00:00Z",
                  "discord": "abc123xyz"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/clan/{clanName}/members": {
      "get": {
        "operationId": "clan.members",
        "summary": "Get Clan Members",
        "description": "Retrieve a clan's member list (paginated).\n\n**Parameters:**\n\n| Name | Type | Location | Required | Description |\n| --- | --- | --- | --- | --- |\n| clanname | string | path | yes | The clan's name |\n| page | int | query | no | Page number (default: 1) |\n\n**Response Fields:**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| player_name | string | Member's username |\n| role | int | Member's role in the clan |\n| verified | bool | Whether the player is verified |\n| score | int | *undocumented* - the member's total score |\n\n**Notes:**\n\n- Page size is fixed at 10 records\n- Members are sorted by role (descending), then by score (descending)",
        "tags": [
          "developer/clan"
        ],
        "x-krapio": "krunker.clan.members()",
        "x-routes": [
          "clan.members"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker({ apiKey: process.env.KRUNKER_API_KEY });\nconst members = await krunker.clan.members(clanName, { page });\n"
          }
        ],
        "security": [
          {
            "developerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "clanName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "The clan's name"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "Page number (default: 1)"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClanMembers"
                },
                "example": {
                  "page": 1,
                  "per_page": 10,
                  "members": [
                    {
                      "player_name": "ClanLeader",
                      "role": 3,
                      "verified": true
                    },
                    {
                      "player_name": "Member1",
                      "role": 1,
                      "verified": false
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/events": {
      "get": {
        "operationId": "events.list",
        "summary": "List Events",
        "description": "Returns events newer than `after`, oldest first. Store `next` and pass it as `after` on your next call. Start with `after=0`. Keep the same filters between calls; `next` also moves past events your filters skipped, so changing filters later does not bring those back.\n\n**Rate limit:** 6 requests per minute per key, on top of the general limit. The `X-RateLimit-*` headers on this endpoint describe this 6-per-minute limit. Poll every 20 to 60 seconds; if `has_more` is `true`, fetch the next page right away.\n\n**Parameters:**\n\n| Name | Type | Location | Required | Description |\n| --- | --- | --- | --- | --- |\n| after | int | query | no | Event id cursor (default 0) |\n| types | string | query | no | Comma-separated event types to return (default: all your scopes allow) |\n| target_type | string | query | no | Only events about this kind of target, e.g. `map` |\n| target_id | string | query | no | Comma-separated target ids, up to 100 (needs `target_type`), e.g. `target_type=map&target_id=8497,8500` |\n| limit | int | query | no | 1 to 100 (default 100) |\n\nEvents appear a few seconds after they happen. Ids only increase; gaps are normal.\n\n**Event data:**\n\n| Type | `data` fields |\n| --- | --- |\n| `map.featured`, `map.unfeatured` | `map_id`, `map_name`, `creator` |",
        "tags": [
          "developer/events"
        ],
        "x-krapio": "krunker.events.list()",
        "x-routes": [
          "events.list"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker({ apiKey: process.env.KRUNKER_API_KEY });\nconst list = await krunker.events.list({ after, types, target_type, target_id, limit });\n"
          }
        ],
        "security": [
          {
            "developerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "event id cursor, the `next` of the previous page; 0 when omitted"
          },
          {
            "name": "types",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "description": "only these types; everything the key's scopes allow when omitted",
            "style": "form",
            "explode": false
          },
          {
            "name": "target_type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "only events about this kind of target, e.g. \"map\""
          },
          {
            "name": "target_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "maxItems": 100
            },
            "description": "only these targets, 100 at most, needs target_type",
            "style": "form",
            "explode": false
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            },
            "description": "1 to 100, 100 when omitted"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventsPage"
                },
                "example": {
                  "events": [
                    {
                      "id": 1042,
                      "type": "map.featured",
                      "created_at": "2026-10-10T19:30:12Z",
                      "target": {
                        "type": "map",
                        "id": 8497
                      },
                      "data": {
                        "map_id": 8497,
                        "map_name": "Bhop_Ravine",
                        "creator": "someone"
                      }
                    }
                  ],
                  "next": 1042,
                  "has_more": false
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/kpd/latest-calls": {
      "get": {
        "operationId": "kpd.latestCalls",
        "summary": "Get Latest KPD Calls",
        "description": "List the 50 most recent KPD (player hacker-report) calls, newest first, across all statuses so officer verdicts are visible. Requires the `kpd` scope.\n\n**Parameters:**\n\nNone.\n\n**Response Fields:**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| id | int | Report id |\n| date | string | Call time (RFC 3339, UTC) |\n| caller_id | int | Reporter player id |\n| caller_name | string | Reporter name |\n| caller_score | int | Reporter score |\n| caller_job_rating | int | Reporter's total KPD job rating |\n| caller_job_rating_positive | int | Reporter's correct (positive) call count |\n| called_id | int | Reported player id |\n| called_name | string | Reported player name (`guest` if unregistered) |\n| called_score | int | Reported player score |\n| kdf_type | int | Call context: 0=public, 1=ranked, 2=comp, 3=custom |\n| kdf_type_label | string | Readable kdf_type |\n| status | int | 1=not responded, 2=responded, 3=reviewed |\n| status_label | string | Readable status |\n| rating | int | Officer verdict: 0=pending, 1=banned, 2=rejected |\n| rating_label | string | Readable rating |\n| officer_id | int | Officer who handled the call (0 if none) |\n| officer_name | string | Officer name |\n| status_date | string | Last status change (RFC 3339, UTC) |\n| game_code | string | Game instance code |\n| host | string | Game server host |\n| port | string | Game server port |\n| token | string | Internal call token |\n\n**Notes:**\n\n- Player IP addresses are not exposed.\n- A fixed window of the 50 most recent calls; there is no pagination.",
        "tags": [
          "developer/kpd"
        ],
        "x-krapio": "krunker.kpd.latestCalls()",
        "x-routes": [
          "kpd.latestCalls"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker({ apiKey: process.env.KRUNKER_API_KEY });\nconst latestCalls = await krunker.kpd.latestCalls();\n"
          }
        ],
        "security": [
          {
            "developerApiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/KpdCall"
                  }
                },
                "example": [
                  {
                    "id": 3314982,
                    "date": "2026-06-30T09:41:12Z",
                    "caller_id": 2,
                    "caller_name": "player",
                    "caller_score": 184320,
                    "caller_job_rating": 12,
                    "caller_job_rating_positive": 9,
                    "called_id": 81234,
                    "called_name": "suspect",
                    "called_score": 4521,
                    "kdf_type": 0,
                    "kdf_type_label": "public",
                    "status": 3,
                    "status_label": "reviewed",
                    "rating": 1,
                    "rating_label": "banned",
                    "officer_id": 47707163,
                    "officer_name": "Officer",
                    "status_date": "2026-06-30T09:45:03Z",
                    "game_code": "ab12cd",
                    "host": "ny.krunker.io",
                    "port": "5000",
                    "token": "a1b2c3d4e5f6g7h"
                  }
                ]
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/leaderboard/{region}": {
      "get": {
        "operationId": "leaderboard.ranked",
        "summary": "Get Ranked Leaderboard",
        "description": "Retrieve the ranked leaderboard for a specific region.\n\n**Parameters:**\n\n| Name | Type | Location | Required | Description |\n| --- | --- | --- | --- | --- |\n| region | int | path | yes | The region ID (2 = Asia, 3 = Europe, 4 = North America) |\n| page | int | query | no | Page number (default: 1) |\n| season | int | query | no | Season number (default: current season) |\n\n**Response Fields:**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| page | int | Current page number |\n| per_page | int | Number of entries per page (10) |\n| season | int | Current ranked season |\n| region | int | Region ID |\n| entries | object\\[\\] | Array of leaderboard entries |\n| entries\\[\\].position | int | Leaderboard position |\n| entries\\[\\].player_name | string | Player's username |\n| entries\\[\\].mmr | int | Matchmaking rating |\n| entries\\[\\].wins | int | Total ranked wins |\n| entries\\[\\].losses | int | Total ranked losses |\n| entries\\[\\].kills | int | Total kills in ranked matches |\n| entries\\[\\].deaths | int | Total deaths in ranked matches |\n| entries\\[\\].assists | int | Total assists in ranked matches |\n| entries\\[\\].score | int | Total score in ranked matches |\n| entries\\[\\].damage_done | int | Total damage dealt in ranked matches |\n\n**Notes:**\n\n- Only players with 6+ completed placement matches appear on the leaderboard\n- Page size is fixed at 10 records\n- Entries are sorted by MMR descending\n- Use the `season` parameter to query historical seasons (omit or set to 0 for current season)",
        "tags": [
          "developer/leaderboard"
        ],
        "x-krapio": "krunker.leaderboard.ranked()",
        "x-routes": [
          "leaderboard.ranked"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker({ apiKey: process.env.KRUNKER_API_KEY });\nconst ranked = await krunker.leaderboard.ranked(region, { page, season });\n"
          }
        ],
        "security": [
          {
            "developerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "The region ID (2 = Asia, 3 = Europe, 4 = North America)"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "Page number (default: 1)"
          },
          {
            "name": "season",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "season number, current season when omitted or 0"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RankedLeaderboard"
                },
                "example": {
                  "page": 1,
                  "per_page": 10,
                  "season": 5,
                  "region": 0,
                  "entries": [
                    {
                      "position": 1,
                      "player_name": "TopPlayer",
                      "mmr": 2500,
                      "wins": 150,
                      "losses": 50,
                      "kills": 3000,
                      "deaths": 1500,
                      "assists": 800,
                      "score": 50000,
                      "damage_done": 450000
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/map/{mapName}": {
      "get": {
        "operationId": "map.get",
        "summary": "Get Map by Name",
        "description": "Retrieve map information by its name.\n\n**Parameters:**\n\n| Name | Type | Location | Required | Description |\n| --- | --- | --- | --- | --- |\n| mapname | string | path | yes | The map's name (URL encoded) |\n\n**Response Fields:**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| map_id | int | Unique map identifier |\n| name | string | Map name |\n| description | string | Map description |\n| creator_name | string | Username of the map creator |\n| votes | int | Total upvotes |\n| gameplays | int | Number of times the map has been played |\n| playtime | int64 | Total playtime in milliseconds |\n| category | int | Map category ID |\n| created_at | string | When the map was created |\n| updated_at | string | When the map was last updated |\n| leaderboard_type | string | Type of leaderboard (e.g., \"time\", \"score\", empty if none) |\n| leaderboard_order | int | Sort order for leaderboard (0 = ascending/lower is better, 1 = descending/higher is better) |\n| featured | bool | *undocumented* - whether the map is currently featured |\n\n**Notes:**\n\n- Returns 404 if map not found or is restricted/deleted\n- Map name is case-sensitive (*observed*: it is not, `burg` finds `Burg`)\n- *observed*: `created_at` and `updated_at` come as `YYYY-MM-DD HH:MM:SS`, not RFC3339",
        "tags": [
          "developer/map"
        ],
        "x-krapio": "krunker.map.get()",
        "x-routes": [
          "map.get"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker({ apiKey: process.env.KRUNKER_API_KEY });\nconst get = await krunker.map.get(mapName);\n"
          }
        ],
        "security": [
          {
            "developerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "mapName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "The map's name (URL encoded)"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MapInfo"
                },
                "example": {
                  "map_id": 12345,
                  "name": "MyAwesomeMap",
                  "description": "A fun parkour map",
                  "creator_name": "MapMaker",
                  "votes": 500,
                  "gameplays": 10000,
                  "playtime": 3600000,
                  "category": 5,
                  "created_at": "2023-01-15T10:30:00Z",
                  "updated_at": "2023-06-20T14:00:00Z",
                  "leaderboard_type": "time",
                  "leaderboard_order": 0
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/maps/featured": {
      "get": {
        "operationId": "map.featured",
        "summary": "Get Featured Maps",
        "description": "List every map that is currently featured, newest first. Use [Get Map by Name](#get-map-by-name) for a map's details. To be told when a map is featured or unfeatured, use [Events](#events).\n\n**Response Fields:**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| maps\\[\\].map_id | int | Unique map identifier |\n| maps\\[\\].name | string | Map name |\n| maps\\[\\].creator_id | int | Player id of the map creator |\n| maps\\[\\].creator_name | string | Username of the map creator |\n| count | int | Number of maps returned |",
        "tags": [
          "developer/map"
        ],
        "x-krapio": "krunker.map.featured()",
        "x-routes": [
          "map.featured"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker({ apiKey: process.env.KRUNKER_API_KEY });\nconst featured = await krunker.map.featured();\n"
          }
        ],
        "security": [
          {
            "developerApiKey": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FeaturedMaps"
                },
                "example": {
                  "maps": [
                    {
                      "map_id": 12345,
                      "name": "MyAwesomeMap",
                      "creator_id": 11443974,
                      "creator_name": "MapMaker"
                    }
                  ],
                  "count": 1
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/map/{mapName}/leaderboard": {
      "get": {
        "operationId": "map.leaderboard",
        "summary": "Get Map Leaderboard",
        "description": "Retrieve the leaderboard for a specific map (paginated).\n\n**Parameters:**\n\n| Name | Type | Location | Required | Description |\n| --- | --- | --- | --- | --- |\n| mapname | string | path | yes | The map's name (URL encoded) |\n| page | int | query | no | Page number (default: 1) |\n| type | string | query | no | Built-in leaderboard to rank on: `score` or `time`. Defaults to the map's configured leaderboard |\n| order | int | query | no | 0 = ascending, 1 = descending. Defaults to the map's order for its configured leaderboard; otherwise ascending for `time`, descending for `score` |\n\n**Response Fields:**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| page | int | Current page number |\n| per_page | int | Number of entries per page (25) |\n| map_name | string | The map name queried |\n| leaderboard_type | string | Type of leaderboard (e.g., \"time\", \"score\") |\n| leaderboard_order | int | Sort order (0 = ascending, 1 = descending) |\n| entries | object\\[\\] | Array of leaderboard entries |\n| entries\\[\\].position | int | Leaderboard position |\n| entries\\[\\].player_name | string | Player's username |\n| entries\\[\\].value | int | Score or time value |\n| entries\\[\\].date | string | When the entry was recorded |\n\n**Notes:**\n\n- Returns empty entries array if the map has no leaderboard configured\n- Maps can show both a score and a time leaderboard in-game; use `type` (and `order`) to fetch either. Invalid values return 400\n- Page size is fixed at 25 records\n- Entries are sorted by value according to leaderboard_order",
        "tags": [
          "developer/map"
        ],
        "x-krapio": "krunker.map.leaderboard()",
        "x-routes": [
          "map.leaderboard"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker({ apiKey: process.env.KRUNKER_API_KEY });\nconst leaderboard = await krunker.map.leaderboard(mapName, { page, type, order });\n"
          }
        ],
        "security": [
          {
            "developerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "mapName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "The map's name (URL encoded)"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "Page number (default: 1)"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "score",
                "time"
              ]
            },
            "description": "which built-in board, the map's configured one when omitted"
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1
              ]
            },
            "description": "the map's order when omitted, else ascending for time and descending for score"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MapLeaderboard"
                },
                "example": {
                  "page": 1,
                  "per_page": 25,
                  "map_name": "MyAwesomeMap",
                  "leaderboard_type": "time",
                  "leaderboard_order": 0,
                  "entries": [
                    {
                      "position": 1,
                      "player_name": "SpeedRunner",
                      "value": 12345,
                      "date": "2024-01-15T10:30:00Z"
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/map/{mapName}/leaderboard/player/{playerName}": {
      "get": {
        "operationId": "map.leaderboardPlayer",
        "summary": "Get Map Leaderboard Player",
        "description": "Look up a specific player's position on a map leaderboard.\n\n**Parameters:**\n\n| Name | Type | Location | Required | Description |\n| --- | --- | --- | --- | --- |\n| mapname | string | path | yes | The map's name (URL encoded) |\n| playername | string | path | yes | The player's username (URL encoded) |\n| type | string | query | no | Built-in leaderboard to rank on: `score` or `time`. Defaults to the map's configured leaderboard |\n| order | int | query | no | 0 = ascending, 1 = descending. Defaults to the map's order for its configured leaderboard; otherwise ascending for `time`, descending for `score` |\n\n**Response Fields:**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| map_name | string | The map name queried |\n| leaderboard_type | string | Type of leaderboard (e.g., \"time\", \"score\") |\n| leaderboard_order | int | Sort order (0 = ascending, 1 = descending) |\n| player_name | string | Player's username |\n| position | int | Player's position on the leaderboard |\n| value | int | Player's score or time value |\n| date | string | When the entry was recorded |\n\n**Notes:**\n\n- Returns 404 if the map has no leaderboard (and no `type` is given) or the player has no entry\n- Position is calculated dynamically based on current leaderboard standings",
        "tags": [
          "developer/map"
        ],
        "x-krapio": "krunker.map.leaderboardPlayer()",
        "x-routes": [
          "map.leaderboardPlayer"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker({ apiKey: process.env.KRUNKER_API_KEY });\nconst leaderboardPlayer = await krunker.map.leaderboardPlayer(mapName, playerName, { type, order });\n"
          }
        ],
        "security": [
          {
            "developerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "mapName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "The map's name (URL encoded)"
          },
          {
            "name": "playerName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "NulPing"
            },
            "description": "The player's username (URL encoded)"
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "score",
                "time"
              ]
            },
            "description": "which built-in board, the map's configured one when omitted"
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1
              ]
            },
            "description": "the map's order when omitted, else ascending for time and descending for score"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MapLeaderboardPlayer"
                },
                "example": {
                  "map_name": "MyAwesomeMap",
                  "leaderboard_type": "time",
                  "leaderboard_order": 0,
                  "player_name": "SpeedRunner",
                  "position": 42,
                  "value": 15234,
                  "date": "2024-01-15T10:30:00Z"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/market/skin/{skinIndex}": {
      "get": {
        "operationId": "market.skin",
        "summary": "Get Market Listings by Skin Index",
        "description": "Retrieve market information and active listings for a specific skin.\n\n**Parameters:**\n\n| Name | Type | Location | Required | Description |\n| --- | --- | --- | --- | --- |\n| skinindex | int | path | yes | The skin index (item type ID) |\n| page | int | query | no | Page number for listings (default: 1) |\n| days | int | query | no | Number of days for price history (default: 30, max: 120) |\n\n**Response Fields:**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| skin_index | int | The skin index queried |\n| total_listings | int | Total number of active listings |\n| lowest_price | int | Lowest listed price (0 if no listings) |\n| average_price | float | Average sale price from last 7 days |\n| total_circulating | int | Total quantity of this skin in circulation |\n| listings | object\\[\\] | Paginated list of active listings (sorted by price ascending) |\n| listings\\[\\].price | int | Listing price in KR |\n| listings\\[\\].seller_name | string | Seller's username |\n| listings\\[\\].listed_at | string | When the listing was created |\n| owners | object\\[\\] | First 100 owners sorted by quantity owned (descending) |\n| owners\\[\\].player_name | string | Owner's username |\n| owners\\[\\].count | int | Number of this skin the player owns |\n| price_history | object\\[\\] | Daily average sale prices for the specified time period |\n| price_history\\[\\].date | string | Date (YYYY-MM-DD format) |\n| price_history\\[\\].average_price | float | Average sale price on that day |\n| price_history\\[\\].sales | int | Number of sales on that day |\n\n**Notes:**\n\n- Listings are sorted by price (lowest first)\n- Page size is fixed at 10 records for listings\n- `average_price` is calculated from sales in the last 7 days\n- Owners list shows up to 100 players, sorted by quantity owned (highest first)\n- Banned users are excluded from the owners list\n- `price_history` contains daily averages for days with sales within the specified `days` parameter (default 30, max 120 days / 4 months)\n- *observed*: this is the slow endpoint, over 10 s cold and about 3 s warm; every other endpoint answers in under a second",
        "tags": [
          "developer/market"
        ],
        "x-krapio": "krunker.market.skin()",
        "x-routes": [
          "market.skin"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker({ apiKey: process.env.KRUNKER_API_KEY });\nconst skin = await krunker.market.skin(skinIndex, { page, days });\n"
          }
        ],
        "security": [
          {
            "developerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "skinIndex",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "The skin index (item type ID)"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "Page number for listings (default: 1)"
          },
          {
            "name": "days",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 120
            },
            "description": "days of price history, 30 by default, 120 at most"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MarketSkin"
                },
                "example": {
                  "skin_index": 123,
                  "total_listings": 45,
                  "lowest_price": 500,
                  "average_price": 750.5,
                  "total_circulating": 3500,
                  "listings": [
                    {
                      "price": 500,
                      "seller_name": "Player1",
                      "listed_at": "2025-01-15T10:30:00Z"
                    }
                  ],
                  "owners": [
                    {
                      "player_name": "Collector1",
                      "count": 50
                    },
                    {
                      "player_name": "Collector2",
                      "count": 25
                    }
                  ],
                  "price_history": [
                    {
                      "date": "2025-12-01",
                      "average_price": 32500.5,
                      "sales": 12
                    },
                    {
                      "date": "2025-12-02",
                      "average_price": 33000,
                      "sales": 8
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/match/{matchId}": {
      "get": {
        "operationId": "match.get",
        "summary": "Get Match Details",
        "description": "Retrieve detailed information about a specific ranked match.\n\n**Parameters:**\n\n| Name | Type | Location | Required | Description |\n| --- | --- | --- | --- | --- |\n| id | int64 | path | yes | The match ID |\n\n**Notes:**\n\n- Only ranked matches are returned\n- Participants are ordered by team, then by score descending",
        "tags": [
          "developer/match"
        ],
        "x-krapio": "krunker.match.get()",
        "x-routes": [
          "match.get"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker({ apiKey: process.env.KRUNKER_API_KEY });\nconst get = await krunker.match.get(matchId);\n"
          }
        ],
        "security": [
          {
            "developerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "matchId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]+$",
              "description": "an integer id, passed as a string because it can exceed 2^53"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MatchDetails"
                },
                "example": {
                  "match_id": 123456789,
                  "date": "2024-01-15T10:30:00Z",
                  "map": 5,
                  "duration": 600,
                  "season": 12,
                  "region": 1,
                  "participants": [
                    {
                      "player_name": "Player1",
                      "kills": 15,
                      "deaths": 8,
                      "assists": 3,
                      "score": 1500,
                      "damage_done": 2500,
                      "headshots": 5,
                      "accuracy": 35,
                      "objective_score": 200,
                      "victory": 1,
                      "rounds_won": 6,
                      "team": 1,
                      "play_time": 580
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/mods": {
      "get": {
        "operationId": "mods.list",
        "summary": "Get Mods",
        "description": "Retrieve a paginated list of mods, sorted by votes (most popular first).\n\n**Parameters:**\n\n| Name | Type | Location | Required | Description |\n| --- | --- | --- | --- | --- |\n| page | int | query | no | Page number (default: 1) |\n\n**Response Fields:**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| page | int | Current page number |\n| per_page | int | Number of mods per page (10) |\n| mods | object\\[\\] | Array of mod objects |\n| mods\\[\\].mod_id | int | Unique mod identifier |\n| mods\\[\\].name | string | Mod name |\n| mods\\[\\].description | string | Mod description |\n| mods\\[\\].creator_name | string | Username of the mod creator |\n| mods\\[\\].votes | int | Number of upvotes |\n| mods\\[\\].featured | bool | Whether the mod is featured |\n| mods\\[\\].version | int | Mod version number |\n| mods\\[\\].created_at | string | When the mod was first published (*observed*: `YYYY-MM-DD HH:MM:SS`, not RFC3339) |\n| mods\\[\\].updated_at | string | When the mod was last updated (same format) |\n\n**Notes:**\n\n- Mods are sorted by votes (most popular first)\n- Only active mods are returned (deleted mods are excluded)\n- Mods from banned users are excluded",
        "tags": [
          "developer/mods"
        ],
        "x-krapio": "krunker.mods.list()",
        "x-routes": [
          "mods.list"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker({ apiKey: process.env.KRUNKER_API_KEY });\nconst list = await krunker.mods.list({ page });\n"
          }
        ],
        "security": [
          {
            "developerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "Page number (default: 1)"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Mods"
                },
                "example": {
                  "page": 1,
                  "per_page": 10,
                  "mods": [
                    {
                      "mod_id": 12345,
                      "name": "AwesomeMod",
                      "description": "A cool mod that changes textures",
                      "creator_name": "ModCreator",
                      "votes": 5000,
                      "featured": true,
                      "version": 15,
                      "created_at": "2023-01-15T10:30:00Z",
                      "updated_at": "2024-06-20T14:00:00Z"
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/mods/{modName}": {
      "get": {
        "operationId": "mods.get",
        "summary": "Get Mod by Name",
        "description": "Retrieve detailed information about a specific mod.\n\n**Parameters:**\n\n| Name | Type | Location | Required | Description |\n| --- | --- | --- | --- | --- |\n| modname | string | path | yes | The mod's name (URL encoded) |\n\n**Response Fields:**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| mod_id | int | Unique mod identifier |\n| name | string | Mod name |\n| description | string | Mod description |\n| creator_name | string | Username of the mod creator |\n| votes | int | Number of upvotes |\n| featured | bool | Whether the mod is featured |\n| version | int | Mod version number |\n| created_at | string | When the mod was first published |\n| updated_at | string | When the mod was last updated |",
        "tags": [
          "developer/mods"
        ],
        "x-krapio": "krunker.mods.get()",
        "x-routes": [
          "mods.get"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker({ apiKey: process.env.KRUNKER_API_KEY });\nconst get = await krunker.mods.get(modName);\n"
          }
        ],
        "security": [
          {
            "developerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "modName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            },
            "description": "The mod's name (URL encoded)"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Mod"
                },
                "example": {
                  "mod_id": 12345,
                  "name": "AwesomeMod",
                  "description": "A cool mod that changes textures",
                  "creator_name": "ModCreator",
                  "votes": 5000,
                  "featured": true,
                  "version": 15,
                  "created_at": "2023-01-15T10:30:00Z",
                  "updated_at": "2024-06-20T14:00:00Z"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/player/{playerName}": {
      "get": {
        "operationId": "player.profile",
        "summary": "Get Player Profile",
        "description": "Retrieve comprehensive player statistics and profile information.\n\n**Parameters:**\n\n| Name | Type | Location | Required | Description |\n| --- | --- | --- | --- | --- |\n| playername | string | path | yes | The player's in-game username |\n\n**Response Fields:**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| player_id | int | Unique player identifier |\n| player_name | string | Player's username |\n| clan | string | Player's clan name (empty string if not in a clan) |\n| verified | bool | Whether the player is verified |\n| flag | int | Player's country flag index |\n| badges | int\\[\\] | Array of badge IDs the player has earned |\n| following | int | Number of players this player is following |\n| followers | int | Number of players following this player |\n| ranked | object\\[\\] | Array of ranked profiles for the current season, one per region (only includes regions where player has completed 6+ placement matches) |\n| ranked\\[\\].region | int | Region ID |\n| ranked\\[\\].mmr | int | Matchmaking rating |\n| ranked\\[\\].wins | int | Ranked wins in this region |\n| ranked\\[\\].losses | int | Ranked losses in this region |\n| ranked\\[\\].kills | int | Total kills in ranked matches |\n| ranked\\[\\].deaths | int | Total deaths in ranked matches |\n| ranked\\[\\].assists | int | Total assists in ranked matches |\n| ranked\\[\\].score | int | Total score in ranked matches |\n| ranked\\[\\].damage_done | int | Total damage dealt in ranked matches |\n| ranked\\[\\].time_played | int | Total time played in ranked matches (seconds) |\n| kr | int | Currency balance |\n| level | int | Calculated from score (0.03 × √score, min 1) |\n| junk | float | ELO/Junk rating |\n| inventory | int | Total skin value |\n| score | int | Total score |\n| spk | float | Score per kill |\n| kills | int | Total kills |\n| deaths | int | Total deaths |\n| kdr | float | Kill/Death ratio |\n| kpg | float | Kills per game |\n| games | int | Games played |\n| wins | int | Games won |\n| losses | int | Games lost (games - wins) |\n| assists | int | Total assists |\n| melees | int | Melee kills |\n| beatdowns | int | Fist kills |\n| bullseyes | int | Thrown weapon kills |\n| headshots | int | Headshot kills |\n| legshots | int | Leg shot kills |\n| wallbangs | int | Wallbang kills |\n| shots | int | Total shots fired |\n| hits | int | Shots that connected |\n| misses | int | Shots missed (shots - hits) |\n| time_played | int64 | Seconds played |\n| nukes | int | Nukes called in |\n| airdrops | int | Airdrops called in |\n| airdrops_stolen | int | Airdrops stolen from enemies |\n| slimes | int | Slimes called in |\n| juggernauts | int | Juggernaut killstreaks earned |\n| juggernauts_killed | int | Enemy juggernauts killed |\n| warmachines | int | Warmachines called in |\n| class_stats | object | *undocumented* - class id (string) to score with that class, e.g. `{\"0\": 236755, \"1\": 20644276}` |\n| hacker_tagged | bool | Whether the player has been flagged as a cheater |\n| kpd | bool | Whether the player is a KPD moderator |\n| premium | bool | Whether the player has an active premium subscription |\n| twitch_name | string | *undocumented* - linked Twitch name, empty string if none |\n| profile_picture | string | Profile picture URL (empty string if not premium) |\n| created_at | string | Account creation date (RFC3339 format) |\n| maps | array | *undocumented* - maps the player voted on as `{id, name, votes}`, only seen as `[]` so far |\n| mods | array | *undocumented* - mods the player voted on as `{id, name, votes}`, only seen as `[]` so far |",
        "tags": [
          "developer/player"
        ],
        "x-krapio": "krunker.player.profile()",
        "x-routes": [
          "player.profile"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker({ apiKey: process.env.KRUNKER_API_KEY });\nconst profile = await krunker.player.profile(playerName);\n"
          }
        ],
        "security": [
          {
            "developerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "playerName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "NulPing"
            },
            "description": "The player's in-game username"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlayerProfile"
                },
                "example": {
                  "player_id": 11443974,
                  "player_name": "string",
                  "clan": "string",
                  "verified": true,
                  "flag": 5,
                  "badges": [
                    1,
                    2,
                    3
                  ],
                  "following": 50,
                  "followers": 100,
                  "ranked": [
                    {
                      "region": 0,
                      "mmr": 2250,
                      "wins": 45,
                      "losses": 30,
                      "kills": 800,
                      "deaths": 500,
                      "assists": 200,
                      "score": 15000,
                      "damage_done": 120000,
                      "time_played": 36000
                    }
                  ],
                  "kr": 1000,
                  "level": 50,
                  "junk": 1500.5,
                  "inventory": 25000,
                  "score": 1000000,
                  "spk": 125.5,
                  "kills": 8000,
                  "deaths": 4000,
                  "kdr": 2,
                  "kpg": 10.5,
                  "games": 760,
                  "wins": 400,
                  "losses": 360,
                  "assists": 1200,
                  "melees": 150,
                  "beatdowns": 50,
                  "bullseyes": 30,
                  "headshots": 3000,
                  "legshots": 500,
                  "wallbangs": 200,
                  "shots": 100000,
                  "hits": 45000,
                  "misses": 55000,
                  "time_played": 360000,
                  "nukes": 25,
                  "airdrops": 150,
                  "airdrops_stolen": 30,
                  "slimes": 40,
                  "juggernauts": 20,
                  "juggernauts_killed": 15,
                  "warmachines": 10,
                  "hacker_tagged": false,
                  "kpd": false,
                  "premium": true,
                  "profile_picture": "https://user-assets.krunker.io/p11443974/profile.png",
                  "created_at": "2021-05-10T14:30:00Z"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/player/{playerName}/inventory": {
      "get": {
        "operationId": "player.inventory",
        "summary": "Get Player Inventory",
        "description": "Retrieve a player's skin inventory.\n\n**Parameters:**\n\n| Name | Type | Location | Required | Description |\n| --- | --- | --- | --- | --- |\n| playername | string | path | yes | The player's in-game username |\n\n**Response Fields:**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| skin_index | int | Identifier for the skin |\n| skin_id | int | *undocumented* - id of the owned item instance (not the definition) |\n| count | int | Number owned (excludes market listings) |\n| metadata | object | *undocumented* - `null` or kounter stats and float data, every field optional: `wear`, `style`, `serial`, `kills`, `hskills`, `headshots`, `hits`, `shots`, `jumps` |\n| stackable | bool | *undocumented* |",
        "tags": [
          "developer/player"
        ],
        "x-krapio": "krunker.player.inventory()",
        "x-routes": [
          "player.inventory"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker({ apiKey: process.env.KRUNKER_API_KEY });\nconst inventory = await krunker.player.inventory(playerName);\n"
          }
        ],
        "security": [
          {
            "developerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "playerName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "NulPing"
            },
            "description": "The player's in-game username"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/InventoryItem"
                  }
                },
                "example": [
                  {
                    "skin_index": 123,
                    "count": 5
                  }
                ]
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/player/{playerName}/listings": {
      "get": {
        "operationId": "player.listings",
        "summary": "Get Player Listings",
        "description": "Retrieve a player's active market listings (paginated).\n\n**Parameters:**\n\n| Name | Type | Location | Required | Description |\n| --- | --- | --- | --- | --- |\n| playername | string | path | yes | The player's in-game username |\n| page | int | query | no | Page number (default: 1) |\n\n**Response Fields:**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| skin_index | int | Identifier for the skin being sold |\n| price | int | Listing price in KR |\n| listed_at | string | When the listing was created |\n\n**Notes:**\n\n- Only active listings are returned\n- Page size is fixed at 10 records\n- Listings are ordered by date listed (newest first)",
        "tags": [
          "developer/player"
        ],
        "x-krapio": "krunker.player.listings()",
        "x-routes": [
          "player.listings"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker({ apiKey: process.env.KRUNKER_API_KEY });\nconst listings = await krunker.player.listings(playerName, { page });\n"
          }
        ],
        "security": [
          {
            "developerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "playerName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "NulPing"
            },
            "description": "The player's in-game username"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "Page number (default: 1)"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlayerListings"
                },
                "example": {
                  "page": 1,
                  "per_page": 10,
                  "listings": [
                    {
                      "skin_index": 123,
                      "price": 5000,
                      "listed_at": "2025-01-15T10:30:00Z"
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/player/{playerName}/matches": {
      "get": {
        "operationId": "player.matches",
        "summary": "Get Player Match History",
        "description": "Retrieve a player's ranked match history (paginated).\n\n**Parameters:**\n\n| Name | Type | Location | Required | Description |\n| --- | --- | --- | --- | --- |\n| playername | string | path | yes | The player's in-game username |\n| page | int | query | no | Page number (default: 1) |\n| season | int | query | no | Season filter (default: all seasons) |\n\n**Response Fields:**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| match_id | int64 | Unique match identifier |\n| date | string | Match date (RFC3339 format) |\n| map | int | Map ID |\n| duration | int | Match duration in seconds |\n| season | int | Ranked season number |\n| region | int | Region ID |\n| kills | int | Player's kills in this match |\n| deaths | int | Player's deaths in this match |\n| assists | int | Player's assists in this match |\n| score | int | Player's score in this match |\n| damage_done | int | Player's damage dealt in this match |\n| headshots | int | Player's headshots in this match |\n| accuracy | int | Player's accuracy percentage |\n| objective_score | int | Player's objective score |\n| kr | int | KR earned from this match |\n| victory | int | Match result (1 = win, 0 = loss, -1 = draw) |\n| rounds_won | int | Rounds won by player's team |\n| team | int | Player's team number |\n| play_time | int | Player's active play time in milliseconds |\n| mmr | int | Player's MMR at the time of this match |\n\n**Notes:**\n\n- Only ranked matches are returned\n- Page size is fixed at 10 records\n- Matches are ordered by date descending\n- *observed*: `matches` is `null` instead of `[]` when the page is past the end\n- The `mmr` field shows the player's rating after each match, allowing you to calculate MMR changes between matches",
        "tags": [
          "developer/player"
        ],
        "x-krapio": "krunker.player.matches()",
        "x-routes": [
          "player.matches"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker({ apiKey: process.env.KRUNKER_API_KEY });\nconst matches = await krunker.player.matches(playerName, { page, season });\n"
          }
        ],
        "security": [
          {
            "developerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "playerName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "NulPing"
            },
            "description": "The player's in-game username"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "Page number (default: 1)"
          },
          {
            "name": "season",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "ranked season, all seasons when omitted"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlayerMatches"
                },
                "example": {
                  "page": 1,
                  "per_page": 10,
                  "matches": [
                    {
                      "match_id": 123456789,
                      "date": "2024-01-15T10:30:00Z",
                      "map": 5,
                      "duration": 600,
                      "season": 12,
                      "region": 1,
                      "kills": 15,
                      "deaths": 8,
                      "assists": 3,
                      "score": 1500,
                      "damage_done": 2500,
                      "headshots": 5,
                      "accuracy": 35,
                      "objective_score": 200,
                      "kr": 50,
                      "victory": 1,
                      "rounds_won": 6,
                      "team": 1,
                      "play_time": 580,
                      "mmr": 1850
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/player/{playerName}/posts": {
      "get": {
        "operationId": "player.posts",
        "summary": "Get Player Posts",
        "description": "Retrieve a player's social media posts (paginated).\n\n**Parameters:**\n\n| Name | Type | Location | Required | Description |\n| --- | --- | --- | --- | --- |\n| playername | string | path | yes | The player's in-game username |\n| page | int | query | no | Page number (default: 1) |",
        "tags": [
          "developer/player"
        ],
        "x-krapio": "krunker.player.posts()",
        "x-routes": [
          "player.posts"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker({ apiKey: process.env.KRUNKER_API_KEY });\nconst posts = await krunker.player.posts(playerName, { page });\n"
          }
        ],
        "security": [
          {
            "developerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "playerName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "NulPing"
            },
            "description": "The player's in-game username"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "Page number (default: 1)"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PlayerPosts"
                },
                "example": {
                  "page": 1,
                  "per_page": 10,
                  "posts": [
                    {
                      "date": "2024-01-15T10:30:00Z",
                      "text": "Just hit level 100!",
                      "votes": 42,
                      "comment_count": 5
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/skins": {
      "get": {
        "operationId": "skins.list",
        "summary": "Get Skin Definitions",
        "description": "List all skin definitions with optional filtering.\n\n**Parameters:**\n\n| Name | Type | Location | Required | Description |\n| --- | --- | --- | --- | --- |\n| page | int | query | no | Page number (default: 1) |\n| per_page | int | query | no | Items per page (default: 100, max: 10000) |\n| season | int | query | no | Season filter (returns only skins for the specified season) |\n\n**Response Fields:**\n\n| Field | Type | Description |\n| --- | --- | --- |\n| page | int | Current page number |\n| per_page | int | Items per page |\n| total | int | Total number of matching skins |\n| skins | array | Array of skin objects |\n| skins\\[\\].index | int | Skin index (ID) |\n| skins\\[\\].name | string | Skin name |\n| skins\\[\\].type | int | Skin type |\n| skins\\[\\].rarity | int | Skin rarity |\n| skins\\[\\].weapon | int | Weapon index (omitted if null) |\n| skins\\[\\].seas | int | *undocumented* - the skin's season; this is the field name the `season` filter refers to, there is no `season` field in the reply |\n| skins\\[\\].thumbnail | string | *undocumented* - preview image URL |\n| skins\\[\\].tradable | bool | *undocumented* |\n| skins\\[\\].id | int | *undocumented* - equals `index` on `GET /api/skins/:skinid`, absent in the list |\n\n**Notes:**\n\n- Each skin object may contain additional properties from its configuration, merged into the root level (*observed*: `creator`, `glow`, `frames`, `frameT`, `mid`, `midT`, `pulsT`, ...)\n- Use the `season` parameter to retrieve skins for a specific ranked season\n- Skins without a season field are treated as season 1\n\n**Example:**\n\nGet skins from season 12:",
        "tags": [
          "developer/skins"
        ],
        "x-krapio": "krunker.skins.list()",
        "x-routes": [
          "skins.list"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker({ apiKey: process.env.KRUNKER_API_KEY });\nconst list = await krunker.skins.list({ page, per_page, season });\n"
          }
        ],
        "security": [
          {
            "developerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            },
            "description": "Page number (default: 1)"
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10000
            },
            "description": "100 by default, 10000 at most"
          },
          {
            "name": "season",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            },
            "description": "only skins of that ranked season, skins without a season count as season 1"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Skins"
                },
                "example": {
                  "page": 1,
                  "per_page": 100,
                  "total": 8432,
                  "skins": [
                    {
                      "index": 0,
                      "name": "Arctic Hunt",
                      "type": 0,
                      "rarity": 1,
                      "weapon": 1
                    }
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/api/skins/{skinIndex}": {
      "get": {
        "operationId": "skins.get",
        "summary": "Get Skin Definition",
        "description": "Get a single skin definition by its index.\n\n**Parameters:**\n\n| Name | Type | Location | Required | Description |\n| --- | --- | --- | --- | --- |\n| skinid | int | path | yes | The skin index (0-based) |\n\n**Error Responses:**\n\n- 400 if skinid is not a valid integer\n- 404 if skin does not exist",
        "tags": [
          "developer/skins"
        ],
        "x-krapio": "krunker.skins.get()",
        "x-routes": [
          "skins.get"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker({ apiKey: process.env.KRUNKER_API_KEY });\nconst get = await krunker.skins.get(skinIndex);\n"
          }
        ],
        "security": [
          {
            "developerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "skinIndex",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SkinDefinition"
                },
                "example": {
                  "index": 0,
                  "name": "Arctic Hunt",
                  "type": 0,
                  "rarity": 1,
                  "weapon": 1
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiErrorBody"
                }
              }
            }
          }
        }
      }
    },
    "/clans/by-name/{clanName}": {
      "get": {
        "operationId": "game.clans.byName",
        "summary": "Get Clan by Name",
        "description": "Case-insensitive. The roster carries no player ids.\n\n```ts\ntype ClanPublicProfile = {\n    clan_id: number;\n    clan_name: string;\n    clan_score: number;\n    clan_funds: number;\n    clan_rank: number;\n    clan_link4: string;            // discord invite code\n    clan_logo: number | null;      // logo version, 0 or null without one\n    clan_banner_color: string;     // \"s<n>\" = paint shader n, otherwise a color\n    creator_name: string;\n    members: ClanPublicMember[];\n};\n\ntype ClanPublicMember = {\n    p: string;      // name\n    s: number;      // score\n    r: number;      // role: 0 recruit, 1 soldier, 2 captain, 3 commander; the creator is listed with 0\n    h: number;      // hacker flag\n    pr: number;\n    ve: number;     // verified\n    su: number;     // staff\n    s7: number;     // score of the last 7 days\n};\n```\n\nThe clan logo is at `https://user-assets.krunker.io/clans/<clan_id>.png?v=<clan_logo>`.",
        "tags": [
          "game/clans"
        ],
        "x-krapio": "krunker.game.clans.byName()",
        "x-routes": [
          "game.clans.byName"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst byName = await krunker.game.clans.byName(clanName);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "clanName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ClanPublicProfile"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/clans/{clanId}/profile": {
      "get": {
        "operationId": "game.clans.profile",
        "summary": "Get Clan by Id",
        "description": "The same reply as by name.",
        "tags": [
          "game/clans"
        ],
        "x-krapio": "krunker.game.clans.profile()",
        "x-routes": [
          "game.clans.profile"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst profile = await krunker.game.clans.profile(clanId);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "clanId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ClanPublicProfile"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/clans/{clanId}/loot-config": {
      "get": {
        "operationId": "game.clans.lootConfig",
        "summary": "Get Loot Config",
        "description": "The clan's Turf Wars payout rule.\n\n```ts\ntype ClanLootConfig = {\n    clan_id: number;\n    distribution_mode: \"clan_bank\" | \"even\" | \"top_weighted\" | \"performance\" | \"top_performance\";\n    clan_pct: number;              // the treasury cut\n    top_player_count: number;\n    top_player_pct: number;        // top_player_pct + remainder_pct = 100\n    remainder_pct: number;\n    min_games_required: number;\n    updated_at: string;\n    updated_by: number;\n    updated_by_name: string;\n};\n```",
        "tags": [
          "game/clans"
        ],
        "x-krapio": "krunker.game.clans.lootConfig()",
        "x-routes": [
          "game.clans.lootConfig"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst lootConfig = await krunker.game.clans.lootConfig(clanId);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "clanId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ClanLootConfig"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/clans/{clanId}/motd": {
      "get": {
        "operationId": "game.clans.motd",
        "summary": "Get Message of the Day",
        "description": "`{message, set_by, set_by_name, set_at}`.",
        "tags": [
          "game/clans"
        ],
        "x-krapio": "krunker.game.clans.motd()",
        "x-routes": [
          "game.clans.motd"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst motd = await krunker.game.clans.motd(clanId);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "clanId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ClanMotd"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/clans/{clanId}/recruitment": {
      "get": {
        "operationId": "game.clans.recruitment",
        "summary": "Get Recruitment Post",
        "description": "The clan's own post on the recruitment board.\n\n```ts\ntype RecruitmentPost = {\n    recruitment_id: number;\n    clan_id: number;\n    clan_name: string;\n    clan_logo: number | null;\n    description: string;\n    looking_for: string;\n    min_level: number;\n    min_kd: number;\n    region: string | null;\n    language: string | null;\n    is_active: number;\n    created_at: string;\n    updated_at: string;\n    created_by: number;\n    loot_mode: LootDistributionMode | null;\n    loot_clan_pct: number | null;\n    loot_top_player_count: number | null;\n    loot_top_player_pct: number | null;\n    loot_remainder_pct: number | null;\n    loot_min_games: number | null;\n};\n```",
        "tags": [
          "game/clans"
        ],
        "x-krapio": "krunker.game.clans.recruitment()",
        "x-routes": [
          "game.clans.recruitment"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst recruitment = await krunker.game.clans.recruitment(clanId);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "clanId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RecruitmentPost"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/clans/recruitment": {
      "get": {
        "operationId": "game.clans.recruitmentBoard",
        "summary": "Get Recruitment Board",
        "description": "| Name | Type | Required | Description |\n| --- | --- | --- | --- |\n| page | int | no | 1 based |\n| limit | int | no | 1 to 50, the game sends 20 |\n| region | string | no | the board's region select |\n| language | string | no | the board's language select |\n\nReturns `{posts: RecruitmentPost[], total, page, limit}`.",
        "tags": [
          "game/clans"
        ],
        "x-krapio": "krunker.game.clans.recruitmentBoard()",
        "x-routes": [
          "game.clans.recruitmentBoard"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst recruitmentBoard = await krunker.game.clans.recruitmentBoard({ page, limit, region, language });\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50
            },
            "description": "20 in the game"
          },
          {
            "name": "region",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "language",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RecruitmentBoard"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/maps": {
      "get": {
        "operationId": "game.game.maps",
        "summary": "Official Maps",
        "description": "`{name, id}[]`. The id is also the preview image number at `https://assets.krunker.io/img/maps/map_<id>.png`.",
        "tags": [
          "game/game"
        ],
        "x-krapio": "krunker.game.game.maps()",
        "x-routes": [
          "game.game.maps"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst maps = await krunker.game.game.maps();\n"
          }
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OfficialMap"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/maps/{mapId}": {
      "get": {
        "operationId": "game.game.mapConfig",
        "summary": "Map Config",
        "description": "The whole map file (120 KB for Burg). krapio names only the keys the client reads (`name`, `modes`, `spawns`, `objects`, `sky`, `skyDome`), the rest is `Record<string, unknown>`.",
        "tags": [
          "game/game"
        ],
        "x-krapio": "krunker.game.game.mapConfig()",
        "x-routes": [
          "game.game.mapConfig"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst mapConfig = await krunker.game.game.mapConfig(mapId);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "mapId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MapConfig"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/maps/by-name/{mapName}": {
      "get": {
        "operationId": "game.game.mapByName",
        "summary": "Community Map by Name",
        "description": "The community map record. Note that `Burg` resolves to a community map of that name, not the official map.\n\n`{map_id, name, description, creator_name, votes, gameplays, playtime, category, created_at, updated_at, leaderboard_type, leaderboard_order, featured}`",
        "tags": [
          "game/game"
        ],
        "x-krapio": "krunker.game.game.mapByName()",
        "x-routes": [
          "game.game.mapByName"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst mapByName = await krunker.game.game.mapByName(mapName);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "mapName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CommunityMap"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/maps/by-name/{mapName}/leaderboard": {
      "get": {
        "operationId": "game.game.mapLeaderboard",
        "summary": "Community Map Leaderboard",
        "description": "25 per page. `{page, per_page, map_name, leaderboard_type, leaderboard_order, entries}`.",
        "tags": [
          "game/game"
        ],
        "x-krapio": "krunker.game.game.mapLeaderboard()",
        "x-routes": [
          "game.game.mapLeaderboard"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst mapLeaderboard = await krunker.game.game.mapLeaderboard(mapName, { page, type, order });\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "mapName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "score",
                "time"
              ]
            }
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "enum": [
                0,
                1
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CommunityMapLeaderboard"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/mods/by-name/{modName}": {
      "get": {
        "operationId": "game.game.modByName",
        "summary": "Mod by Name",
        "description": "`{mod_id, name, description, creator_name, votes, featured, version, created_at, updated_at}`",
        "tags": [
          "game/game"
        ],
        "x-krapio": "krunker.game.game.modByName()",
        "x-routes": [
          "game.game.modByName"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst modByName = await krunker.game.game.modByName(modName);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "modName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ModInfo"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/titles": {
      "get": {
        "operationId": "game.game.titles",
        "summary": "Titles",
        "description": "Every player title with its requirement: `{id, name, desc, rarity, requirements: {kind, text} | null, active}[]`. Kinds seen: `challenge`, `bundle`, `blackmarket`.",
        "tags": [
          "game/game"
        ],
        "x-krapio": "krunker.game.game.titles()",
        "x-routes": [
          "game.game.titles"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst titles = await krunker.game.game.titles();\n"
          }
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Title"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/creators/events": {
      "get": {
        "operationId": "game.game.creatorEvents",
        "summary": "Creator Events",
        "description": "The menu's event and survey box: `{events: unknown[], polls: {id, title, description, ends_in}[]}`, `ends_in` in seconds.",
        "tags": [
          "game/game"
        ],
        "x-krapio": "krunker.game.game.creatorEvents()",
        "x-routes": [
          "game.game.creatorEvents"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst creatorEvents = await krunker.game.game.creatorEvents();\n"
          }
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CreatorEvents"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/items/{skinIndex}/view": {
      "get": {
        "operationId": "game.items.view",
        "summary": "Item View",
        "description": "The whole order book of the skin in one reply, not a page of it: every live listing (41 of 42 for Codefall Paint, the missing one had sold between two calls; the developer api's market endpoint pages 10), the top 100 owners, about two weeks of daily sales and the stats.\n\n```ts\ntype ItemView = {\n    stats: { onS: number; high: number; low: number; inC: number };\n    owners: { nm: string; ct: number; su: number; ft: number; cr: number }[];   // top 100 by count: name, count owned, staff, featured, cr\n    sales: { f: number; t: number; d: string }[];                              // kr, count, YYYY-MM-DD, days with a sale\n    listings: ItemListing[];\n    stackable: boolean;\n    wearable: boolean;\n};\n\ntype ItemListing = {\n    uid: number;\n    marketid: number;\n    skinid: number;         // the item instance\n    skinindex: number;\n    funds: number;          // ask in kr\n    seller_id: number;\n    seller_name: string;\n    listed_time: number;    // unix ms\n    m?: string;             // json text {\"wear\": 0.9013, \"serial\": 32}, only on wearable skins\n};\n```",
        "tags": [
          "game/items"
        ],
        "x-krapio": "krunker.game.items.view()",
        "x-routes": [
          "game.items.view"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst view = await krunker.game.items.view(skinIndex);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "skinIndex",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ItemView"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/items/{skinIndex}/sales": {
      "get": {
        "operationId": "game.items.sales",
        "summary": "Item Sales",
        "description": "Same rows as the market's sales statistics. The item page sends `range=6`, which reaches back about 120 days; `range=24` is answered 400 \"invalid sales range\".",
        "tags": [
          "game/items"
        ],
        "x-krapio": "krunker.game.items.sales()",
        "x-routes": [
          "game.items.sales"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst sales = await krunker.game.items.sales(skinIndex, range);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "skinIndex",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "range",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 6
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ItemSale"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/items/{skinIndex}/instances": {
      "get": {
        "operationId": "game.items.instances",
        "summary": "Item Instances",
        "description": "The Mints and Wear tabs of a non stackable skin (the serial numbered Season 10 items): every instance's holder name, serial and, on wearable skins, wear. Stackable skins answer `[]`. Capped at 100 rows and not pageable: `page`, `offset`, `limit` and `cursor` are ignored, and any sort other than `mint` and `wear` falls back to `mint`. So a skin with up to 100 instances is complete (Roselle: 60, Bren Gun: 64), a bigger one gives the 100 lowest serials and the 100 lowest wears.\n\n```ts\ntype ItemInstance = {\n    nm: string;       // holder's name\n    serial: number;\n    wear?: number;    // wearable skins only\n};\n```",
        "tags": [
          "game/items"
        ],
        "x-krapio": "krunker.game.items.instances()",
        "x-routes": [
          "game.items.instances"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst instances = await krunker.game.items.instances(skinIndex, sort);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "skinIndex",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "default": "mint"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ItemInstance"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/leaderboards/{type}": {
      "get": {
        "operationId": "game.leaderboards.players",
        "summary": "Player Leaderboards",
        "description": "`type` is one of `player_score`, `player_kills`, `player_wins`, `player_timeplayed`, `player_funds`, `player_followed`, `player_nukes`, `player_skinvalue`, `player_eventcount`, `player_ranked_matches`. 100 rows of `{position, player_name, player_clan, player_featured, value}`.",
        "tags": [
          "game/leaderboards"
        ],
        "x-krapio": "krunker.game.leaderboards.players()",
        "x-routes": [
          "game.leaderboards.players"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst players = await krunker.game.leaderboards.players(type, { sort, season });\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "type",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "player_score",
                "player_kills",
                "player_wins",
                "player_timeplayed",
                "player_funds",
                "player_followed",
                "player_nukes",
                "player_skinvalue",
                "player_eventcount",
                "player_ranked_matches"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "season",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PlayerLeaderboardRow"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/leaderboards/player_clan": {
      "get": {
        "operationId": "game.leaderboards.clans",
        "summary": "Clan Leaderboard",
        "description": "100 rows of `{position, clan_name, clan_score, member_count, hack_count}`.",
        "tags": [
          "game/leaderboards"
        ],
        "x-krapio": "krunker.game.leaderboards.clans()",
        "x-routes": [
          "game.leaderboards.clans"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst clans = await krunker.game.leaderboards.clans(sort);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "score",
                "members"
              ],
              "default": "score"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ClanLeaderboardRow"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/leaderboards/raids/{mapId}": {
      "get": {
        "operationId": "game.leaderboards.raids",
        "summary": "Raid Leaderboard",
        "description": "100 rows of `{position, player_name, player_clan, best_time, completions}`, `best_time` in milliseconds. Map ids with a raid board in October 2026: 18, 29, 31, 35 and 43 (`RAID_MAPS`). Any other id is a 400 `invalid raid map ID`.",
        "tags": [
          "game/leaderboards"
        ],
        "x-krapio": "krunker.game.leaderboards.raids()",
        "x-routes": [
          "game.leaderboards.raids"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst raids = await krunker.game.leaderboards.raids(mapId, sort);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "mapId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "time",
                "completions"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/RaidLeaderboardRow"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/leaderboards/raids/{mapId}/monthly": {
      "get": {
        "operationId": "game.leaderboards.raidsMonthly",
        "summary": "Monthly Raid Leaderboard",
        "description": "`month` is required, as `YYYY-MM` (what the game sends). A bare number like `8` is also answered, with different rows of unknown meaning, so krapio only accepts `YYYY-MM`. A month without runs answers `{\"data\": null}`, which krapio returns as `[]`.",
        "tags": [
          "game/leaderboards"
        ],
        "x-krapio": "krunker.game.leaderboards.raidsMonthly()",
        "x-routes": [
          "game.leaderboards.raidsMonthly"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst raidsMonthly = await krunker.game.leaderboards.raidsMonthly(mapId, month, sort);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "mapId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "month",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])$",
              "example": "2026-10"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "time",
                "completions"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "anyOf": [
                        {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/RaidLeaderboardRow"
                          }
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/leaderboards/krunkcup/teams": {
      "get": {
        "operationId": "game.leaderboards.krunkCupTeams",
        "summary": "KrunkCup",
        "description": "Teams are `{id, total_kills, total_score, total_games}`. Contributors and players are `{position, player_name, player_clan, kills, score, games}`.",
        "tags": [
          "game/leaderboards"
        ],
        "x-krapio": "krunker.game.leaderboards.krunkCupTeams()",
        "x-routes": [
          "game.leaderboards.krunkCupTeams"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst krunkCupTeams = await krunker.game.leaderboards.krunkCupTeams();\n"
          }
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/KrunkCupTeam"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/leaderboards/krunkcup/teams/{teamId}/contributors": {
      "get": {
        "operationId": "game.leaderboards.krunkCupContributors",
        "summary": "KrunkCup",
        "description": "Teams are `{id, total_kills, total_score, total_games}`. Contributors and players are `{position, player_name, player_clan, kills, score, games}`.",
        "tags": [
          "game/leaderboards"
        ],
        "x-krapio": "krunker.game.leaderboards.krunkCupContributors()",
        "x-routes": [
          "game.leaderboards.krunkCupContributors"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst krunkCupContributors = await krunker.game.leaderboards.krunkCupContributors(teamId);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "teamId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/KrunkCupPlayerRow"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/leaderboards/krunkcup/players": {
      "get": {
        "operationId": "game.leaderboards.krunkCupPlayers",
        "summary": "KrunkCup",
        "description": "Teams are `{id, total_kills, total_score, total_games}`. Contributors and players are `{position, player_name, player_clan, kills, score, games}`.",
        "tags": [
          "game/leaderboards"
        ],
        "x-krapio": "krunker.game.leaderboards.krunkCupPlayers()",
        "x-routes": [
          "game.leaderboards.krunkCupPlayers"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst krunkCupPlayers = await krunker.game.leaderboards.krunkCupPlayers(limit);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/KrunkCupPlayerRow"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/webhooks/general/maps/list": {
      "get": {
        "operationId": "game.legacy.mapsList",
        "summary": "Map Browser",
        "description": "`index` is the category tab, `pos` the page, both 0 based. `{index, data: {map_id, map_name, map_votes, creatorname, map_featured, map_info, map_updatecounter, map_pl, fund, category, partner, map_date}[]}`, `map_info` is JSON text.",
        "tags": [
          "game/legacy"
        ],
        "x-krapio": "krunker.game.legacy.mapsList()",
        "x-routes": [
          "game.legacy.mapsList"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst mapsList = await krunker.game.legacy.mapsList({ index, pos });\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "index",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "pos",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegacyMapList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.krunker.io"
          }
        ]
      }
    },
    "/webhooks/general/mods/list": {
      "get": {
        "operationId": "game.legacy.modsList",
        "summary": "Mod Browser",
        "description": "`{index, data: {mod_id, mod_name, mod_votes, creatorname, mod_featured, mod_url, mod_info, mod_updatecounter}[]}`.",
        "tags": [
          "game/legacy"
        ],
        "x-krapio": "krunker.game.legacy.modsList()",
        "x-routes": [
          "game.legacy.modsList"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst modsList = await krunker.game.legacy.modsList({ index, pos });\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "index",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "pos",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LegacyModList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.krunker.io"
          }
        ]
      }
    },
    "/webhooks/general/items/prices": {
      "get": {
        "operationId": "game.legacy.itemPrices",
        "summary": "Item Prices",
        "description": "The kr value per skin the inventory shows: an array indexed by skin index, `null` where there is no price. About 8000 entries, 38 KB.",
        "tags": [
          "game/legacy"
        ],
        "x-krapio": "krunker.game.legacy.itemPrices()",
        "x-routes": [
          "game.legacy.itemPrices"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst itemPrices = await krunker.game.legacy.itemPrices();\n"
          }
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ItemPrices"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.krunker.io"
          }
        ]
      }
    },
    "/streams/top": {
      "get": {
        "operationId": "game.legacy.topStreams",
        "summary": "Top Streams",
        "description": "The menu's stream box plus the running drop campaigns. krapio unwraps the `data` key.\n\n```ts\ntype TopStreams = {\n    streams: { id: string; username: string; title: string; viewerCount: number; thumbnailUrl: string; startedAt: string; provider: string; featured: boolean; languageCode: string }[];\n    promo: boolean;\n    dropCampaigns: { name: string; startDate: number; endDate: number; drops: { itemId: number }[]; startDateISO: string; endDateISO: string }[];\n};\n```",
        "tags": [
          "game/legacy"
        ],
        "x-krapio": "krunker.game.legacy.topStreams()",
        "x-routes": [
          "game.legacy.topStreams"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst topStreams = await krunker.game.legacy.topStreams();\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "cb",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "const": 2
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TopStreams"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.krunker.io"
          }
        ]
      }
    },
    "/market/stats": {
      "get": {
        "operationId": "game.market.stats",
        "summary": "Market Stats",
        "description": "| Name | Type | Description |\n| --- | --- | --- |\n| cursor | int | `next_cursor` of the previous page |\n| limit | int | 1 to 100 |\n| sort | string | `rarity` is what the market tab sends; an unknown value is answered with the default order |\n| rarities, weapons, types | int list | comma separated filters |\n| season | int | |\n| searchTerm | string | |\n\n```ts\ntype MarketStats = {\n    stats: { ski: number; inC: number; onS: number; high?: number; low?: number }[];\n    has_more: boolean;\n    next_cursor: number | null;\n};\n```\n\n`ski` is the skin index, `inC` the count in circulation, `onS` the count on sale, `high` and `low` the ask range while something is listed (seen with `sort=rarity`, absent under other sorts). `onS` of a non tradable skin is noise: Atlantean Armour reports 20 on sale with zero listings anywhere.",
        "tags": [
          "game/market"
        ],
        "x-krapio": "krunker.game.market.stats()",
        "x-routes": [
          "game.market.stats"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst stats = await krunker.game.market.stats({ cursor, limit, sort, rarities, weapons, types, season, searchTerm });\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rarities",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "style": "form",
            "explode": false
          },
          {
            "name": "weapons",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "style": "form",
            "explode": false
          },
          {
            "name": "types",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "style": "form",
            "explode": false
          },
          {
            "name": "season",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "searchTerm",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MarketStats"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/market/items/{skinIndex}/sales": {
      "get": {
        "operationId": "game.market.itemSales",
        "summary": "Item Sales Info",
        "description": "Despite the path, no sales: the ask range, the circulation and the player ids of the top owners.\n\n```ts\ntype ItemSalesInfo = {\n    ind: number;        // skin index\n    high: number;       // highest ask, 0 without listings\n    low: number;        // lowest ask, 0 without listings\n    inC: number;        // count in circulation\n    owners: number[];   // player ids of the top 100 owners, the same 100 the item view lists\n};\n```\n\nThe id list is capped at 100 and is never the whole owner base (Soul Essence, 6.7 million in circulation: 100 ids; Flame Tamer: 61 ids, and 61 owners on the item view). Measured 2026-10-17.",
        "tags": [
          "game/market"
        ],
        "x-krapio": "krunker.game.market.itemSales()",
        "x-routes": [
          "game.market.itemSales"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst itemSales = await krunker.game.market.itemSales(skinIndex);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "skinIndex",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ItemSalesInfo"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/market/items/{skinIndex}/sales-statistics": {
      "get": {
        "operationId": "game.market.itemSalesStatistics",
        "summary": "Item Sales Statistics",
        "description": "One row per day with a sale: `{f, t, d}[]` (kr, count, `YYYY-MM-DD`). Reaches back about 85 days whatever `daysback` says (measured 2026-10-17 with 3650).",
        "tags": [
          "game/market"
        ],
        "x-krapio": "krunker.game.market.itemSalesStatistics()",
        "x-routes": [
          "game.market.itemSalesStatistics"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst itemSalesStatistics = await krunker.game.market.itemSalesStatistics(skinIndex, daysBack);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "skinIndex",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "daysback",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 30
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/ItemSale"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/game-list": {
      "get": {
        "operationId": "game.matchmaker.gameList",
        "summary": "Game List",
        "description": "Every public lobby, about 47 KB.\n\n```ts\ntype GameList = {\n    games: GameListEntry[];\n    totalPlayerCount: number;\n};\n\n// [game id, region key, players, max players, options, seconds left]\ntype GameListEntry = [string, string, number, number, GameOptions, number];\n\ntype GameOptions = {\n    v: string;      // game version\n    g: number;      // gamemode id\n    c: number;      // custom game\n    cm: number;\n    m: number;      // map index\n    i: string;      // map name\n};\n```",
        "tags": [
          "game/matchmaker"
        ],
        "x-krapio": "krunker.game.matchmaker.gameList()",
        "x-routes": [
          "game.matchmaker.gameList"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst gameList = await krunker.game.matchmaker.gameList();\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "hostname",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "const": "krunker.io"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GameList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://matchmaker.krunker.io"
          }
        ]
      }
    },
    "/ping-list": {
      "get": {
        "operationId": "game.matchmaker.pingList",
        "summary": "Ping List",
        "description": "Region key (as in a game entry) to a lobby `host:port` to ping.",
        "tags": [
          "game/matchmaker"
        ],
        "x-krapio": "krunker.game.matchmaker.pingList()",
        "x-routes": [
          "game.matchmaker.pingList"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst pingList = await krunker.game.matchmaker.pingList();\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "hostname",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "const": "krunker.io"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PingList"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://matchmaker.krunker.io"
          }
        ]
      }
    },
    "/game-info": {
      "get": {
        "operationId": "game.matchmaker.gameInfo",
        "summary": "Game Info",
        "description": "One lobby as a game list entry. Ids look like `FRA:4kpj2`.",
        "tags": [
          "game/matchmaker"
        ],
        "x-krapio": "krunker.game.matchmaker.gameInfo()",
        "x-routes": [
          "game.matchmaker.gameInfo"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst gameInfo = await krunker.game.matchmaker.gameInfo(gameId);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "game",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GameListEntry"
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://matchmaker.krunker.io"
          }
        ]
      }
    },
    "/players/{playerName}": {
      "get": {
        "operationId": "game.players.get",
        "summary": "Get Player",
        "description": "The flat legacy profile the social popup renders. 404 `PLAYERS_NOT_FOUND` for an unknown name.\n\n```ts\ntype PlayerSocialProfile = {\n    player_id: number;\n    player_name: string;\n    player_clan?: string;          // absent without a clan\n    clan_id?: number;\n    player_twitchname: string;\n    player_region: number;\n    player_badge: string;          // comma separated badge ids\n    player_titles: string;         // comma separated title ids\n    player_datenew: string;        // \"YYYY-MM-DD HH:MM:SS\"\n    player_featured: number;\n    player_funds: number;          // kr\n    player_skinvalue: number;\n    player_elo: number;\n    player_elo2: number;\n    player_elo4: string;           // junk rating, a decimal as text\n    player_premium: number;\n    player_kills: number;\n    player_deaths: number;\n    player_wins: number;\n    player_games_played: number;\n    player_score: number;\n    player_timeplayed: number;     // seconds\n    player_following: number;\n    player_followed: number;\n    player_chal: number;\n    player_infected: number;\n    player_jobrating: number;\n    player_jobratingpositive: number;\n    player_calls: number;\n    player_taggedaccounts: number;\n    player_stats: PlayerStats;\n    online: number;\n    maps: unknown[];\n    mods: unknown[];\n    assets: unknown[];\n    match_history: MatchHistoryGame[];   // only ever seen empty, shape from the game code\n    ranked_rank: number;\n    raid_stats: RaidStats[];\n};\n```\n\n`player_stats` is a packed blob with short keys. The developer API's player profile has the same numbers under full names.\n\n| Key | Meaning |\n| --- | --- |\n| s, h, hs, ls, wb | shots, hits, headshots, legshots, wallbangs |\n| mk, fk, tmk | melee kills, fist kills (beatdowns), thrown weapon kills (bullseyes) |\n| ast, n, ad, sad | assists, nukes, airdrops, airdrops stolen |\n| sl, wm | slimes, warmachines |\n| flg | country flag index |\n| hds | 1 when the profile hides details |\n| c0 to c15 | score per class |\n\n`raid_stats` rows are `{map_id, completions, attempts, best_time, ai_kills, boss_kills, deaths}`.",
        "tags": [
          "game/players"
        ],
        "x-krapio": "krunker.game.players.get()",
        "x-routes": [
          "game.players.get"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst get = await krunker.game.players.get(playerName);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "playerName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "NulPing"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/PlayerSocialProfile"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/players/search": {
      "get": {
        "operationId": "game.players.search",
        "summary": "Search Players",
        "description": "Prefix match on the name, `limit` 1 to 20. Returns `{player_id, player_name, player_score}[]` (krapio unwraps the `results` key).",
        "tags": [
          "game/players"
        ],
        "x-krapio": "krunker.game.players.search()",
        "x-routes": [
          "game.players.search"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst search = await krunker.game.players.search(query, limit);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 5
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "results": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PlayerSearchResult"
                          }
                        }
                      },
                      "required": [
                        "results"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/players/{playerName}/sales": {
      "get": {
        "operationId": "game.players.sales",
        "summary": "Get Player Sales",
        "description": "One row per day with market sales: `{f, t, d}[]` where `f` is kr earned, `t` items sold, `d` the day as `YYYY-MM-DD`. The popup sends `range=3`.",
        "tags": [
          "game/players"
        ],
        "x-krapio": "krunker.game.players.sales()",
        "x-routes": [
          "game.players.sales"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst sales = await krunker.game.players.sales(playerName, range);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "playerName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "NulPing"
            }
          },
          {
            "name": "range",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 3
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PlayerSale"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/players/{playerName}/listings": {
      "get": {
        "operationId": "game.players.listings",
        "summary": "Get Player Listings",
        "description": "Only ever answered `[]`. The developer API's player listings endpoint has the real data.",
        "tags": [
          "game/players"
        ],
        "x-krapio": "krunker.game.players.listings()",
        "x-routes": [
          "game.players.listings"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst listings = await krunker.game.players.listings(playerName);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "playerName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "NulPing"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {}
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/players/{playerName}/followers": {
      "get": {
        "operationId": "game.players.followers",
        "summary": "Get Followers and Following",
        "description": "`{player_id, player_name, date, follow_state}[]`, 100 rows at most.",
        "tags": [
          "game/players"
        ],
        "x-krapio": "krunker.game.players.followers()",
        "x-routes": [
          "game.players.followers"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst followers = await krunker.game.players.followers(playerName);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "playerName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "NulPing"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PlayerFollow"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/players/{playerName}/following": {
      "get": {
        "operationId": "game.players.following",
        "summary": "Get Followers and Following",
        "description": "`{player_id, player_name, date, follow_state}[]`, 100 rows at most.",
        "tags": [
          "game/players"
        ],
        "x-krapio": "krunker.game.players.following()",
        "x-routes": [
          "game.players.following"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst following = await krunker.game.players.following(playerName);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "playerName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "NulPing"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/PlayerFollow"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/social/feed": {
      "get": {
        "operationId": "game.players.feed",
        "summary": "Get Player Feed",
        "description": "A player's posts, `limit` 1 to 50. krapio returns the `posts` array of `FeedPost` (see [Social](#social) for the keys).\n\n`global` is the only tab seen; an unknown one is a 400 `SOCIAL_INVALID_TAB`. `limit` 1 to 50. krapio returns the `posts` array.\n\n```ts\ntype FeedPost = {\n    pid: number;      // post id\n    pln: string;      // poster name\n    pli: number;      // poster id\n    tim: number;\n    lnk: string;\n    txt: string;\n    ftr: number;\n    typ: number;\n    cln: string;\n    flw: number;\n    clr: number;\n    prm: number;\n    lnk2: string;\n    vot: number;      // votes\n    dlk: number;\n    cnt: number;      // comment count\n    exp: number;\n    fds: number;\n};\n```",
        "tags": [
          "game/players",
          "game/social"
        ],
        "x-krapio": [
          "krunker.game.players.feed()",
          "krunker.game.social.feed()"
        ],
        "x-routes": [
          "game.players.feed",
          "game.social.feed"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio: players.feed",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst feed = await krunker.game.players.feed(playerId, limit);\n"
          },
          {
            "lang": "ts",
            "label": "krapio: social.feed",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst feed = await krunker.game.social.feed(tab, limit);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "player_id",
            "in": "query",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          },
          {
            "name": "tab",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "minLength": 1,
              "default": "global"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "object",
                      "properties": {
                        "posts": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/FeedPost"
                          }
                        }
                      },
                      "required": [
                        "posts"
                      ]
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/shop/displays/{displayId}": {
      "get": {
        "operationId": "game.shop.display",
        "summary": "Display",
        "description": "Display 1 is the front page, `tag=premium` is what the menu asks for. `/shop/displays` without a tag answers 400.\n\n```ts\ntype ShopDisplay = {\n    id: number;\n    type: string;\n    order: number;\n    data: Record<string, unknown>;\n    children: { id: number; parent_id: number; order: number; type: string; data: Record<string, unknown>; product_id?: number }[];\n    products: Record<string, ShopProduct>;\n};\n\ntype ShopProduct = {\n    id: number;\n    name: string;\n    description: string;\n    image_url: string;\n    active: boolean;\n    prices: { id: number; price_ref: string; type: string; real?: { price_usd: number }; recurring?: { amount: number; periodicity: string }; available: boolean }[];\n    contents: { id: number; type: string; ref: string; quantity: number }[];\n    available: boolean;\n    display_ids: number[];\n};\n```",
        "tags": [
          "game/shop"
        ],
        "x-krapio": "krunker.game.shop.display()",
        "x-routes": [
          "game.shop.display"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst display = await krunker.game.shop.display(displayId);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "displayId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ShopDisplay"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/shop/displays": {
      "get": {
        "operationId": "game.shop.displayByTag",
        "summary": "Display",
        "description": "Display 1 is the front page, `tag=premium` is what the menu asks for. `/shop/displays` without a tag answers 400.\n\n```ts\ntype ShopDisplay = {\n    id: number;\n    type: string;\n    order: number;\n    data: Record<string, unknown>;\n    children: { id: number; parent_id: number; order: number; type: string; data: Record<string, unknown>; product_id?: number }[];\n    products: Record<string, ShopProduct>;\n};\n\ntype ShopProduct = {\n    id: number;\n    name: string;\n    description: string;\n    image_url: string;\n    active: boolean;\n    prices: { id: number; price_ref: string; type: string; real?: { price_usd: number }; recurring?: { amount: number; periodicity: string }; available: boolean }[];\n    contents: { id: number; type: string; ref: string; quantity: number }[];\n    available: boolean;\n    display_ids: number[];\n};\n```",
        "tags": [
          "game/shop"
        ],
        "x-krapio": "krunker.game.shop.displayByTag()",
        "x-routes": [
          "game.shop.displayByTag"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst displayByTag = await krunker.game.shop.displayByTag(tag);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "tag",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/ShopDisplay"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/spins/wheels": {
      "get": {
        "operationId": "game.shop.spinWheels",
        "summary": "Spin Wheels",
        "description": "Every wheel with its pools and weights: `{index, name, price, ticketIndex, ticketOnly, multi, poolWeights, pools: {id, name, color, weight, items}[]}[]`, `items` are skin indices.",
        "tags": [
          "game/shop"
        ],
        "x-krapio": "krunker.game.shop.spinWheels()",
        "x-routes": [
          "game.shop.spinWheels"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst spinWheels = await krunker.game.shop.spinWheels();\n"
          }
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/SpinWheel"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/lottery/{lotteryId}": {
      "get": {
        "operationId": "game.shop.lottery",
        "summary": "Lottery",
        "description": "Id 1 is the running one. `{lottery: {id, title, frequency, theme}, player_entries, total_entries, previous_draws: {id, lottery_id, starts_at, ends_at, drawn_at, prizes}[]}`. `player_entries` is 0 without a token.",
        "tags": [
          "game/shop"
        ],
        "x-krapio": "krunker.game.shop.lottery()",
        "x-routes": [
          "game.shop.lottery"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst lottery = await krunker.game.shop.lottery(lotteryId);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "lotteryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Lottery"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/social/post/{postId}": {
      "get": {
        "operationId": "game.social.post",
        "summary": "Post",
        "description": "`{post: FeedPost, comments: unknown[]}`.",
        "tags": [
          "game/social"
        ],
        "x-krapio": "krunker.game.social.post()",
        "x-routes": [
          "game.social.post"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst post = await krunker.game.social.post(postId);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "postId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SocialPost"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/social/news": {
      "get": {
        "operationId": "game.social.news",
        "summary": "News",
        "description": "`{news: unknown[]}`, only seen empty.",
        "tags": [
          "game/social"
        ],
        "x-krapio": "krunker.game.social.news()",
        "x-routes": [
          "game.social.news"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst news = await krunker.game.social.news();\n"
          }
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SocialNews"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/territorial-wars/status": {
      "get": {
        "operationId": "game.turf.status",
        "summary": "Get Status",
        "description": "Every Turf map with its current owner and the top 5 clans.\n\n```ts\ntype TurfStatus = {\n    map_id: number;\n    map_name: string;\n    clan_id: number;               // the owner\n    clan_name: string;\n    clan_logo: number | null;\n    kills: number;\n    games: number;\n    reward: number | null;\n    leaderboard: { position: number; clan_id: number; clan_name: string; clan_logo: number | null; kills: number; deaths: number }[];\n    total_kills_today: number;\n    guaranteed_reward: number;\n    estimated_reward: number;\n};\n```",
        "tags": [
          "game/turf"
        ],
        "x-krapio": "krunker.game.turf.status()",
        "x-routes": [
          "game.turf.status"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst status = await krunker.game.turf.status();\n"
          }
        ],
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TurfStatus"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/territorial-wars/clan/{clanId}": {
      "get": {
        "operationId": "game.turf.clan",
        "summary": "Get Clan",
        "description": "```ts\ntype TurfClan = {\n    clan_id: number;\n    clan_name: string;\n    clan_logo: number | null;\n    current_day: number;\n    maps: TurfClanMap[];\n    historical_days: Omit<TurfClanMap, \"games\">[];\n};\n\ntype TurfClanMap = {\n    map_id: number;\n    map_name: string;\n    day: number;\n    kills: number;\n    deaths: number;\n    games: number;\n    position: number;\n    comparison_kills: number;      // the clan one position up\n    comparison_deaths: number;\n    comparison_clan_name: string;\n    comparison_clan_id: number;\n    comparison_clan_logo: number | null;\n    comparison_position: number;\n};\n```",
        "tags": [
          "game/turf"
        ],
        "x-krapio": "krunker.game.turf.clan()",
        "x-routes": [
          "game.turf.clan"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst clan = await krunker.game.turf.clan(clanId);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "clanId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TurfClan"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/territorial-wars/clan/{clanId}/players": {
      "get": {
        "operationId": "game.turf.clanPlayers",
        "summary": "Get Clan Players",
        "description": "Today without `day`. Rows are `{player_id, player_name, kills, deaths, games, kd}`.",
        "tags": [
          "game/turf"
        ],
        "x-krapio": "krunker.game.turf.clanPlayers()",
        "x-routes": [
          "game.turf.clanPlayers"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst clanPlayers = await krunker.game.turf.clanPlayers(clanId, { day, map_id });\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "clanId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "day",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "map_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TurfPlayerRow"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/territorial-wars/clan/{clanId}/earnings": {
      "get": {
        "operationId": "game.turf.clanEarnings",
        "summary": "Get Clan Earnings",
        "description": "`{day, map_id, map_name, reward}[]`.",
        "tags": [
          "game/turf"
        ],
        "x-krapio": "krunker.game.turf.clanEarnings()",
        "x-routes": [
          "game.turf.clanEarnings"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst clanEarnings = await krunker.game.turf.clanEarnings(clanId);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "clanId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TurfClanEarning"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/territorial-wars/clan/{clanId}/payouts": {
      "get": {
        "operationId": "game.turf.clanPayouts",
        "summary": "Get Clan Payouts",
        "description": "Season totals without `day`. `{payouts: {player_id, player_name, total_kr}[], total}`.",
        "tags": [
          "game/turf"
        ],
        "x-krapio": "krunker.game.turf.clanPayouts()",
        "x-routes": [
          "game.turf.clanPayouts"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst clanPayouts = await krunker.game.turf.clanPayouts(clanId, day);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "clanId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "day",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TurfPayouts"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/territorial-wars/leaderboards/top-performing-clans": {
      "get": {
        "operationId": "game.turf.topClans",
        "summary": "Top Performing Clans",
        "description": "`clan_name` is an exact match filter. Rows: `{position, clan_id, clan_name, clan_logo, kills, deaths, games, kd}`.",
        "tags": [
          "game/turf"
        ],
        "x-krapio": "krunker.game.turf.topClans()",
        "x-routes": [
          "game.turf.topClans"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst topClans = await krunker.game.turf.topClans({ day, map_id, clan_name });\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "day",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "map_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "clan_name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TurfTopClan"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/territorial-wars/leaderboards/top-grossing-clans": {
      "get": {
        "operationId": "game.turf.topGrossing",
        "summary": "Top Grossing Clans",
        "description": "Rows: `{position, clan_id, clan_name, clan_logo, total_kr, distributed, bank}`.",
        "tags": [
          "game/turf"
        ],
        "x-krapio": "krunker.game.turf.topGrossing()",
        "x-routes": [
          "game.turf.topGrossing"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst topGrossing = await krunker.game.turf.topGrossing(clanName);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "clan_name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TurfTopGrossingClan"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/territorial-wars/leaderboards/top-performing-players": {
      "get": {
        "operationId": "game.turf.topPlayers",
        "summary": "Top Performing Players",
        "description": "Slow, several seconds. Rows: `{position, player_id, player_name, clan_id, clan_name, kills, deaths, games, kd, earnings}`.",
        "tags": [
          "game/turf"
        ],
        "x-krapio": "krunker.game.turf.topPlayers()",
        "x-routes": [
          "game.turf.topPlayers"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst topPlayers = await krunker.game.turf.topPlayers({ map_id, player_name });\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "map_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "player_name",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TurfTopPlayer"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/territorial-wars/player/{playerId}": {
      "get": {
        "operationId": "game.turf.player",
        "summary": "Get Player",
        "description": "Also the way to resolve a stored player id to the current name.\n\n`{player_id, player_name, current_clan, current_clan_id, current_clan_logo, total_kills, total_deaths, total_games, kd, total_kr, first_day, last_day}`",
        "tags": [
          "game/turf"
        ],
        "x-krapio": "krunker.game.turf.player()",
        "x-routes": [
          "game.turf.player"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst player = await krunker.game.turf.player(playerId);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TurfPlayer"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/territorial-wars/player/{playerId}/contributions": {
      "get": {
        "operationId": "game.turf.playerContributions",
        "summary": "Get Player Contributions",
        "description": "Every day and map of the season without `day`. Rows: `{day, clan_id, clan_name, map_id, map_name, kills, deaths, games, kd}`.",
        "tags": [
          "game/turf"
        ],
        "x-krapio": "krunker.game.turf.playerContributions()",
        "x-routes": [
          "game.turf.playerContributions"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst playerContributions = await krunker.game.turf.playerContributions(playerId, day);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "day",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TurfContribution"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/territorial-wars/player/{playerId}/earnings": {
      "get": {
        "operationId": "game.turf.playerEarnings",
        "summary": "Get Player Earnings",
        "description": "`{day, map_id, map_name, clan_id, clan_name, amount}[]`.",
        "tags": [
          "game/turf"
        ],
        "x-krapio": "krunker.game.turf.playerEarnings()",
        "x-routes": [
          "game.turf.playerEarnings"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst playerEarnings = await krunker.game.turf.playerEarnings(playerId);\n"
          }
        ],
        "security": [],
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/TurfPlayerEarning"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/clans/my-applications": {
      "get": {
        "operationId": "token.creator.clanApplications",
        "summary": "Clan Applications",
        "description": "`me.creator.clanApplications()`\n\n`{clan_ids: number[] | null}`, null without any.",
        "tags": [
          "token/creator"
        ],
        "x-krapio": "krunker.as(token).creator.clanApplications()",
        "x-routes": [
          "token.creator.clanApplications"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst clanApplications = await krunker.as(token).creator.clanApplications();\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MyApplications"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/maps/{mapId}/versions": {
      "get": {
        "operationId": "token.creator.mapVersions",
        "summary": "Map Versions",
        "description": "`me.creator.mapVersions(mapId)`\n\nThe version history of an own map, empty for a map that is not yours.",
        "tags": [
          "token/creator"
        ],
        "x-krapio": "krunker.as(token).creator.mapVersions()",
        "x-routes": [
          "token.creator.mapVersions"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst mapVersions = await krunker.as(token).creator.mapVersions(mapId);\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "mapId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {}
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/maps/{mapId}/data": {
      "get": {
        "operationId": "token.creator.mapData",
        "summary": "Map Data",
        "description": "`me.creator.mapData(mapId, playerName)`\n\nA map's stored key value data for one player (the key value store of map scripts).",
        "tags": [
          "token/creator"
        ],
        "x-krapio": "krunker.as(token).creator.mapData()",
        "x-routes": [
          "token.creator.mapData"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst mapData = await krunker.as(token).creator.mapData(mapId, playerName);\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "mapId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "player",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {},
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/studios/mine": {
      "get": {
        "operationId": "token.creator.studios",
        "summary": "Studios",
        "description": "`me.creator.studios()`, `.studioInvites()`, `.studio(id)`, `.studioMonetization(id)`, `.studioAnalytics(id)`, `.studioSkins(id)`",
        "tags": [
          "token/creator"
        ],
        "x-krapio": "krunker.as(token).creator.studios()",
        "x-routes": [
          "token.creator.studios"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst studios = await krunker.as(token).creator.studios();\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {}
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/studios/invites": {
      "get": {
        "operationId": "token.creator.studioInvites",
        "summary": "Studios",
        "description": "`me.creator.studios()`, `.studioInvites()`, `.studio(id)`, `.studioMonetization(id)`, `.studioAnalytics(id)`, `.studioSkins(id)`",
        "tags": [
          "token/creator"
        ],
        "x-krapio": "krunker.as(token).creator.studioInvites()",
        "x-routes": [
          "token.creator.studioInvites"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst studioInvites = await krunker.as(token).creator.studioInvites();\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {}
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/studios/{studioId}": {
      "get": {
        "operationId": "token.creator.studio",
        "summary": "Studios",
        "description": "`me.creator.studios()`, `.studioInvites()`, `.studio(id)`, `.studioMonetization(id)`, `.studioAnalytics(id)`, `.studioSkins(id)`",
        "tags": [
          "token/creator"
        ],
        "x-krapio": "krunker.as(token).creator.studio()",
        "x-routes": [
          "token.creator.studio"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst studio = await krunker.as(token).creator.studio(studioId);\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "studioId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {},
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/studios/{studioId}/monetization": {
      "get": {
        "operationId": "token.creator.studioMonetization",
        "summary": "Studios",
        "description": "`me.creator.studios()`, `.studioInvites()`, `.studio(id)`, `.studioMonetization(id)`, `.studioAnalytics(id)`, `.studioSkins(id)`",
        "tags": [
          "token/creator"
        ],
        "x-krapio": "krunker.as(token).creator.studioMonetization()",
        "x-routes": [
          "token.creator.studioMonetization"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst studioMonetization = await krunker.as(token).creator.studioMonetization(studioId);\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "studioId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {},
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/studios/{studioId}/analytics": {
      "get": {
        "operationId": "token.creator.studioAnalytics",
        "summary": "Studios",
        "description": "`me.creator.studios()`, `.studioInvites()`, `.studio(id)`, `.studioMonetization(id)`, `.studioAnalytics(id)`, `.studioSkins(id)`",
        "tags": [
          "token/creator"
        ],
        "x-krapio": "krunker.as(token).creator.studioAnalytics()",
        "x-routes": [
          "token.creator.studioAnalytics"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst studioAnalytics = await krunker.as(token).creator.studioAnalytics(studioId);\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "studioId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {},
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/studios/{studioId}/skins": {
      "get": {
        "operationId": "token.creator.studioSkins",
        "summary": "Studios",
        "description": "`me.creator.studios()`, `.studioInvites()`, `.studio(id)`, `.studioMonetization(id)`, `.studioAnalytics(id)`, `.studioSkins(id)`",
        "tags": [
          "token/creator"
        ],
        "x-krapio": "krunker.as(token).creator.studioSkins()",
        "x-routes": [
          "token.creator.studioSkins"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst studioSkins = await krunker.as(token).creator.studioSkins(studioId);\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "studioId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {}
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/market/listings": {
      "get": {
        "operationId": "token.market.listings",
        "summary": "Listings",
        "description": "`me.market.listings({ item_id, items, sort, cursor_id, limit, rarities, weapons, types, wears, season, painted, searchTerm })`\n\nWhat the market tab shows. A token is required although the data is not about the player.\n\n| Name | Type | Description |\n| --- | --- | --- |\n| item_id | int | one skin index |\n| items | int list | several skin indices |\n| sort | string | `latest`, `price_asc`, `price_desc` or `popular` |\n| cursor_id | int | the last `uid` of the previous page |\n| limit | int | 1 to 100 |\n| rarities, weapons, types, wears | int list | comma separated filters |\n| season | int | |\n| painted | bool | sent as `1` when true |\n| searchTerm | string | |\n\n```ts\ntype MarketListings = {\n    listings: LiveListing[];\n    has_more: boolean;\n    next_cursor_id: number | null;   // the cursor_id of the next page\n};\n\ntype LiveListing = {\n    uid: number;\n    marketid: number;\n    skinid: number;          // the item instance\n    skinindex: number;\n    funds: number;           // asking price in kr\n    seller_id: number;\n    seller_name: string;\n    listed_time: number;     // unix ms\n    listing_count: number;   // how many of this skin the seller has listed\n};\n```\n\n100 listings per page. Opening the market tab loads `sort=latest`; browsing by price walks `sort=price_asc` page by page through `next_cursor_id` (13 pages in 4 seconds in one recording), an item page loads `item_id=&sort=price_asc`.",
        "tags": [
          "token/market"
        ],
        "x-krapio": "krunker.as(token).market.listings()",
        "x-routes": [
          "token.market.listings"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst listings = await krunker.as(token).market.listings({ item_id, items, sort, cursor_id, limit, rarities, weapons, types, wears, season, painted, searchTerm });\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "item_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "items",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "style": "form",
            "explode": false
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "latest",
                "price_asc",
                "price_desc",
                "popular"
              ]
            }
          },
          {
            "name": "cursor_id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "rarities",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "style": "form",
            "explode": false
          },
          {
            "name": "weapons",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "style": "form",
            "explode": false
          },
          {
            "name": "types",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "style": "form",
            "explode": false
          },
          {
            "name": "wears",
            "in": "query",
            "required": false,
            "schema": {
              "type": "array",
              "items": {
                "type": "integer"
              }
            },
            "style": "form",
            "explode": false
          },
          {
            "name": "season",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "painted",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "const": 1
            },
            "description": "sent as 1 when `painted` is set"
          },
          {
            "name": "searchTerm",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MarketListings"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/market/inventory": {
      "get": {
        "operationId": "token.market.inventory",
        "summary": "Inventory",
        "description": "`me.market.inventory()`\n\nThe player's stacks: `{i, cnt, sid, st}[]` (skin index, count, instance id, state).",
        "tags": [
          "token/market"
        ],
        "x-krapio": "krunker.as(token).market.inventory()",
        "x-routes": [
          "token.market.inventory"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst inventory = await krunker.as(token).market.inventory();\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/InventoryStack"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/market/sales": {
      "get": {
        "operationId": "token.market.sales",
        "summary": "Sales",
        "description": "`me.market.sales()`\n\nThe player's own open listings, `[]` when there are none.\n\n```ts\ntype OpenListing = {\n    uid: number;\n    marketid: number;\n    skinid: number;          // the item instance\n    skinindex: number;\n    funds: number;           // asking price in kr\n    listed_time: number;     // unix ms\n};\n```",
        "tags": [
          "token/market"
        ],
        "x-krapio": "krunker.as(token).market.sales()",
        "x-routes": [
          "token.market.sales"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst sales = await krunker.as(token).market.sales();\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/OpenListing"
                      }
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/market/history": {
      "get": {
        "operationId": "token.market.history",
        "summary": "History",
        "description": "`me.market.history({ sort, cursor, limit })`\n\nThe player's completed buys and sells, newest first by default. `sort` is one of `date_asc`, `date_desc`, `amount_asc`, `amount_desc`, `item_asc`, `item_desc`; `limit` 1 to 100.\n\n```ts\ntype MarketHistory = {\n    history: {\n        marketid: number;\n        type: \"sell\" | \"buy\";\n        date: string;\n        skinindex: number;\n        amount: number;\n        other_party_id: number;\n        other_party_name: string;\n        status: string;            // \"completed\"\n    }[];\n    has_more: boolean;\n    next_cursor: number | null;    // the cursor of the next page\n};\n```\n\n`date` is when the sale went through, a few seconds after the buyer's `POST /market/purchase` returned in one recording.",
        "tags": [
          "token/market"
        ],
        "x-krapio": "krunker.as(token).market.history()",
        "x-routes": [
          "token.market.history"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst history = await krunker.as(token).market.history({ sort, cursor, limit });\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "date_asc",
                "date_desc",
                "amount_asc",
                "amount_desc",
                "item_asc",
                "item_desc"
              ]
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MarketHistory"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/market/black-market": {
      "get": {
        "operationId": "token.market.blackMarket",
        "summary": "Black Market",
        "description": "`me.market.blackMarket()`, `me.market.blackMarketRank()`\n\nThe skin indices on offer, and `{peak_mmr}` (null without a ranked history), the player's peak MMR for the ranked tier of the black market.",
        "tags": [
          "token/market"
        ],
        "x-krapio": "krunker.as(token).market.blackMarket()",
        "x-routes": [
          "token.market.blackMarket"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst blackMarket = await krunker.as(token).market.blackMarket();\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BlackMarket"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/market/black-market/rank": {
      "get": {
        "operationId": "token.market.blackMarketRank",
        "summary": "Black Market",
        "description": "`me.market.blackMarket()`, `me.market.blackMarketRank()`\n\nThe skin indices on offer, and `{peak_mmr}` (null without a ranked history), the player's peak MMR for the ranked tier of the black market.",
        "tags": [
          "token/market"
        ],
        "x-krapio": "krunker.as(token).market.blackMarketRank()",
        "x-routes": [
          "token.market.blackMarketRank"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst blackMarketRank = await krunker.as(token).market.blackMarketRank();\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/BlackMarketRank"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/player/me": {
      "get": {
        "operationId": "token.player.me",
        "summary": "Me",
        "description": "`me.player.me()`\n\n`{player: {id, name, data}}`, where `data` is the packed account blob the game decodes itself.",
        "tags": [
          "token/player"
        ],
        "x-krapio": "krunker.as(token).player.me()",
        "x-routes": [
          "token.player.me"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst me = await krunker.as(token).player.me();\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/MePlayer"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/player/wallet": {
      "get": {
        "operationId": "token.player.wallet",
        "summary": "Wallet",
        "description": "`me.player.wallet()`\n\nKr plus every studio currency.\n\n```ts\ntype Wallet = {\n    currencies: { id: number; name: string; symbol: string; amount: number }[];\n    spending_tier: number;\n};\n```",
        "tags": [
          "token/player"
        ],
        "x-krapio": "krunker.as(token).player.wallet()",
        "x-routes": [
          "token.player.wallet"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst wallet = await krunker.as(token).player.wallet();\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Wallet"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/guest/profile": {
      "get": {
        "operationId": "token.player.guestProfile",
        "summary": "Guest Profile",
        "description": "`me.player.guestProfile()`\n\nThe stats of a guest token: `{profile: {score, funds, kills, deaths, games, wins}}`, zeros for a registered account.",
        "tags": [
          "token/player"
        ],
        "x-krapio": "krunker.as(token).player.guestProfile()",
        "x-routes": [
          "token.player.guestProfile"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst guestProfile = await krunker.as(token).player.guestProfile();\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/GuestProfile"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/account/usernames": {
      "get": {
        "operationId": "token.player.usernames",
        "summary": "Usernames",
        "description": "`me.player.usernames()`\n\nThe active name, the reserved names and the rename cooldown.\n\n```ts\ntype Usernames = {\n    active: string;\n    names: { name: string; state: string; leave_release_secs: number }[];\n    cooldown_secs: number;\n};\n```",
        "tags": [
          "token/player"
        ],
        "x-krapio": "krunker.as(token).player.usernames()",
        "x-routes": [
          "token.player.usernames"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst usernames = await krunker.as(token).player.usernames();\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Usernames"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/email/preferences": {
      "get": {
        "operationId": "token.player.emailPreferences",
        "summary": "Email Preferences",
        "description": "`me.player.emailPreferences()`\n\n`{chosen, promotional}`.",
        "tags": [
          "token/player"
        ],
        "x-krapio": "krunker.as(token).player.emailPreferences()",
        "x-routes": [
          "token.player.emailPreferences"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst emailPreferences = await krunker.as(token).player.emailPreferences();\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/EmailPreferences"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/discord/status": {
      "get": {
        "operationId": "token.player.discordStatus",
        "summary": "Discord Status",
        "description": "`me.player.discordStatus()`\n\n`{configured, linked, id?, username?, globalName?, avatar?, linkedAt?, guildUrl?, inGuild?}`, the optional fields only while linked.",
        "tags": [
          "token/player"
        ],
        "x-krapio": "krunker.as(token).player.discordStatus()",
        "x-routes": [
          "token.player.discordStatus"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst discordStatus = await krunker.as(token).player.discordStatus();\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DiscordStatus"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/leaderboards/rankings/season/{season}": {
      "get": {
        "operationId": "token.ranked.leaderboard",
        "summary": "Season Rankings",
        "description": "`me.ranked.leaderboard(season, { limit, offset, region })`\n\nThe game reads 40 per page; `limit` 1 to 100, `offset` 0 based. Regions are the ranked region ids (2 Asia, 3 Europe, 4 North America).\n\n```ts\ntype SeasonRankings = {\n    leaderboard: { position: number; profile: { player_name: string; conservative_rating: number; total_matches: number; rank: number } }[];\n    totalPages: number;\n};\n```",
        "tags": [
          "token/ranked"
        ],
        "x-krapio": "krunker.as(token).ranked.leaderboard()",
        "x-routes": [
          "token.ranked.leaderboard"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst leaderboard = await krunker.as(token).ranked.leaderboard(season, { region, limit, offset });\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "season",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 40
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SeasonRankings"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.krunker.io"
          }
        ]
      }
    },
    "/leaderboards/rankings/season/{season}/region/{region}": {
      "get": {
        "operationId": "token.ranked.leaderboard.region",
        "summary": "Season Rankings",
        "description": "`me.ranked.leaderboard(season, { limit, offset, region })`\n\nThe game reads 40 per page; `limit` 1 to 100, `offset` 0 based. Regions are the ranked region ids (2 Asia, 3 Europe, 4 North America).\n\n```ts\ntype SeasonRankings = {\n    leaderboard: { position: number; profile: { player_name: string; conservative_rating: number; total_matches: number; rank: number } }[];\n    totalPages: number;\n};\n```",
        "tags": [
          "token/ranked"
        ],
        "x-krapio": "krunker.as(token).ranked.leaderboard()",
        "x-routes": [
          "token.ranked.leaderboard"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst leaderboard = await krunker.as(token).ranked.leaderboard(season, { region, limit, offset });\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "season",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 40
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/SeasonRankings"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.krunker.io"
          }
        ]
      }
    },
    "/player-profile/me/season/{season}": {
      "get": {
        "operationId": "token.ranked.profile",
        "summary": "Ranked Profile",
        "description": "`me.ranked.profile(season, region?)`\n\nThe player's ranked card with season totals. `total_accuracy` here is the only aggregate ranked accuracy anywhere in Krunker's APIs, and it is own account only.\n\n```ts\ntype RankedProfile = {\n    profile: {\n        player_id: number;\n        season: number;\n        rank: number;\n        mu: number;\n        sigma: number;\n        conservative_rating: number;\n        wins: number;\n        losses: number;\n        total_matches: number;\n        total_kills: number;\n        total_deaths: number;\n        total_assists: number;\n        total_score: number;\n        total_objective_score: number;\n        total_accuracy: number;\n        total_damage_done: number;\n        total_time_played: number;\n        highest_kill_count: number;\n        highest_damage_in_match: number;\n        player_score: number;\n        level: number;\n        last_milestone_claimed: number;\n        player_name: string;\n    };\n    milestones: { id: number; matches: number; reward: number }[];\n};\n```",
        "tags": [
          "token/ranked"
        ],
        "x-krapio": "krunker.as(token).ranked.profile()",
        "x-routes": [
          "token.ranked.profile"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst profile = await krunker.as(token).ranked.profile(season, region);\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "season",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RankedProfile"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.krunker.io"
          }
        ]
      }
    },
    "/player-profile/me/season/{season}/region/{region}": {
      "get": {
        "operationId": "token.ranked.profile.region",
        "summary": "Ranked Profile",
        "description": "`me.ranked.profile(season, region?)`\n\nThe player's ranked card with season totals. `total_accuracy` here is the only aggregate ranked accuracy anywhere in Krunker's APIs, and it is own account only.\n\n```ts\ntype RankedProfile = {\n    profile: {\n        player_id: number;\n        season: number;\n        rank: number;\n        mu: number;\n        sigma: number;\n        conservative_rating: number;\n        wins: number;\n        losses: number;\n        total_matches: number;\n        total_kills: number;\n        total_deaths: number;\n        total_assists: number;\n        total_score: number;\n        total_objective_score: number;\n        total_accuracy: number;\n        total_damage_done: number;\n        total_time_played: number;\n        highest_kill_count: number;\n        highest_damage_in_match: number;\n        player_score: number;\n        level: number;\n        last_milestone_claimed: number;\n        player_name: string;\n    };\n    milestones: { id: number; matches: number; reward: number }[];\n};\n```",
        "tags": [
          "token/ranked"
        ],
        "x-krapio": "krunker.as(token).ranked.profile()",
        "x-routes": [
          "token.ranked.profile"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst profile = await krunker.as(token).ranked.profile(season, region);\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "season",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RankedProfile"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.krunker.io"
          }
        ]
      }
    },
    "/match-history/me/season/{season}/gameMode/{mode}/isRanked/{ranked}": {
      "get": {
        "operationId": "token.ranked.matchHistory",
        "summary": "Match History",
        "description": "`me.ranked.matchHistory(season, { limit, offset, gameMode, isRanked, region })`\n\n`:mode` is a gamemode id or the literal `undefined` for all modes (that is what the game sends, and the API accepts it), `:ranked` is `true`, `false` or `all`. The game reads 5 per page. Returns `{matchHistory: {matches, totalPages}}`.",
        "tags": [
          "token/ranked"
        ],
        "x-krapio": "krunker.as(token).ranked.matchHistory()",
        "x-routes": [
          "token.ranked.matchHistory"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst matchHistory = await krunker.as(token).ranked.matchHistory(season, { gameMode, isRanked, region, limit, offset });\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "season",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "mode",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0
                },
                {
                  "type": "string",
                  "const": "undefined"
                }
              ]
            },
            "description": "`undefined` stands for every value"
          },
          {
            "name": "ranked",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "const": "all"
                }
              ]
            },
            "description": "undefined = all; `all` stands for every value"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 5
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RankedMatchHistory"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.krunker.io"
          }
        ]
      }
    },
    "/match-history/me/season/{season}/gameMode/{mode}/isRanked/{ranked}/region/{region}": {
      "get": {
        "operationId": "token.ranked.matchHistory.region",
        "summary": "Match History",
        "description": "`me.ranked.matchHistory(season, { limit, offset, gameMode, isRanked, region })`\n\n`:mode` is a gamemode id or the literal `undefined` for all modes (that is what the game sends, and the API accepts it), `:ranked` is `true`, `false` or `all`. The game reads 5 per page. Returns `{matchHistory: {matches, totalPages}}`.",
        "tags": [
          "token/ranked"
        ],
        "x-krapio": "krunker.as(token).ranked.matchHistory()",
        "x-routes": [
          "token.ranked.matchHistory"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst matchHistory = await krunker.as(token).ranked.matchHistory(season, { gameMode, isRanked, region, limit, offset });\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "season",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "mode",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0
                },
                {
                  "type": "string",
                  "const": "undefined"
                }
              ]
            },
            "description": "`undefined` stands for every value"
          },
          {
            "name": "ranked",
            "in": "path",
            "required": true,
            "schema": {
              "anyOf": [
                {
                  "type": "boolean"
                },
                {
                  "type": "string",
                  "const": "all"
                }
              ]
            },
            "description": "undefined = all; `all` stands for every value"
          },
          {
            "name": "region",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 5
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RankedMatchHistory"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.krunker.io"
          }
        ]
      }
    },
    "/ranked/me/connection": {
      "get": {
        "operationId": "token.ranked.connection",
        "summary": "Connection",
        "description": "`me.ranked.connection()`\n\nThe ranked lobby the player is bound to: `{serverUrl}`, null without one.",
        "tags": [
          "token/ranked"
        ],
        "x-krapio": "krunker.as(token).ranked.connection()",
        "x-routes": [
          "token.ranked.connection"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst connection = await krunker.as(token).ranked.connection();\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RankedConnection"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.krunker.io"
          }
        ]
      }
    },
    "/daily-spin/progress": {
      "get": {
        "operationId": "token.ranked.dailySpin",
        "summary": "Daily Spin",
        "description": "`me.ranked.dailySpin()`\n\nThe daily spin meter: `{score, maxScore, stage, timeRemaining, claimed}`, `timeRemaining` in seconds.",
        "tags": [
          "token/ranked"
        ],
        "x-krapio": "krunker.as(token).ranked.dailySpin()",
        "x-routes": [
          "token.ranked.dailySpin"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst dailySpin = await krunker.as(token).ranked.dailySpin();\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/DailySpinProgress"
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://api.krunker.io"
          }
        ]
      }
    },
    "/ranked/shop": {
      "get": {
        "operationId": "token.shop.ranked",
        "summary": "Ranked Shop",
        "description": "`me.shop.ranked()`\n\nThe skins bought with ranked currency, with the player's purchase counts: `{skins: {id, skin_id, price, max_purchase, purchase_count}[]}`.",
        "tags": [
          "token/shop"
        ],
        "x-krapio": "krunker.as(token).shop.ranked()",
        "x-routes": [
          "token.shop.ranked"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst ranked = await krunker.as(token).shop.ranked();\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/RankedShop"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/shop/wild-offer": {
      "get": {
        "operationId": "token.shop.wildOffer",
        "summary": "Wild Offer",
        "description": "`me.shop.wildOffer()`\n\nA 200 with `{error: \"Wild offer is not available\"}` inside `data` when there is none. krapio returns that object as is, check for an `error` key.",
        "tags": [
          "token/shop"
        ],
        "x-krapio": "krunker.as(token).shop.wildOffer()",
        "x-routes": [
          "token.shop.wildOffer"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst wildOffer = await krunker.as(token).shop.wildOffer();\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/WildOffer"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/krunkcup/wristband": {
      "get": {
        "operationId": "token.shop.wristband",
        "summary": "Wristband",
        "description": "`me.shop.wristband()`\n\nThe player's KrunkCup wristband skin and whether it was claimed: `{skin_index, claimed, style, instance_id}`.",
        "tags": [
          "token/shop"
        ],
        "x-krapio": "krunker.as(token).shop.wristband()",
        "x-routes": [
          "token.shop.wristband"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst wristband = await krunker.as(token).shop.wristband();\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/Wristband"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/skins": {
      "get": {
        "operationId": "token.shop.customSkins",
        "summary": "Custom Skins",
        "description": "`me.shop.customSkins({ page, page_size, type, weapon, search })`, `me.shop.customSkin(skinId)`\n\nThe player's own skins from the skin editor, `page_size` 1 to 100.\n\n```ts\ntype CustomSkinsPage = {\n    skins: CustomSkin[];\n    total: number;\n    page: number;\n    pageSize: number;\n};\n\ntype CustomSkin = {\n    skinId: number;\n    name: string;\n    type: number;\n    weapon: number;\n    rarity: number;\n    itemConfig: Record<string, unknown>;\n    playerId: number;\n    createdAt: string;\n    updatedAt: string;\n};\n```",
        "tags": [
          "token/shop"
        ],
        "x-krapio": "krunker.as(token).shop.customSkins()",
        "x-routes": [
          "token.shop.customSkins"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst customSkins = await krunker.as(token).shop.customSkins({ page, page_size, type, weapon, search });\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "weapon",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CustomSkinsPage"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/skins/{skinId}": {
      "get": {
        "operationId": "token.shop.customSkin",
        "summary": "Custom Skins",
        "description": "`me.shop.customSkins({ page, page_size, type, weapon, search })`, `me.shop.customSkin(skinId)`\n\nThe player's own skins from the skin editor, `page_size` 1 to 100.\n\n```ts\ntype CustomSkinsPage = {\n    skins: CustomSkin[];\n    total: number;\n    page: number;\n    pageSize: number;\n};\n\ntype CustomSkin = {\n    skinId: number;\n    name: string;\n    type: number;\n    weapon: number;\n    rarity: number;\n    itemConfig: Record<string, unknown>;\n    playerId: number;\n    createdAt: string;\n    updatedAt: string;\n};\n```",
        "tags": [
          "token/shop"
        ],
        "x-krapio": "krunker.as(token).shop.customSkin()",
        "x-routes": [
          "token.shop.customSkin"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst customSkin = await krunker.as(token).shop.customSkin(skinId);\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "skinId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/CustomSkin"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/moderation/chat/{playerName}": {
      "get": {
        "operationId": "token.staff.chatBan",
        "summary": "a player's chat ban",
        "description": "a player's chat ban",
        "tags": [
          "token/staff"
        ],
        "x-krapio": "krunker.as(token).staff.chatBan()",
        "x-routes": [
          "token.staff.chatBan"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst chatBan = await krunker.as(token).staff.chatBan(playerName);\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "playerName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "NulPing"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {},
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/players/{playerName}/reports": {
      "get": {
        "operationId": "token.staff.reports",
        "summary": "403 \"not authorized\" for everyone else",
        "description": "403 \"not authorized\" for everyone else",
        "tags": [
          "token/staff"
        ],
        "x-krapio": "krunker.as(token).staff.reports()",
        "x-routes": [
          "token.staff.reports"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst reports = await krunker.as(token).staff.reports(playerName);\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "playerName",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "example": "NulPing"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {},
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/kpd/demos": {
      "get": {
        "operationId": "token.staff.kpdDemos",
        "summary": "the demo review queue",
        "description": "the demo review queue",
        "tags": [
          "token/staff"
        ],
        "x-krapio": "krunker.as(token).staff.kpdDemos()",
        "x-routes": [
          "token.staff.kpdDemos"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst kpdDemos = await krunker.as(token).staff.kpdDemos({ off, q });\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "off",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {},
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/kpd/demos/{demoId}": {
      "get": {
        "operationId": "token.staff.kpdDemo",
        "summary": "ct is the review ticket the game passes along",
        "description": "ct is the review ticket the game passes along",
        "tags": [
          "token/staff"
        ],
        "x-krapio": "krunker.as(token).staff.kpdDemo()",
        "x-routes": [
          "token.staff.kpdDemo"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst kpdDemo = await krunker.as(token).staff.kpdDemo(demoId, ct);\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "demoId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          },
          {
            "name": "ct",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {},
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/kpd/reviewers": {
      "get": {
        "operationId": "token.staff.kpdReviewers",
        "summary": "staff.kpdReviewers",
        "description": "",
        "tags": [
          "token/staff"
        ],
        "x-krapio": "krunker.as(token).staff.kpdReviewers()",
        "x-routes": [
          "token.staff.kpdReviewers"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst kpdReviewers = await krunker.as(token).staff.kpdReviewers();\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {},
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/trades/history": {
      "get": {
        "operationId": "token.trades.history",
        "summary": "History",
        "description": "`me.trades.history({ offset, limit, includeOpen })`\n\nOpen and completed trades of the player, `limit` 1 to 100. krapio sends `include_open=0` only when `includeOpen` is `false`.\n\n```ts\ntype TradeHistory = {\n    open: Trade[];\n    completed: Trade[];\n    completed_has_more?: boolean;\n};\n\ntype Trade = {\n    trid: number;\n    sksell: { ind: number }[];         // items the offering player gives\n    skbuy: { ind: number }[];          // items asked from the other player\n    csell: { cid: number; amt: number }[];\n    cbuy: { cid: number; amt: number }[];\n    pl: number;                        // id of the player who made the offer\n    buy: number;                       // id of the player the offer went to\n    buyer: string;                     // name of the player the offer went to\n    player: string;                    // name of the player who made the offer\n    message: string;\n    dte: string;                       // when the offer was made, \"YYYY-MM-DD HH:MM:SS\" utc\n};\n```\n\nThe sides follow the offer, not the reader: in the recipient's history `pl` and `player` are still the other player. `cid` 1 is kr. A completed trade keeps the `dte` of its offer, so an open trade and the same trade completed are identical apart from the list they are in. The trading window loads this with `include_open` on, and again with `include_open=0` about a second after an accept.",
        "tags": [
          "token/trades"
        ],
        "x-krapio": "krunker.as(token).trades.history()",
        "x-routes": [
          "token.trades.history"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst history = await krunker.as(token).trades.history({ offset, limit, includeOpen });\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "include_open",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "const": 0
            },
            "description": "sent as 0 when `includeOpen` is set"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TradeHistory"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/trades/inventory/{playerId}": {
      "get": {
        "operationId": "token.trades.inventory",
        "summary": "Trade Inventories",
        "description": "`me.trades.inventory(playerId)`\n\nBoth inventories side by side: `{my_inventory, their_inventory}`, each `{i, cnt, sid, st}[]`.",
        "tags": [
          "token/trades"
        ],
        "x-krapio": "krunker.as(token).trades.inventory()",
        "x-routes": [
          "token.trades.inventory"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst inventory = await krunker.as(token).trades.inventory(playerId);\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "playerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TradeInventories"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    },
    "/trades/player-search": {
      "get": {
        "operationId": "token.trades.playerSearch",
        "summary": "Player Search",
        "description": "`me.trades.playerSearch(playerName)`\n\nOne player by exact name: `{player_id, player_name, player_score}`.",
        "tags": [
          "token/trades"
        ],
        "x-krapio": "krunker.as(token).trades.playerSearch()",
        "x-routes": [
          "token.trades.playerSearch"
        ],
        "x-codeSamples": [
          {
            "lang": "ts",
            "label": "krapio",
            "source": "import { Krunker } from \"krapio\";\n\nconst krunker = new Krunker();\nconst playerSearch = await krunker.as(token).trades.playerSearch(playerName);\n"
          }
        ],
        "security": [
          {
            "accessToken": []
          }
        ],
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "description": "gapi wraps every reply in {data, error}",
                  "properties": {
                    "data": {
                      "$ref": "#/components/schemas/TradePlayer"
                    },
                    "error": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "data",
                    "error"
                  ]
                }
              }
            }
          },
          "default": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EnvelopeError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "developerApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Developer-API-Key",
        "description": "developer API key (starts with kr_)"
      },
      "accessToken": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "the player's FRVR access token"
      }
    },
    "schemas": {
      "ApiErrorBody": {
        "type": "object",
        "properties": {
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string"
                  },
                  "message": {
                    "type": "string"
                  }
                }
              }
            ]
          },
          "retry_after": {
            "type": "number"
          }
        },
        "required": [
          "error"
        ],
        "description": "body of every error reply"
      },
      "TradePlayer": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "number"
          },
          "player_name": {
            "type": "string"
          },
          "player_score": {
            "type": "number"
          }
        },
        "required": [
          "player_id",
          "player_name",
          "player_score"
        ],
        "description": "GET /trades/player-search, one player by exact name"
      },
      "TradeInventories": {
        "type": "object",
        "properties": {
          "my_inventory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InventoryStack"
            }
          },
          "their_inventory": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InventoryStack"
            }
          }
        },
        "required": [
          "my_inventory",
          "their_inventory"
        ],
        "description": "GET /trades/inventory/:playerId, both sides"
      },
      "InventoryStack": {
        "type": "object",
        "properties": {
          "i": {
            "type": "number"
          },
          "cnt": {
            "type": "number"
          },
          "sid": {
            "type": "number"
          },
          "st": {
            "type": "number"
          }
        },
        "required": [
          "i",
          "cnt",
          "sid",
          "st"
        ],
        "description": "one inventory stack: skin index, count, instance id, state"
      },
      "TradeHistory": {
        "type": "object",
        "properties": {
          "open": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Trade"
            }
          },
          "completed": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Trade"
            }
          },
          "completed_has_more": {
            "type": "boolean"
          }
        },
        "required": [
          "open",
          "completed"
        ],
        "description": "GET /trades/history"
      },
      "Trade": {
        "type": "object",
        "properties": {
          "trid": {
            "type": "number"
          },
          "sksell": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TradeItem"
            },
            "description": "items offered"
          },
          "skbuy": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TradeItem"
            },
            "description": "items asked for"
          },
          "csell": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TradeCurrency"
            }
          },
          "cbuy": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TradeCurrency"
            }
          },
          "pl": {
            "type": "number",
            "description": "id of the player who made the offer, their items are sksell"
          },
          "buy": {
            "type": "number",
            "description": "id of the player the offer went to, their items are skbuy"
          },
          "buyer": {
            "type": "string",
            "description": "name of the player the offer went to"
          },
          "player": {
            "type": "string",
            "description": "name of the player who made the offer"
          },
          "message": {
            "type": "string"
          },
          "dte": {
            "type": "string",
            "description": "when the offer was made, \"YYYY-MM-DD HH:MM:SS\" utc; a completed trade keeps it"
          }
        },
        "required": [
          "trid",
          "sksell",
          "skbuy",
          "csell",
          "cbuy",
          "pl",
          "buy",
          "buyer",
          "player",
          "message",
          "dte"
        ],
        "description": "one trade, short keys as the game sends them"
      },
      "TradeItem": {
        "type": "object",
        "properties": {
          "ind": {
            "type": "number"
          }
        },
        "required": [
          "ind"
        ],
        "description": "one item in a trade, by skin index"
      },
      "TradeCurrency": {
        "type": "object",
        "properties": {
          "cid": {
            "type": "number"
          },
          "amt": {
            "type": "number"
          }
        },
        "required": [
          "cid",
          "amt"
        ],
        "description": "one currency amount in a trade"
      },
      "CustomSkin": {
        "type": "object",
        "properties": {
          "skinId": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "type": {
            "type": "number"
          },
          "weapon": {
            "type": "number"
          },
          "rarity": {
            "type": "number"
          },
          "itemConfig": {
            "type": "object",
            "additionalProperties": {}
          },
          "playerId": {
            "type": "number"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "skinId",
          "name",
          "type",
          "weapon",
          "rarity",
          "itemConfig",
          "playerId",
          "createdAt",
          "updatedAt"
        ],
        "description": "a custom skin of the token's player (the skin editor)"
      },
      "CustomSkinsPage": {
        "type": "object",
        "properties": {
          "skins": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CustomSkin"
            }
          },
          "total": {
            "type": "number"
          },
          "page": {
            "type": "number"
          },
          "pageSize": {
            "type": "number"
          }
        },
        "required": [
          "skins",
          "total",
          "page",
          "pageSize"
        ],
        "description": "GET /skins, the player's custom skins paged"
      },
      "Wristband": {
        "type": "object",
        "properties": {
          "skin_index": {
            "type": "number"
          },
          "claimed": {
            "type": "boolean"
          },
          "style": {
            "type": "number"
          },
          "instance_id": {
            "type": "number"
          }
        },
        "required": [
          "skin_index",
          "claimed",
          "style",
          "instance_id"
        ],
        "description": "GET /krunkcup/wristband"
      },
      "WildOffer": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/SoftError"
          },
          {
            "type": "object",
            "additionalProperties": {}
          }
        ],
        "description": "GET /shop/wild-offer, a SoftError when there is none"
      },
      "SoftError": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "description": "a reply that carries its refusal inside data (wild offer: \"Wild offer is not available\")"
      },
      "RankedShop": {
        "type": "object",
        "properties": {
          "skins": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number"
                },
                "skin_id": {
                  "type": "number"
                },
                "price": {
                  "type": "number"
                },
                "max_purchase": {
                  "type": "number"
                },
                "purchase_count": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "skin_id",
                "price",
                "max_purchase",
                "purchase_count"
              ]
            }
          }
        },
        "required": [
          "skins"
        ],
        "description": "GET /ranked/shop, the skins bought with ranked currency"
      },
      "DailySpinProgress": {
        "type": "object",
        "properties": {
          "score": {
            "type": "number"
          },
          "maxScore": {
            "type": "number"
          },
          "stage": {
            "type": "number"
          },
          "timeRemaining": {
            "type": "number",
            "description": "seconds"
          },
          "claimed": {
            "type": "boolean"
          }
        },
        "required": [
          "score",
          "maxScore",
          "stage",
          "timeRemaining",
          "claimed"
        ],
        "description": "GET api.krunker.io/daily-spin/progress"
      },
      "RankedConnection": {
        "type": "object",
        "properties": {
          "serverUrl": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "serverUrl"
        ],
        "description": "GET api.krunker.io/ranked/me/connection"
      },
      "RankedMatchHistory": {
        "type": "object",
        "properties": {
          "matchHistory": {
            "type": "object",
            "properties": {
              "matches": {
                "type": "array",
                "items": {}
              },
              "totalPages": {
                "type": "number"
              }
            },
            "required": [
              "matches",
              "totalPages"
            ]
          }
        },
        "required": [
          "matchHistory"
        ],
        "description": "GET api.krunker.io/match-history/me/..., paged"
      },
      "RankedProfile": {
        "type": "object",
        "properties": {
          "profile": {
            "type": "object",
            "properties": {
              "player_id": {
                "type": "number"
              },
              "season": {
                "type": "number"
              },
              "rank": {
                "type": "number"
              },
              "mu": {
                "type": "number"
              },
              "sigma": {
                "type": "number"
              },
              "conservative_rating": {
                "type": "number"
              },
              "wins": {
                "type": "number"
              },
              "losses": {
                "type": "number"
              },
              "total_matches": {
                "type": "number"
              },
              "total_kills": {
                "type": "number"
              },
              "total_deaths": {
                "type": "number"
              },
              "total_assists": {
                "type": "number"
              },
              "total_score": {
                "type": "number"
              },
              "total_objective_score": {
                "type": "number"
              },
              "total_accuracy": {
                "type": "number"
              },
              "total_damage_done": {
                "type": "number"
              },
              "total_time_played": {
                "type": "number"
              },
              "highest_kill_count": {
                "type": "number"
              },
              "highest_damage_in_match": {
                "type": "number"
              },
              "player_score": {
                "type": "number"
              },
              "level": {
                "type": "number"
              },
              "last_milestone_claimed": {
                "type": "number"
              },
              "player_name": {
                "type": "string"
              }
            },
            "required": [
              "player_id",
              "season",
              "rank",
              "mu",
              "sigma",
              "conservative_rating",
              "wins",
              "losses",
              "total_matches",
              "total_kills",
              "total_deaths",
              "total_assists",
              "total_score",
              "total_objective_score",
              "total_accuracy",
              "total_damage_done",
              "total_time_played",
              "highest_kill_count",
              "highest_damage_in_match",
              "player_score",
              "level",
              "last_milestone_claimed",
              "player_name"
            ]
          },
          "milestones": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number"
                },
                "matches": {
                  "type": "number"
                },
                "reward": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "matches",
                "reward"
              ]
            }
          }
        },
        "required": [
          "profile",
          "milestones"
        ],
        "description": "GET api.krunker.io/player-profile/me/season/:season[/region/:region], the only place with a season accuracy total"
      },
      "SeasonRankings": {
        "type": "object",
        "properties": {
          "leaderboard": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "position": {
                  "type": "number"
                },
                "profile": {
                  "$ref": "#/components/schemas/RankedProfileEntry"
                }
              },
              "required": [
                "position",
                "profile"
              ]
            }
          },
          "totalPages": {
            "type": "number"
          }
        },
        "required": [
          "leaderboard",
          "totalPages"
        ],
        "description": "GET api.krunker.io/leaderboards/rankings/season/:season[/region/:region]"
      },
      "RankedProfileEntry": {
        "type": "object",
        "properties": {
          "player_name": {
            "type": "string"
          },
          "conservative_rating": {
            "type": "number"
          },
          "total_matches": {
            "type": "number"
          },
          "rank": {
            "type": "number"
          }
        },
        "required": [
          "player_name",
          "conservative_rating",
          "total_matches",
          "rank"
        ],
        "description": "a player's ranked card in the season rankings"
      },
      "DiscordStatus": {
        "type": "object",
        "properties": {
          "configured": {
            "type": "boolean"
          },
          "linked": {
            "type": "boolean"
          },
          "id": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "globalName": {
            "type": "string"
          },
          "avatar": {
            "type": "string"
          },
          "linkedAt": {
            "type": "number"
          },
          "guildUrl": {
            "type": "string"
          },
          "inGuild": {
            "type": "boolean"
          }
        },
        "required": [
          "configured",
          "linked"
        ],
        "description": "GET /discord/status, the optional fields only while linked"
      },
      "EmailPreferences": {
        "type": "object",
        "properties": {
          "chosen": {
            "type": "boolean"
          },
          "promotional": {
            "type": "boolean"
          }
        },
        "required": [
          "chosen",
          "promotional"
        ],
        "description": "GET /email/preferences"
      },
      "Usernames": {
        "type": "object",
        "properties": {
          "active": {
            "type": "string"
          },
          "names": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "state": {
                  "type": "string"
                },
                "leave_release_secs": {
                  "type": "number"
                }
              },
              "required": [
                "name",
                "state",
                "leave_release_secs"
              ]
            }
          },
          "cooldown_secs": {
            "type": "number"
          }
        },
        "required": [
          "active",
          "names",
          "cooldown_secs"
        ],
        "description": "GET /account/usernames"
      },
      "GuestProfile": {
        "type": "object",
        "properties": {
          "profile": {
            "type": "object",
            "properties": {
              "score": {
                "type": "number"
              },
              "funds": {
                "type": "number"
              },
              "kills": {
                "type": "number"
              },
              "deaths": {
                "type": "number"
              },
              "games": {
                "type": "number"
              },
              "wins": {
                "type": "number"
              }
            },
            "required": [
              "score",
              "funds",
              "kills",
              "deaths",
              "games",
              "wins"
            ]
          }
        },
        "required": [
          "profile"
        ],
        "description": "GET /guest/profile, zeros without a guest token"
      },
      "Wallet": {
        "type": "object",
        "properties": {
          "currencies": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WalletCurrency"
            }
          },
          "spending_tier": {
            "type": "number"
          }
        },
        "required": [
          "currencies",
          "spending_tier"
        ],
        "description": "GET /player/wallet, kr plus every studio currency"
      },
      "WalletCurrency": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "name",
          "symbol",
          "amount"
        ],
        "description": "one currency in the wallet, kr or a studio currency"
      },
      "MePlayer": {
        "type": "object",
        "properties": {
          "player": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "data": {
                "type": "array",
                "items": {}
              }
            },
            "required": [
              "id",
              "name",
              "data"
            ]
          }
        },
        "required": [
          "player"
        ],
        "description": "GET /player/me, data is the packed account blob the game decodes itself"
      },
      "BlackMarketRank": {
        "type": "object",
        "properties": {
          "peak_mmr": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "peak_mmr"
        ],
        "description": "GET /market/black-market/rank, null without a ranked history"
      },
      "BlackMarket": {
        "type": "array",
        "items": {
          "type": "number"
        },
        "description": "GET /market/black-market, the skin indices on offer"
      },
      "MarketHistory": {
        "type": "object",
        "properties": {
          "history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MarketHistoryEntry"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "number",
              "null"
            ],
            "description": "the cursor of the next page"
          }
        },
        "required": [
          "has_more",
          "history",
          "next_cursor"
        ],
        "description": "GET /market/history"
      },
      "MarketHistoryEntry": {
        "type": "object",
        "properties": {
          "marketid": {
            "type": "number"
          },
          "type": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "skinindex": {
            "type": "number"
          },
          "amount": {
            "type": "number"
          },
          "other_party_id": {
            "type": "number"
          },
          "other_party_name": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "marketid",
          "type",
          "date",
          "skinindex",
          "amount",
          "other_party_id",
          "other_party_name",
          "status"
        ],
        "description": "one completed buy or sell of the player"
      },
      "OpenListing": {
        "type": "object",
        "properties": {
          "uid": {
            "type": "number"
          },
          "marketid": {
            "type": "number"
          },
          "skinid": {
            "type": "number",
            "description": "the item instance"
          },
          "skinindex": {
            "type": "number"
          },
          "funds": {
            "type": "number",
            "description": "asking price in kr"
          },
          "listed_time": {
            "type": "number",
            "description": "unix ms"
          }
        },
        "required": [
          "uid",
          "marketid",
          "skinid",
          "skinindex",
          "funds",
          "listed_time"
        ],
        "description": "GET /market/sales, one of the player's own open listings"
      },
      "MarketListings": {
        "type": "object",
        "properties": {
          "listings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LiveListing"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor_id": {
            "type": [
              "number",
              "null"
            ],
            "description": "the cursor_id of the next page"
          }
        },
        "required": [
          "has_more",
          "listings",
          "next_cursor_id"
        ],
        "description": "GET /market/listings"
      },
      "LiveListing": {
        "type": "object",
        "properties": {
          "uid": {
            "type": "number"
          },
          "marketid": {
            "type": "number"
          },
          "skinid": {
            "type": "number",
            "description": "the item instance"
          },
          "skinindex": {
            "type": "number"
          },
          "funds": {
            "type": "number",
            "description": "asking price in kr"
          },
          "seller_id": {
            "type": "number"
          },
          "seller_name": {
            "type": "string"
          },
          "listed_time": {
            "type": "number",
            "description": "unix ms"
          },
          "listing_count": {
            "type": "number",
            "description": "how many of this skin the seller has listed"
          }
        },
        "required": [
          "uid",
          "marketid",
          "skinid",
          "skinindex",
          "funds",
          "seller_id",
          "seller_name",
          "listed_time",
          "listing_count"
        ],
        "description": "one active listing on the live market"
      },
      "MyApplications": {
        "type": "object",
        "properties": {
          "clan_ids": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "type": "number"
                }
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "clan_ids"
        ],
        "description": "GET /clans/my-applications, null without any"
      },
      "TurfPlayerEarning": {
        "type": "object",
        "properties": {
          "day": {
            "type": "number"
          },
          "map_id": {
            "type": "number"
          },
          "map_name": {
            "type": "string"
          },
          "clan_id": {
            "type": "number"
          },
          "clan_name": {
            "type": "string"
          },
          "amount": {
            "type": "number"
          }
        },
        "required": [
          "day",
          "map_id",
          "map_name",
          "clan_id",
          "clan_name",
          "amount"
        ],
        "description": "one payout to a player"
      },
      "TurfContribution": {
        "type": "object",
        "properties": {
          "day": {
            "type": "number"
          },
          "clan_id": {
            "type": "number"
          },
          "clan_name": {
            "type": "string"
          },
          "map_id": {
            "type": "number"
          },
          "map_name": {
            "type": "string"
          },
          "kills": {
            "type": "number"
          },
          "deaths": {
            "type": "number"
          },
          "games": {
            "type": "number"
          },
          "kd": {
            "type": "number"
          }
        },
        "required": [
          "day",
          "clan_id",
          "clan_name",
          "map_id",
          "map_name",
          "kills",
          "deaths",
          "games",
          "kd"
        ],
        "description": "one day and map of a player's turf contributions"
      },
      "TurfPlayer": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "number"
          },
          "player_name": {
            "type": "string"
          },
          "current_clan": {
            "type": "string"
          },
          "current_clan_id": {
            "type": "number"
          },
          "current_clan_logo": {
            "type": [
              "number",
              "null"
            ]
          },
          "total_kills": {
            "type": "number"
          },
          "total_deaths": {
            "type": "number"
          },
          "total_games": {
            "type": "number"
          },
          "kd": {
            "type": "number"
          },
          "total_kr": {
            "type": "number"
          },
          "first_day": {
            "type": "number"
          },
          "last_day": {
            "type": "number"
          }
        },
        "required": [
          "player_id",
          "player_name",
          "current_clan",
          "current_clan_id",
          "current_clan_logo",
          "total_kills",
          "total_deaths",
          "total_games",
          "kd",
          "total_kr",
          "first_day",
          "last_day"
        ],
        "description": "GET /territorial-wars/player/:id"
      },
      "TurfTopPlayer": {
        "type": "object",
        "properties": {
          "position": {
            "type": "number"
          },
          "player_id": {
            "type": "number"
          },
          "player_name": {
            "type": "string"
          },
          "clan_id": {
            "type": "number"
          },
          "clan_name": {
            "type": "string"
          },
          "kills": {
            "type": "number"
          },
          "deaths": {
            "type": "number"
          },
          "games": {
            "type": "number"
          },
          "kd": {
            "type": "number"
          },
          "earnings": {
            "type": "number"
          }
        },
        "required": [
          "position",
          "player_id",
          "player_name",
          "clan_id",
          "clan_name",
          "kills",
          "deaths",
          "games",
          "kd",
          "earnings"
        ],
        "description": "one row of the top performing players board"
      },
      "TurfTopGrossingClan": {
        "type": "object",
        "properties": {
          "position": {
            "type": "number"
          },
          "clan_id": {
            "type": "number"
          },
          "clan_name": {
            "type": "string"
          },
          "clan_logo": {
            "type": [
              "number",
              "null"
            ]
          },
          "total_kr": {
            "type": "number"
          },
          "distributed": {
            "type": "number"
          },
          "bank": {
            "type": "number"
          }
        },
        "required": [
          "position",
          "clan_id",
          "clan_name",
          "clan_logo",
          "total_kr",
          "distributed",
          "bank"
        ],
        "description": "one row of the top grossing clans board"
      },
      "TurfTopClan": {
        "type": "object",
        "properties": {
          "position": {
            "type": "number"
          },
          "clan_id": {
            "type": "number"
          },
          "clan_name": {
            "type": "string"
          },
          "clan_logo": {
            "type": [
              "number",
              "null"
            ]
          },
          "kills": {
            "type": "number"
          },
          "deaths": {
            "type": "number"
          },
          "games": {
            "type": "number"
          },
          "kd": {
            "type": "number"
          }
        },
        "required": [
          "position",
          "clan_id",
          "clan_name",
          "clan_logo",
          "kills",
          "deaths",
          "games",
          "kd"
        ],
        "description": "one row of the top performing clans board"
      },
      "TurfPayouts": {
        "type": "object",
        "properties": {
          "payouts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "player_id": {
                  "type": "number"
                },
                "player_name": {
                  "type": "string"
                },
                "total_kr": {
                  "type": "number"
                }
              },
              "required": [
                "player_id",
                "player_name",
                "total_kr"
              ]
            }
          },
          "total": {
            "type": "number"
          }
        },
        "required": [
          "payouts",
          "total"
        ],
        "description": "GET /territorial-wars/clan/:id/payouts"
      },
      "TurfClanEarning": {
        "type": "object",
        "properties": {
          "day": {
            "type": "number"
          },
          "map_id": {
            "type": "number"
          },
          "map_name": {
            "type": "string"
          },
          "reward": {
            "type": "number"
          }
        },
        "required": [
          "day",
          "map_id",
          "map_name",
          "reward"
        ],
        "description": "one day's reward of a clan on one map"
      },
      "TurfPlayerRow": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "number"
          },
          "player_name": {
            "type": "string"
          },
          "kills": {
            "type": "number"
          },
          "deaths": {
            "type": "number"
          },
          "games": {
            "type": "number"
          },
          "kd": {
            "type": "number"
          }
        },
        "required": [
          "player_id",
          "player_name",
          "kills",
          "deaths",
          "games",
          "kd"
        ],
        "description": "one row of GET /territorial-wars/clan/:id/players"
      },
      "TurfClan": {
        "type": "object",
        "properties": {
          "clan_id": {
            "type": "number"
          },
          "clan_name": {
            "type": "string"
          },
          "clan_logo": {
            "type": [
              "number",
              "null"
            ]
          },
          "current_day": {
            "type": "number"
          },
          "maps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TurfClanMap"
            }
          },
          "historical_days": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "map_id": {
                  "type": "number"
                },
                "map_name": {
                  "type": "string"
                },
                "day": {
                  "type": "number"
                },
                "kills": {
                  "type": "number"
                },
                "deaths": {
                  "type": "number"
                },
                "position": {
                  "type": "number"
                },
                "comparison_kills": {
                  "type": "number",
                  "description": "the clan one position up"
                },
                "comparison_deaths": {
                  "type": "number"
                },
                "comparison_clan_name": {
                  "type": "string"
                },
                "comparison_clan_id": {
                  "type": "number"
                },
                "comparison_clan_logo": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "comparison_position": {
                  "type": "number"
                }
              },
              "required": [
                "map_id",
                "map_name",
                "day",
                "kills",
                "deaths",
                "position",
                "comparison_kills",
                "comparison_deaths",
                "comparison_clan_name",
                "comparison_clan_id",
                "comparison_clan_logo",
                "comparison_position"
              ]
            }
          }
        },
        "required": [
          "clan_id",
          "clan_name",
          "clan_logo",
          "current_day",
          "maps",
          "historical_days"
        ],
        "description": "GET /territorial-wars/clan/:id"
      },
      "TurfClanMap": {
        "type": "object",
        "properties": {
          "map_id": {
            "type": "number"
          },
          "map_name": {
            "type": "string"
          },
          "day": {
            "type": "number"
          },
          "kills": {
            "type": "number"
          },
          "deaths": {
            "type": "number"
          },
          "games": {
            "type": "number"
          },
          "position": {
            "type": "number"
          },
          "comparison_kills": {
            "type": "number",
            "description": "the clan one position up"
          },
          "comparison_deaths": {
            "type": "number"
          },
          "comparison_clan_name": {
            "type": "string"
          },
          "comparison_clan_id": {
            "type": "number"
          },
          "comparison_clan_logo": {
            "type": [
              "number",
              "null"
            ]
          },
          "comparison_position": {
            "type": "number"
          }
        },
        "required": [
          "map_id",
          "map_name",
          "day",
          "kills",
          "deaths",
          "games",
          "position",
          "comparison_kills",
          "comparison_deaths",
          "comparison_clan_name",
          "comparison_clan_id",
          "comparison_clan_logo",
          "comparison_position"
        ],
        "description": "a clan's standing on one turf map for one day"
      },
      "TurfStatus": {
        "type": "object",
        "properties": {
          "map_id": {
            "type": "number"
          },
          "map_name": {
            "type": "string"
          },
          "clan_id": {
            "type": "number",
            "description": "the owner"
          },
          "clan_name": {
            "type": "string"
          },
          "clan_logo": {
            "type": [
              "number",
              "null"
            ]
          },
          "kills": {
            "type": "number"
          },
          "games": {
            "type": "number"
          },
          "reward": {
            "type": [
              "number",
              "null"
            ]
          },
          "leaderboard": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TurfStatusEntry"
            },
            "description": "top 5"
          },
          "total_kills_today": {
            "type": "number"
          },
          "guaranteed_reward": {
            "type": "number"
          },
          "estimated_reward": {
            "type": "number"
          }
        },
        "required": [
          "map_id",
          "map_name",
          "clan_id",
          "clan_name",
          "clan_logo",
          "kills",
          "games",
          "reward",
          "leaderboard",
          "total_kills_today",
          "guaranteed_reward",
          "estimated_reward"
        ],
        "description": "one turf map with its current owner"
      },
      "TurfStatusEntry": {
        "type": "object",
        "properties": {
          "position": {
            "type": "number"
          },
          "clan_id": {
            "type": "number"
          },
          "clan_name": {
            "type": "string"
          },
          "clan_logo": {
            "type": [
              "number",
              "null"
            ]
          },
          "kills": {
            "type": "number"
          },
          "deaths": {
            "type": "number"
          }
        },
        "required": [
          "position",
          "clan_id",
          "clan_name",
          "clan_logo",
          "kills",
          "deaths"
        ],
        "description": "one of the top 5 clans of a turf map"
      },
      "SocialNews": {
        "type": "object",
        "properties": {
          "news": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "news"
        ],
        "description": "GET /social/news"
      },
      "SocialPost": {
        "type": "object",
        "properties": {
          "post": {
            "$ref": "#/components/schemas/FeedPost"
          },
          "comments": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "post",
          "comments"
        ],
        "description": "GET /social/post/:id"
      },
      "FeedPost": {
        "type": "object",
        "properties": {
          "pid": {
            "type": "number",
            "description": "post id"
          },
          "pln": {
            "type": "string",
            "description": "poster name and id"
          },
          "pli": {
            "type": "number",
            "description": "poster id"
          },
          "tim": {
            "type": "number"
          },
          "lnk": {
            "type": "string"
          },
          "txt": {
            "type": "string"
          },
          "ftr": {
            "type": "number"
          },
          "typ": {
            "type": "number"
          },
          "cln": {
            "type": "string"
          },
          "flw": {
            "type": "number"
          },
          "clr": {
            "type": "number"
          },
          "prm": {
            "type": "number"
          },
          "lnk2": {
            "type": "string"
          },
          "vot": {
            "type": "number",
            "description": "votes"
          },
          "dlk": {
            "type": "number"
          },
          "cnt": {
            "type": "number",
            "description": "comment count"
          },
          "exp": {
            "type": "number"
          },
          "fds": {
            "type": "number"
          }
        },
        "required": [
          "pid",
          "pln",
          "pli",
          "tim",
          "lnk",
          "txt",
          "ftr",
          "typ",
          "cln",
          "flw",
          "clr",
          "prm",
          "lnk2",
          "vot",
          "dlk",
          "cnt",
          "exp",
          "fds"
        ],
        "description": "one post of the social feed, short keys as the game sends them"
      },
      "Lottery": {
        "type": "object",
        "properties": {
          "lottery": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number"
              },
              "title": {
                "type": "string"
              },
              "frequency": {
                "type": "number"
              },
              "theme": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "title",
              "frequency",
              "theme"
            ]
          },
          "player_entries": {
            "type": "number"
          },
          "total_entries": {
            "type": "number"
          },
          "previous_draws": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number"
                },
                "lottery_id": {
                  "type": "number"
                },
                "starts_at": {
                  "type": "string"
                },
                "ends_at": {
                  "type": "string"
                },
                "drawn_at": {
                  "type": "string"
                },
                "prizes": {
                  "type": "array",
                  "items": {}
                }
              },
              "required": [
                "drawn_at",
                "ends_at",
                "id",
                "lottery_id",
                "prizes",
                "starts_at"
              ]
            }
          }
        },
        "required": [
          "lottery",
          "player_entries",
          "previous_draws",
          "total_entries"
        ],
        "description": "GET /lottery/:id, every past draw with its prizes"
      },
      "SpinWheel": {
        "type": "object",
        "properties": {
          "index": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "price": {
            "type": "number"
          },
          "ticketIndex": {
            "type": "number"
          },
          "ticketOnly": {
            "type": "boolean"
          },
          "multi": {
            "type": "number"
          },
          "poolWeights": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "pools": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SpinPool"
            }
          }
        },
        "required": [
          "index",
          "multi",
          "name",
          "poolWeights",
          "pools",
          "price",
          "ticketIndex",
          "ticketOnly"
        ],
        "description": "GET /spins/wheels, the spin shop's wheels with their pools"
      },
      "SpinPool": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "color": {
            "type": "string"
          },
          "weight": {
            "type": "number"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "skin indices"
          }
        },
        "required": [
          "id",
          "name",
          "color",
          "weight",
          "items"
        ],
        "description": "one item pool of a spin wheel"
      },
      "ShopDisplay": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "type": {
            "type": "string"
          },
          "order": {
            "type": "number"
          },
          "data": {
            "type": "object",
            "additionalProperties": {}
          },
          "children": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number"
                },
                "parent_id": {
                  "type": "number"
                },
                "order": {
                  "type": "number"
                },
                "type": {
                  "type": "string"
                },
                "data": {
                  "type": "object",
                  "additionalProperties": {}
                },
                "product_id": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "parent_id",
                "order",
                "type",
                "data"
              ]
            }
          },
          "products": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/ShopProduct"
            }
          }
        },
        "required": [
          "id",
          "type",
          "order",
          "data",
          "children",
          "products"
        ],
        "description": "GET /shop/displays, a tree of displays with the products they show"
      },
      "ShopProduct": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "image_url": {
            "type": "string"
          },
          "active": {
            "type": "boolean"
          },
          "prices": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShopPrice"
            }
          },
          "contents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "number"
                },
                "type": {
                  "type": "string"
                },
                "ref": {
                  "type": "string"
                },
                "quantity": {
                  "type": "number"
                }
              },
              "required": [
                "id",
                "type",
                "ref",
                "quantity"
              ]
            }
          },
          "available": {
            "type": "boolean"
          },
          "display_ids": {
            "type": "array",
            "items": {
              "type": "number"
            }
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "image_url",
          "active",
          "prices",
          "contents",
          "available",
          "display_ids"
        ],
        "description": "one product in a shop display"
      },
      "ShopPrice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "price_ref": {
            "type": "string"
          },
          "type": {
            "type": "string"
          },
          "real": {
            "type": "object",
            "properties": {
              "price_usd": {
                "type": "number"
              }
            },
            "required": [
              "price_usd"
            ]
          },
          "recurring": {
            "type": "object",
            "properties": {
              "amount": {
                "type": "number"
              },
              "periodicity": {
                "type": "string"
              }
            },
            "required": [
              "amount",
              "periodicity"
            ]
          },
          "available": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "price_ref",
          "type",
          "available"
        ],
        "description": "one price of a shop product, real money or recurring"
      },
      "PlayerFollow": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "number"
          },
          "player_name": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "follow_state": {
            "type": "number"
          }
        },
        "required": [
          "player_id",
          "player_name",
          "date",
          "follow_state"
        ],
        "description": "one row of GET /players/:name/followers and /following"
      },
      "PlayerSale": {
        "type": "object",
        "properties": {
          "f": {
            "type": "number"
          },
          "t": {
            "type": "number"
          },
          "d": {
            "type": "string",
            "description": "YYYY-MM-DD"
          }
        },
        "required": [
          "f",
          "t",
          "d"
        ],
        "description": "one day of market sales: funds earned, count sold, date"
      },
      "PlayerSearchResult": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "number"
          },
          "player_name": {
            "type": "string"
          },
          "player_score": {
            "type": "number"
          }
        },
        "required": [
          "player_id",
          "player_name",
          "player_score"
        ],
        "description": "one hit of GET /players/search"
      },
      "PlayerSocialProfile": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "number"
          },
          "player_name": {
            "type": "string"
          },
          "player_clan": {
            "type": "string",
            "description": "absent without a clan"
          },
          "clan_id": {
            "type": "number"
          },
          "player_twitchname": {
            "type": "string"
          },
          "player_region": {
            "type": "number"
          },
          "player_badge": {
            "type": "string",
            "description": "comma separated badge ids"
          },
          "player_titles": {
            "type": "string",
            "description": "comma separated title ids"
          },
          "player_datenew": {
            "type": "string",
            "description": "\"YYYY-MM-DD HH:MM:SS\""
          },
          "player_featured": {
            "type": "number"
          },
          "player_funds": {
            "type": "number",
            "description": "kr"
          },
          "player_skinvalue": {
            "type": "number"
          },
          "player_elo": {
            "type": "number"
          },
          "player_elo2": {
            "type": "number"
          },
          "player_elo4": {
            "type": "string",
            "description": "junk rating, a decimal as text"
          },
          "player_premium": {
            "type": "number"
          },
          "player_kills": {
            "type": "number"
          },
          "player_deaths": {
            "type": "number"
          },
          "player_wins": {
            "type": "number"
          },
          "player_games_played": {
            "type": "number"
          },
          "player_score": {
            "type": "number"
          },
          "player_timeplayed": {
            "type": "number",
            "description": "seconds"
          },
          "player_following": {
            "type": "number"
          },
          "player_followed": {
            "type": "number"
          },
          "player_chal": {
            "type": "number"
          },
          "player_infected": {
            "type": "number"
          },
          "player_jobrating": {
            "type": "number"
          },
          "player_jobratingpositive": {
            "type": "number"
          },
          "player_calls": {
            "type": "number"
          },
          "player_taggedaccounts": {
            "type": "number"
          },
          "player_stats": {
            "$ref": "#/components/schemas/PlayerStats"
          },
          "online": {
            "type": "number"
          },
          "maps": {
            "type": "array",
            "items": {}
          },
          "mods": {
            "type": "array",
            "items": {}
          },
          "assets": {
            "type": "array",
            "items": {}
          },
          "match_history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MatchHistoryGame"
            },
            "description": "shape from the game code, only seen empty"
          },
          "ranked_rank": {
            "type": "number"
          },
          "raid_stats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RaidStats"
            }
          }
        },
        "required": [
          "player_id",
          "player_name",
          "player_twitchname",
          "player_region",
          "player_badge",
          "player_titles",
          "player_datenew",
          "player_featured",
          "player_funds",
          "player_skinvalue",
          "player_elo",
          "player_elo2",
          "player_elo4",
          "player_premium",
          "player_kills",
          "player_deaths",
          "player_wins",
          "player_games_played",
          "player_score",
          "player_timeplayed",
          "player_following",
          "player_followed",
          "player_chal",
          "player_infected",
          "player_jobrating",
          "player_jobratingpositive",
          "player_calls",
          "player_taggedaccounts",
          "player_stats",
          "online",
          "maps",
          "mods",
          "assets",
          "match_history",
          "ranked_rank",
          "raid_stats"
        ],
        "description": "GET /players/:name, the legacy flat profile the social popup renders"
      },
      "PlayerStats": {
        "type": "object",
        "properties": {
          "s": {
            "type": "number",
            "description": "shots"
          },
          "h": {
            "type": "number",
            "description": "hits"
          },
          "hs": {
            "type": "number",
            "description": "headshots"
          },
          "ls": {
            "type": "number",
            "description": "legshots"
          },
          "wb": {
            "type": "number",
            "description": "wallbangs"
          },
          "mk": {
            "type": "number",
            "description": "melee kills"
          },
          "fk": {
            "type": "number",
            "description": "fist kills (beatdowns)"
          },
          "tmk": {
            "type": "number",
            "description": "thrown weapon kills (bullseyes)"
          },
          "ast": {
            "type": "number",
            "description": "assists"
          },
          "n": {
            "type": "number",
            "description": "nukes"
          },
          "ad": {
            "type": "number",
            "description": "airdrops"
          },
          "sad": {
            "type": "number",
            "description": "airdrops stolen"
          },
          "sl": {
            "type": "number",
            "description": "slimes"
          },
          "wm": {
            "type": "number",
            "description": "warmachines"
          },
          "flg": {
            "type": "number",
            "description": "country flag index"
          },
          "hds": {
            "type": "number",
            "description": "1 when the profile hides details"
          },
          "c0": {
            "type": "number",
            "description": "score per class, c0 to c15"
          },
          "c1": {
            "type": "number",
            "description": "score with class 1"
          },
          "c2": {
            "type": "number",
            "description": "score with class 2"
          },
          "c3": {
            "type": "number",
            "description": "score with class 3"
          },
          "c4": {
            "type": "number",
            "description": "score with class 4"
          },
          "c5": {
            "type": "number",
            "description": "score with class 5"
          },
          "c6": {
            "type": "number",
            "description": "score with class 6"
          },
          "c7": {
            "type": "number",
            "description": "score with class 7"
          },
          "c8": {
            "type": "number",
            "description": "score with class 8"
          },
          "c9": {
            "type": "number",
            "description": "score with class 9"
          },
          "c10": {
            "type": "number",
            "description": "score with class 10"
          },
          "c11": {
            "type": "number",
            "description": "score with class 11"
          },
          "c12": {
            "type": "number",
            "description": "score with class 12"
          },
          "c13": {
            "type": "number",
            "description": "score with class 13"
          },
          "c14": {
            "type": "number",
            "description": "score with class 14"
          },
          "c15": {
            "type": "number",
            "description": "score with class 15"
          }
        },
        "required": [
          "ad",
          "ast",
          "fk",
          "flg",
          "h",
          "hds",
          "hs",
          "ls",
          "mk",
          "n",
          "s",
          "sad",
          "sl",
          "tmk",
          "wb",
          "wm"
        ],
        "description": "the packed stats blob of a social profile, the developer api's profile has the same numbers under full names"
      },
      "MatchHistoryGame": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "map": {
            "type": "number"
          },
          "duration": {
            "type": "number"
          },
          "mode": {
            "type": "number"
          },
          "season": {
            "type": "number"
          },
          "region": {
            "type": "number"
          },
          "is_competitive": {
            "type": "number"
          },
          "is_ranked": {
            "type": "number"
          },
          "match_history_processed": {
            "type": "number"
          },
          "historyEntries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MatchHistoryEntry"
            }
          },
          "score_alpha": {
            "type": "number"
          },
          "score_bravo": {
            "type": "number"
          }
        },
        "required": [
          "date",
          "map",
          "duration",
          "mode",
          "season",
          "region",
          "is_competitive",
          "is_ranked",
          "match_history_processed",
          "historyEntries",
          "score_alpha",
          "score_bravo"
        ],
        "description": "one match in a social profile's match_history"
      },
      "MatchHistoryEntry": {
        "type": "object",
        "properties": {
          "player_name": {
            "type": "string"
          },
          "accuracy": {
            "type": "number"
          },
          "assists": {
            "type": "number"
          },
          "damage_done": {
            "type": "number"
          },
          "deaths": {
            "type": "number"
          },
          "headshots": {
            "type": "number"
          },
          "kills": {
            "type": "number"
          },
          "objective_score": {
            "type": "number"
          },
          "score": {
            "type": "number"
          },
          "team": {
            "type": "number"
          },
          "rank": {
            "type": "number"
          },
          "mmr_change": {
            "type": "number"
          }
        },
        "required": [
          "player_name",
          "accuracy",
          "assists",
          "damage_done",
          "deaths",
          "headshots",
          "kills",
          "objective_score",
          "score",
          "team",
          "rank",
          "mmr_change"
        ],
        "description": "one player's line in a match of a social profile's match_history"
      },
      "RaidStats": {
        "type": "object",
        "properties": {
          "map_id": {
            "type": "number"
          },
          "completions": {
            "type": "number"
          },
          "attempts": {
            "type": "number"
          },
          "best_time": {
            "type": "number"
          },
          "ai_kills": {
            "type": "number"
          },
          "boss_kills": {
            "type": "number"
          },
          "deaths": {
            "type": "number"
          }
        },
        "required": [
          "map_id",
          "completions",
          "attempts",
          "best_time",
          "ai_kills",
          "boss_kills",
          "deaths"
        ],
        "description": "a player's raid stats on one map"
      },
      "GameListEntry": {
        "type": "array",
        "minItems": 6,
        "items": [
          {
            "type": "string"
          },
          {
            "type": "string"
          },
          {
            "type": "number"
          },
          {
            "type": "number"
          },
          {
            "$ref": "#/components/schemas/GameOptions"
          },
          {
            "type": "number"
          }
        ],
        "maxItems": 6,
        "description": "[game id, region key, players, max players, options, seconds left]"
      },
      "GameOptions": {
        "type": "object",
        "properties": {
          "v": {
            "type": "string",
            "description": "game version"
          },
          "g": {
            "type": "number",
            "description": "gamemode id, see GAMEMODES in the matchmaker module"
          },
          "c": {
            "type": "number",
            "description": "custom game"
          },
          "cm": {
            "type": "number"
          },
          "m": {
            "type": "number",
            "description": "map index"
          },
          "i": {
            "type": "string",
            "description": "map name"
          }
        },
        "required": [
          "v",
          "g",
          "c",
          "cm",
          "m",
          "i"
        ],
        "description": "the options object inside a game list entry"
      },
      "PingList": {
        "type": "object",
        "additionalProperties": {
          "type": "string"
        },
        "description": "region key (as in a game entry) -> lobby host:port to ping"
      },
      "GameList": {
        "type": "object",
        "properties": {
          "games": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/GameListEntry"
            }
          },
          "totalPlayerCount": {
            "type": "number"
          }
        },
        "required": [
          "games",
          "totalPlayerCount"
        ],
        "description": "GET /game-list, every public lobby"
      },
      "ItemSalesInfo": {
        "type": "object",
        "properties": {
          "ind": {
            "type": "number",
            "description": "skin index"
          },
          "high": {
            "type": "number",
            "description": "highest ask, 0 without listings"
          },
          "low": {
            "type": "number",
            "description": "lowest ask, 0 without listings"
          },
          "inC": {
            "type": "number",
            "description": "count in circulation"
          },
          "owners": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "player ids of the top 100 owners, the same 100 the item page lists, never the whole owner base"
          }
        },
        "required": [
          "ind",
          "high",
          "low",
          "inC",
          "owners"
        ],
        "description": "GET /market/items/:id/sales: the ask range, circulation and the top owners' player ids, despite the path no sales"
      },
      "MarketStats": {
        "type": "object",
        "properties": {
          "stats": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MarketStatRow"
            }
          },
          "has_more": {
            "type": "boolean"
          },
          "next_cursor": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "stats",
          "has_more",
          "next_cursor"
        ],
        "description": "GET /market/stats, paged by cursor"
      },
      "MarketStatRow": {
        "type": "object",
        "properties": {
          "ski": {
            "type": "number"
          },
          "inC": {
            "type": "number"
          },
          "onS": {
            "type": "number"
          },
          "high": {
            "type": "number"
          },
          "low": {
            "type": "number"
          }
        },
        "required": [
          "ski",
          "inC",
          "onS"
        ],
        "description": "one row of GET /market/stats: skin index, in circulation, on sale, and the ask range while something is listed"
      },
      "TopStreams": {
        "type": "object",
        "properties": {
          "streams": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Stream"
            }
          },
          "promo": {
            "type": "boolean"
          },
          "dropCampaigns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DropCampaign"
            }
          }
        },
        "required": [
          "streams",
          "promo",
          "dropCampaigns"
        ],
        "description": "GET api.krunker.io/streams/top"
      },
      "Stream": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "username": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "viewerCount": {
            "type": "number"
          },
          "thumbnailUrl": {
            "type": "string"
          },
          "startedAt": {
            "type": "string"
          },
          "provider": {
            "type": "string"
          },
          "featured": {
            "type": "boolean"
          },
          "languageCode": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "username",
          "title",
          "viewerCount",
          "thumbnailUrl",
          "startedAt",
          "provider",
          "featured",
          "languageCode"
        ],
        "description": "one live stream in the menu's stream box"
      },
      "DropCampaign": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "startDate": {
            "type": "number"
          },
          "endDate": {
            "type": "number"
          },
          "drops": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "itemId": {
                  "type": "number"
                }
              },
              "required": [
                "itemId"
              ]
            }
          },
          "startDateISO": {
            "type": "string"
          },
          "endDateISO": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "startDate",
          "endDate",
          "drops",
          "startDateISO",
          "endDateISO"
        ],
        "description": "a running drop campaign"
      },
      "ItemPrices": {
        "type": "array",
        "items": {
          "type": [
            "number",
            "null"
          ]
        },
        "description": "GET api.krunker.io/webhooks/general/items/prices: index = skin index, null = no price"
      },
      "LegacyModList": {
        "type": "object",
        "properties": {
          "index": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LegacyModRow"
            }
          }
        },
        "required": [
          "index",
          "data"
        ],
        "description": "GET api.krunker.io/webhooks/general/mods/list"
      },
      "LegacyModRow": {
        "type": "object",
        "properties": {
          "mod_id": {
            "type": "number"
          },
          "mod_name": {
            "type": "string"
          },
          "mod_votes": {
            "type": "number"
          },
          "creatorname": {
            "type": "string"
          },
          "mod_featured": {
            "type": "number"
          },
          "mod_url": {
            "type": "string"
          },
          "mod_info": {
            "type": "string",
            "description": "json text"
          },
          "mod_updatecounter": {
            "type": "number"
          }
        },
        "required": [
          "mod_id",
          "mod_name",
          "mod_votes",
          "creatorname",
          "mod_featured",
          "mod_url",
          "mod_info",
          "mod_updatecounter"
        ],
        "description": "one row of the legacy mod browser"
      },
      "LegacyMapList": {
        "type": "object",
        "properties": {
          "index": {
            "type": "string"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LegacyMapRow"
            }
          }
        },
        "required": [
          "index",
          "data"
        ],
        "description": "GET api.krunker.io/webhooks/general/maps/list"
      },
      "LegacyMapRow": {
        "type": "object",
        "properties": {
          "map_id": {
            "type": "number"
          },
          "map_name": {
            "type": "string"
          },
          "map_votes": {
            "type": "number"
          },
          "creatorname": {
            "type": "string"
          },
          "map_featured": {
            "type": "number"
          },
          "map_info": {
            "type": "string",
            "description": "json text"
          },
          "map_updatecounter": {
            "type": "number"
          },
          "map_pl": {
            "type": "number"
          },
          "fund": {
            "type": "number"
          },
          "category": {
            "type": "string"
          },
          "partner": {
            "type": "string"
          },
          "map_date": {
            "type": "string"
          }
        },
        "required": [
          "map_id",
          "map_name",
          "map_votes",
          "creatorname",
          "map_featured",
          "map_info",
          "map_updatecounter",
          "map_pl",
          "fund",
          "category",
          "partner",
          "map_date"
        ],
        "description": "one row of the legacy map browser"
      },
      "KrunkCupPlayerRow": {
        "type": "object",
        "properties": {
          "position": {
            "type": "number"
          },
          "player_name": {
            "type": "string"
          },
          "player_clan": {
            "type": "string"
          },
          "kills": {
            "type": "number"
          },
          "score": {
            "type": "number"
          },
          "games": {
            "type": "number"
          }
        },
        "required": [
          "position",
          "player_name",
          "player_clan",
          "kills",
          "score",
          "games"
        ],
        "description": "rows of /leaderboards/krunkcup/players and .../teams/:id/contributors"
      },
      "KrunkCupTeam": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "total_kills": {
            "type": "number"
          },
          "total_score": {
            "type": "number"
          },
          "total_games": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "total_kills",
          "total_score",
          "total_games"
        ],
        "description": "one row of GET /leaderboards/krunkcup/teams"
      },
      "RaidLeaderboardRow": {
        "type": "object",
        "properties": {
          "position": {
            "type": "number"
          },
          "player_name": {
            "type": "string"
          },
          "player_clan": {
            "type": "string"
          },
          "best_time": {
            "type": "number",
            "description": "milliseconds"
          },
          "completions": {
            "type": "number"
          }
        },
        "required": [
          "position",
          "player_name",
          "player_clan",
          "best_time",
          "completions"
        ],
        "description": "GET /leaderboards/raids/:mapId, 100 rows; map 31 is a raid map, 0 is not (\"invalid raid map ID\")"
      },
      "ClanLeaderboardRow": {
        "type": "object",
        "properties": {
          "position": {
            "type": "number"
          },
          "clan_name": {
            "type": "string"
          },
          "clan_score": {
            "type": "number"
          },
          "member_count": {
            "type": "number"
          },
          "hack_count": {
            "type": "number"
          }
        },
        "required": [
          "position",
          "clan_name",
          "clan_score",
          "member_count",
          "hack_count"
        ],
        "description": "one row of GET /leaderboards/player_clan"
      },
      "PlayerLeaderboardRow": {
        "type": "object",
        "properties": {
          "position": {
            "type": "number"
          },
          "player_name": {
            "type": "string"
          },
          "player_clan": {
            "type": "string"
          },
          "player_featured": {
            "type": "number"
          },
          "value": {
            "type": "number"
          }
        },
        "required": [
          "position",
          "player_name",
          "player_clan",
          "player_featured",
          "value"
        ],
        "description": "one row of a player leaderboard"
      },
      "ItemInstance": {
        "type": "object",
        "properties": {
          "nm": {
            "type": "string"
          },
          "serial": {
            "type": "number"
          },
          "wear": {
            "type": "number"
          }
        },
        "required": [
          "nm",
          "serial"
        ],
        "description": "one row of GET /items/:id/instances: the holder's name, the serial and the wear where the skin has one"
      },
      "ItemSale": {
        "$ref": "#/components/schemas/PlayerSale",
        "description": "one day of sales of an item: kr, count, date; GET /items/:id/sales and /market/items/:id/sales-statistics"
      },
      "ItemView": {
        "type": "object",
        "properties": {
          "stats": {
            "type": "object",
            "properties": {
              "onS": {
                "type": "number"
              },
              "high": {
                "type": "number"
              },
              "low": {
                "type": "number"
              },
              "inC": {
                "type": "number"
              }
            },
            "required": [
              "onS",
              "high",
              "low",
              "inC"
            ]
          },
          "owners": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ItemOwner"
            },
            "description": "the top 100 by count owned"
          },
          "sales": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ItemSale"
            },
            "description": "about the last two weeks, days with a sale"
          },
          "listings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ItemListing"
            },
            "description": "every live listing of the skin (41 of 42 seen, the one missing had sold between two calls)"
          },
          "stackable": {
            "type": "boolean"
          },
          "wearable": {
            "type": "boolean"
          }
        },
        "required": [
          "stats",
          "owners",
          "sales",
          "listings",
          "stackable",
          "wearable"
        ],
        "description": "GET /items/:id/view, the item page of the social market: the whole order book of the skin, not a page of it"
      },
      "ItemOwner": {
        "type": "object",
        "properties": {
          "nm": {
            "type": "string",
            "description": "name"
          },
          "ct": {
            "type": "number",
            "description": "count owned"
          },
          "su": {
            "type": "number",
            "description": "staff"
          },
          "ft": {
            "type": "number",
            "description": "featured (verified)"
          },
          "cr": {
            "type": "number"
          }
        },
        "required": [
          "nm",
          "ct",
          "su",
          "ft",
          "cr"
        ],
        "description": "one of an item's top owners, short keys as the game sends them"
      },
      "ItemListing": {
        "type": "object",
        "properties": {
          "uid": {
            "type": "number"
          },
          "marketid": {
            "type": "number"
          },
          "skinid": {
            "type": "number",
            "description": "the item instance"
          },
          "skinindex": {
            "type": "number"
          },
          "funds": {
            "type": "number",
            "description": "ask in kr"
          },
          "seller_id": {
            "type": "number"
          },
          "seller_name": {
            "type": "string"
          },
          "listed_time": {
            "type": "number",
            "description": "unix ms"
          },
          "m": {
            "type": "string",
            "description": "json text {\"wear\": 0.9013, \"serial\": 32}, only on wearable skins"
          }
        },
        "required": [
          "uid",
          "marketid",
          "skinid",
          "skinindex",
          "funds",
          "seller_id",
          "seller_name",
          "listed_time"
        ],
        "description": "one live listing on an item page, the same row the token tier's market/listings feed gives"
      },
      "CreatorEvents": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {}
          },
          "polls": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreatorPoll"
            }
          }
        },
        "required": [
          "events",
          "polls"
        ],
        "description": "GET /creators/events, the menu's event and survey box"
      },
      "CreatorPoll": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "ends_in": {
            "type": "number",
            "description": "seconds"
          }
        },
        "required": [
          "id",
          "title",
          "description",
          "ends_in"
        ],
        "description": "a running survey of GET /creators/events"
      },
      "Title": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "desc": {
            "type": "string"
          },
          "rarity": {
            "type": "number"
          },
          "requirements": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string"
                  },
                  "text": {
                    "type": "string"
                  }
                },
                "required": [
                  "kind",
                  "text"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "active": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "desc",
          "rarity",
          "requirements",
          "active"
        ],
        "description": "one player title of GET /titles"
      },
      "ModInfo": {
        "type": "object",
        "properties": {
          "mod_id": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "creator_name": {
            "type": "string"
          },
          "votes": {
            "type": "number"
          },
          "featured": {
            "type": "boolean"
          },
          "version": {
            "type": "number"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "required": [
          "mod_id",
          "name",
          "description",
          "creator_name",
          "votes",
          "featured",
          "version",
          "created_at",
          "updated_at"
        ],
        "description": "GET /mods/by-name/:name"
      },
      "CommunityMapLeaderboard": {
        "type": "object",
        "properties": {
          "page": {
            "type": "number"
          },
          "per_page": {
            "type": "number"
          },
          "map_name": {
            "type": "string"
          },
          "leaderboard_type": {
            "type": "string"
          },
          "leaderboard_order": {
            "type": "number"
          },
          "entries": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "page",
          "per_page",
          "map_name",
          "leaderboard_type",
          "leaderboard_order",
          "entries"
        ],
        "description": "GET /maps/by-name/:name/leaderboard"
      },
      "CommunityMap": {
        "type": "object",
        "properties": {
          "map_id": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "creator_name": {
            "type": "string"
          },
          "votes": {
            "type": "number"
          },
          "gameplays": {
            "type": "number"
          },
          "playtime": {
            "type": "number"
          },
          "category": {
            "type": "number"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "leaderboard_type": {
            "type": "string"
          },
          "leaderboard_order": {
            "type": "number"
          },
          "featured": {
            "type": "boolean"
          }
        },
        "required": [
          "map_id",
          "name",
          "description",
          "creator_name",
          "votes",
          "gameplays",
          "playtime",
          "category",
          "created_at",
          "updated_at",
          "leaderboard_type",
          "leaderboard_order",
          "featured"
        ],
        "description": "GET /maps/by-name/:name, the community map record (the official Burg is a different thing, see OfficialMap)"
      },
      "MapConfig": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "modes": {},
          "spawns": {
            "type": "array",
            "items": {}
          },
          "objects": {
            "type": "array",
            "items": {}
          },
          "sky": {},
          "skyDome": {}
        },
        "required": [
          "name"
        ],
        "description": "GET /maps/:id, the whole map file (120 KB for Burg), only the keys the client reads are named"
      },
      "OfficialMap": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "id": {
            "type": "number"
          }
        },
        "required": [
          "name",
          "id"
        ],
        "description": "GET /maps, index = id = preview image number at assets.krunker.io/img/maps/map_<id>.png"
      },
      "RecruitmentBoard": {
        "type": "object",
        "properties": {
          "posts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RecruitmentPost"
            }
          },
          "total": {
            "type": "number"
          },
          "page": {
            "type": "number"
          },
          "limit": {
            "type": "number"
          }
        },
        "required": [
          "posts",
          "total",
          "page",
          "limit"
        ],
        "description": "GET /clans/recruitment, paged"
      },
      "RecruitmentPost": {
        "type": "object",
        "properties": {
          "recruitment_id": {
            "type": "number"
          },
          "clan_id": {
            "type": "number"
          },
          "clan_name": {
            "type": "string"
          },
          "clan_logo": {
            "type": [
              "number",
              "null"
            ]
          },
          "description": {
            "type": "string"
          },
          "looking_for": {
            "type": "string"
          },
          "min_level": {
            "type": "number"
          },
          "min_kd": {
            "type": "number"
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "language": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_active": {
            "type": "number"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          },
          "created_by": {
            "type": "number"
          },
          "loot_mode": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LootDistributionMode"
              },
              {
                "type": "null"
              }
            ]
          },
          "loot_clan_pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "loot_top_player_count": {
            "type": [
              "number",
              "null"
            ]
          },
          "loot_top_player_pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "loot_remainder_pct": {
            "type": [
              "number",
              "null"
            ]
          },
          "loot_min_games": {
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "recruitment_id",
          "clan_id",
          "clan_name",
          "clan_logo",
          "description",
          "looking_for",
          "min_level",
          "min_kd",
          "region",
          "language",
          "is_active",
          "created_at",
          "updated_at",
          "created_by",
          "loot_mode",
          "loot_clan_pct",
          "loot_top_player_count",
          "loot_top_player_pct",
          "loot_remainder_pct",
          "loot_min_games"
        ],
        "description": "a clan's post on the recruitment board"
      },
      "LootDistributionMode": {
        "type": "string",
        "enum": [
          "clan_bank",
          "even",
          "top_weighted",
          "performance",
          "top_performance"
        ],
        "description": "how a clan splits its turf earnings"
      },
      "ClanMotd": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "set_by": {
            "type": "number"
          },
          "set_by_name": {
            "type": "string"
          },
          "set_at": {
            "type": "string"
          }
        },
        "required": [
          "message",
          "set_by",
          "set_by_name",
          "set_at"
        ],
        "description": "GET /clans/:id/motd"
      },
      "ClanLootConfig": {
        "type": "object",
        "properties": {
          "clan_id": {
            "type": "number"
          },
          "distribution_mode": {
            "$ref": "#/components/schemas/LootDistributionMode"
          },
          "clan_pct": {
            "type": "number",
            "description": "the treasury cut"
          },
          "top_player_count": {
            "type": "number"
          },
          "top_player_pct": {
            "type": "number",
            "description": "top_player_pct + remainder_pct = 100"
          },
          "remainder_pct": {
            "type": "number"
          },
          "min_games_required": {
            "type": "number"
          },
          "updated_at": {
            "type": "string"
          },
          "updated_by": {
            "type": "number"
          },
          "updated_by_name": {
            "type": "string"
          }
        },
        "required": [
          "clan_id",
          "distribution_mode",
          "clan_pct",
          "top_player_count",
          "top_player_pct",
          "remainder_pct",
          "min_games_required",
          "updated_at",
          "updated_by",
          "updated_by_name"
        ],
        "description": "GET /clans/:id/loot-config"
      },
      "ClanPublicProfile": {
        "type": "object",
        "properties": {
          "clan_id": {
            "type": "number"
          },
          "clan_name": {
            "type": "string"
          },
          "clan_score": {
            "type": "number"
          },
          "clan_funds": {
            "type": "number"
          },
          "clan_rank": {
            "type": "number"
          },
          "clan_link4": {
            "type": "string",
            "description": "discord invite code"
          },
          "clan_logo": {
            "type": [
              "number",
              "null"
            ],
            "description": "logo version, 0 or null without one; image at user-assets.krunker.io/clans/<clan_id>.png?v=<clan_logo>"
          },
          "clan_banner_color": {
            "type": "string",
            "description": "\"s<n>\" = paint shader n, otherwise a color"
          },
          "creator_name": {
            "type": "string"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClanPublicMember"
            }
          }
        },
        "required": [
          "clan_id",
          "clan_name",
          "clan_score",
          "clan_funds",
          "clan_rank",
          "clan_link4",
          "clan_logo",
          "clan_banner_color",
          "creator_name",
          "members"
        ],
        "description": "GET /clans/by-name/:name and /clans/:id/profile"
      },
      "ClanPublicMember": {
        "type": "object",
        "properties": {
          "p": {
            "type": "string",
            "description": "name"
          },
          "s": {
            "type": "number",
            "description": "score"
          },
          "r": {
            "type": "number",
            "description": "role: 0 recruit, 1 soldier, 2 captain, 3 commander; the creator is listed with 0"
          },
          "h": {
            "type": "number",
            "description": "hacker flag"
          },
          "pr": {
            "type": "number"
          },
          "ve": {
            "type": "number",
            "description": "verified"
          },
          "su": {
            "type": "number",
            "description": "staff"
          },
          "s7": {
            "type": "number",
            "description": "score of the last 7 days"
          }
        },
        "required": [
          "p",
          "s",
          "r",
          "h",
          "pr",
          "ve",
          "su",
          "s7"
        ],
        "description": "one member in a public clan profile, short keys as the game sends them"
      },
      "SkinDefinition": {
        "type": "object",
        "properties": {
          "index": {
            "type": "number",
            "description": "Skin index (ID)"
          },
          "name": {
            "type": "string",
            "description": "Skin name"
          },
          "type": {
            "type": "number",
            "description": "Skin type"
          },
          "rarity": {
            "type": "number",
            "description": "Skin rarity"
          },
          "weapon": {
            "type": "number",
            "description": "omitted when the skin has no weapon"
          },
          "seas": {
            "type": "number",
            "description": "the season; the docs call this field season"
          },
          "id": {
            "type": "number",
            "description": "undocumented, equals index on the single skin endpoint"
          },
          "thumbnail": {
            "type": "string",
            "description": "undocumented"
          },
          "tradable": {
            "type": "boolean",
            "description": "undocumented"
          }
        },
        "required": [
          "index",
          "name",
          "rarity",
          "type"
        ],
        "description": "extra config properties of a skin (creator, glow, frames, ...) get merged into the root, so the index signature is real"
      },
      "Skins": {
        "type": "object",
        "properties": {
          "page": {
            "type": "number",
            "description": "Current page number"
          },
          "per_page": {
            "type": "number",
            "description": "Items per page"
          },
          "total": {
            "type": "number",
            "description": "Total number of matching skins"
          },
          "skins": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SkinDefinition"
            },
            "description": "Array of skin objects"
          }
        },
        "required": [
          "page",
          "per_page",
          "total",
          "skins"
        ],
        "description": "GET /api/skins, paged skin definitions"
      },
      "PlayerPosts": {
        "type": "object",
        "properties": {
          "page": {
            "type": "number"
          },
          "per_page": {
            "type": "number"
          },
          "posts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlayerPost"
            }
          }
        },
        "required": [
          "page",
          "per_page",
          "posts"
        ],
        "description": "GET /api/player/:name/posts, 10 per page"
      },
      "PlayerPost": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string"
          },
          "text": {
            "type": "string"
          },
          "votes": {
            "type": "number"
          },
          "comment_count": {
            "type": "number"
          }
        },
        "required": [
          "date",
          "text",
          "votes",
          "comment_count"
        ],
        "description": "one social post of a player"
      },
      "PlayerMatches": {
        "type": "object",
        "properties": {
          "page": {
            "type": "number"
          },
          "per_page": {
            "type": "number"
          },
          "matches": {
            "anyOf": [
              {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PlayerMatch"
                }
              },
              {
                "type": "null"
              }
            ],
            "description": "null when the page is past the end"
          }
        },
        "required": [
          "page",
          "per_page",
          "matches"
        ],
        "description": "GET /api/player/:name/matches, 10 per page"
      },
      "PlayerMatch": {
        "type": "object",
        "properties": {
          "match_id": {
            "type": "number",
            "description": "Unique match identifier"
          },
          "date": {
            "type": "string",
            "description": "Match date (RFC3339 format)"
          },
          "map": {
            "type": "number",
            "description": "Map ID"
          },
          "duration": {
            "type": "number",
            "description": "Match duration in seconds"
          },
          "season": {
            "type": "number",
            "description": "Ranked season number"
          },
          "region": {
            "type": "number",
            "description": "Region ID"
          },
          "kills": {
            "type": "number",
            "description": "Player's kills in this match"
          },
          "deaths": {
            "type": "number",
            "description": "Player's deaths in this match"
          },
          "assists": {
            "type": "number",
            "description": "Player's assists in this match"
          },
          "score": {
            "type": "number",
            "description": "Player's score in this match"
          },
          "damage_done": {
            "type": "number",
            "description": "Player's damage dealt in this match"
          },
          "headshots": {
            "type": "number",
            "description": "Player's headshots in this match"
          },
          "accuracy": {
            "type": "number",
            "description": "Player's accuracy percentage"
          },
          "objective_score": {
            "type": "number",
            "description": "Player's objective score"
          },
          "kr": {
            "type": "number",
            "description": "KR earned from this match"
          },
          "victory": {
            "$ref": "#/components/schemas/MatchResult",
            "description": "Match result (1 = win, 0 = loss, -1 = draw)"
          },
          "rounds_won": {
            "type": "number",
            "description": "Rounds won by player's team"
          },
          "team": {
            "type": "number",
            "description": "Player's team number"
          },
          "play_time": {
            "type": "number",
            "description": "milliseconds"
          },
          "mmr": {
            "type": "number",
            "description": "rating after this match"
          }
        },
        "required": [
          "match_id",
          "date",
          "map",
          "duration",
          "season",
          "region",
          "kills",
          "deaths",
          "assists",
          "score",
          "damage_done",
          "headshots",
          "accuracy",
          "objective_score",
          "kr",
          "victory",
          "rounds_won",
          "team",
          "play_time",
          "mmr"
        ],
        "description": "one ranked match from a player's point of view"
      },
      "MatchResult": {
        "type": "number",
        "enum": [
          1,
          0,
          -1
        ],
        "description": "1 = win, 0 = loss, -1 = draw"
      },
      "PlayerListings": {
        "type": "object",
        "properties": {
          "page": {
            "type": "number"
          },
          "per_page": {
            "type": "number"
          },
          "listings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlayerListing"
            }
          }
        },
        "required": [
          "page",
          "per_page",
          "listings"
        ],
        "description": "GET /api/player/:name/listings, 10 per page"
      },
      "PlayerListing": {
        "type": "object",
        "properties": {
          "skin_index": {
            "type": "number",
            "description": "Identifier for the skin being sold"
          },
          "price": {
            "type": "number",
            "description": "Listing price in KR"
          },
          "listed_at": {
            "type": "string",
            "description": "When the listing was created"
          }
        },
        "required": [
          "skin_index",
          "price",
          "listed_at"
        ],
        "description": "one of a player's active market listings"
      },
      "InventoryItem": {
        "type": "object",
        "properties": {
          "skin_index": {
            "type": "number",
            "description": "Identifier for the skin"
          },
          "skin_id": {
            "type": "number",
            "description": "undocumented: id of the owned item, not the definition"
          },
          "count": {
            "type": "number",
            "description": "excludes market listings"
          },
          "metadata": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/InventoryItemMetadata"
              },
              {
                "type": "null"
              }
            ],
            "description": "undocumented, null without any"
          },
          "stackable": {
            "type": "boolean",
            "description": "undocumented"
          }
        },
        "required": [
          "skin_index",
          "skin_id",
          "count",
          "metadata",
          "stackable"
        ],
        "description": "one entry of GET /api/player/:name/inventory"
      },
      "InventoryItemMetadata": {
        "type": "object",
        "properties": {
          "wear": {
            "type": "number"
          },
          "style": {
            "type": "number"
          },
          "serial": {
            "type": "number"
          },
          "kills": {
            "type": "number"
          },
          "hskills": {
            "type": "number"
          },
          "headshots": {
            "type": "number"
          },
          "hits": {
            "type": "number"
          },
          "shots": {
            "type": "number"
          },
          "jumps": {
            "type": "number"
          }
        },
        "description": "undocumented: kounter stats and float data of one owned skin, every field optional; shape from the community wrapper"
      },
      "PlayerProfile": {
        "type": "object",
        "properties": {
          "player_id": {
            "type": "number",
            "description": "Unique player identifier"
          },
          "player_name": {
            "type": "string",
            "description": "Player's username"
          },
          "clan": {
            "type": "string",
            "description": "empty when not in a clan"
          },
          "verified": {
            "type": "boolean",
            "description": "Whether the player is verified"
          },
          "flag": {
            "type": "number",
            "description": "Player's country flag index"
          },
          "badges": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "Array of badge IDs the player has earned"
          },
          "following": {
            "type": "number",
            "description": "Number of players this player is following"
          },
          "followers": {
            "type": "number",
            "description": "Number of players following this player"
          },
          "ranked": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PlayerRanked"
            },
            "description": "one entry per region with 6+ placement matches this season"
          },
          "kr": {
            "type": "number",
            "description": "Currency balance"
          },
          "level": {
            "type": "number",
            "description": "Calculated from score (0.03 × √score, min 1)"
          },
          "junk": {
            "type": "number",
            "description": "ELO/Junk rating"
          },
          "inventory": {
            "type": "number",
            "description": "Total skin value"
          },
          "score": {
            "type": "number",
            "description": "Total score"
          },
          "spk": {
            "type": "number",
            "description": "Score per kill"
          },
          "kills": {
            "type": "number",
            "description": "Total kills"
          },
          "deaths": {
            "type": "number",
            "description": "Total deaths"
          },
          "kdr": {
            "type": "number",
            "description": "Kill/Death ratio"
          },
          "kpg": {
            "type": "number",
            "description": "Kills per game"
          },
          "games": {
            "type": "number",
            "description": "Games played"
          },
          "wins": {
            "type": "number",
            "description": "Games won"
          },
          "losses": {
            "type": "number",
            "description": "Games lost (games - wins)"
          },
          "assists": {
            "type": "number",
            "description": "Total assists"
          },
          "melees": {
            "type": "number",
            "description": "Melee kills"
          },
          "beatdowns": {
            "type": "number",
            "description": "Fist kills"
          },
          "bullseyes": {
            "type": "number",
            "description": "Thrown weapon kills"
          },
          "headshots": {
            "type": "number",
            "description": "Headshot kills"
          },
          "legshots": {
            "type": "number",
            "description": "Leg shot kills"
          },
          "wallbangs": {
            "type": "number",
            "description": "Wallbang kills"
          },
          "shots": {
            "type": "number",
            "description": "Total shots fired"
          },
          "hits": {
            "type": "number",
            "description": "Shots that connected"
          },
          "misses": {
            "type": "number",
            "description": "Shots missed (shots - hits)"
          },
          "time_played": {
            "type": "number",
            "description": "Seconds played"
          },
          "nukes": {
            "type": "number",
            "description": "Nukes called in"
          },
          "airdrops": {
            "type": "number",
            "description": "Airdrops called in"
          },
          "airdrops_stolen": {
            "type": "number",
            "description": "Airdrops stolen from enemies"
          },
          "slimes": {
            "type": "number",
            "description": "Slimes called in"
          },
          "juggernauts": {
            "type": "number",
            "description": "Juggernaut killstreaks earned"
          },
          "juggernauts_killed": {
            "type": "number",
            "description": "Enemy juggernauts killed"
          },
          "warmachines": {
            "type": "number",
            "description": "Warmachines called in"
          },
          "class_stats": {
            "type": "object",
            "additionalProperties": {
              "type": "number"
            },
            "description": "undocumented: class id -> score with that class"
          },
          "hacker_tagged": {
            "type": "boolean",
            "description": "Whether the player has been flagged as a cheater"
          },
          "kpd": {
            "type": "boolean",
            "description": "Whether the player is a KPD moderator"
          },
          "premium": {
            "type": "boolean",
            "description": "Whether the player has an active premium subscription"
          },
          "twitch_name": {
            "type": "string",
            "description": "undocumented, empty when not linked"
          },
          "profile_picture": {
            "type": "string",
            "description": "empty when not premium"
          },
          "created_at": {
            "type": "string",
            "description": "Account creation date (RFC3339 format)"
          },
          "maps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VotedItem"
            },
            "description": "undocumented: maps the player voted on, only seen empty so far"
          },
          "mods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VotedItem"
            },
            "description": "undocumented: mods the player voted on, only seen empty so far"
          }
        },
        "required": [
          "player_id",
          "player_name",
          "clan",
          "verified",
          "flag",
          "badges",
          "following",
          "followers",
          "ranked",
          "kr",
          "level",
          "junk",
          "inventory",
          "score",
          "spk",
          "kills",
          "deaths",
          "kdr",
          "kpg",
          "games",
          "wins",
          "losses",
          "assists",
          "melees",
          "beatdowns",
          "bullseyes",
          "headshots",
          "legshots",
          "wallbangs",
          "shots",
          "hits",
          "misses",
          "time_played",
          "nukes",
          "airdrops",
          "airdrops_stolen",
          "slimes",
          "juggernauts",
          "juggernauts_killed",
          "warmachines",
          "class_stats",
          "hacker_tagged",
          "kpd",
          "premium",
          "twitch_name",
          "profile_picture",
          "created_at",
          "maps",
          "mods"
        ],
        "description": "GET /api/player/:name"
      },
      "PlayerRanked": {
        "type": "object",
        "properties": {
          "region": {
            "type": "number",
            "description": "Region ID"
          },
          "mmr": {
            "type": "number",
            "description": "Matchmaking rating"
          },
          "wins": {
            "type": "number",
            "description": "Ranked wins in this region"
          },
          "losses": {
            "type": "number",
            "description": "Ranked losses in this region"
          },
          "kills": {
            "type": "number",
            "description": "Total kills in ranked matches"
          },
          "deaths": {
            "type": "number",
            "description": "Total deaths in ranked matches"
          },
          "assists": {
            "type": "number",
            "description": "Total assists in ranked matches"
          },
          "score": {
            "type": "number",
            "description": "Total score in ranked matches"
          },
          "damage_done": {
            "type": "number",
            "description": "Total damage dealt in ranked matches"
          },
          "time_played": {
            "type": "number",
            "description": "Total time played in ranked matches (seconds)"
          }
        },
        "required": [
          "region",
          "mmr",
          "wins",
          "losses",
          "kills",
          "deaths",
          "assists",
          "score",
          "damage_done",
          "time_played"
        ],
        "description": "a player's ranked stats in one region this season"
      },
      "VotedItem": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number"
          },
          "name": {
            "type": "string"
          },
          "votes": {
            "type": "number"
          }
        },
        "required": [
          "id",
          "name",
          "votes"
        ],
        "description": "undocumented: a map or mod the player voted on, shape from the community wrapper"
      },
      "Mod": {
        "type": "object",
        "properties": {
          "mod_id": {
            "type": "number",
            "description": "Unique mod identifier"
          },
          "name": {
            "type": "string",
            "description": "Mod name"
          },
          "description": {
            "type": "string",
            "description": "Mod description"
          },
          "creator_name": {
            "type": "string",
            "description": "Username of the mod creator"
          },
          "votes": {
            "type": "number",
            "description": "Number of upvotes"
          },
          "featured": {
            "type": "boolean",
            "description": "Whether the mod is featured"
          },
          "version": {
            "type": "number",
            "description": "Mod version number"
          },
          "created_at": {
            "type": "string",
            "description": "\"YYYY-MM-DD HH:MM:SS\", not rfc3339 like the docs say"
          },
          "updated_at": {
            "type": "string",
            "description": "When the mod was last updated (same format)"
          }
        },
        "required": [
          "mod_id",
          "name",
          "description",
          "creator_name",
          "votes",
          "featured",
          "version",
          "created_at",
          "updated_at"
        ],
        "description": "GET /api/mods/:name"
      },
      "Mods": {
        "type": "object",
        "properties": {
          "page": {
            "type": "number",
            "description": "Current page number"
          },
          "per_page": {
            "type": "number",
            "description": "Number of mods per page (10)"
          },
          "mods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Mod"
            },
            "description": "Array of mod objects"
          }
        },
        "required": [
          "page",
          "per_page",
          "mods"
        ],
        "description": "GET /api/mods, 10 per page"
      },
      "MatchDetails": {
        "type": "object",
        "properties": {
          "match_id": {
            "type": "number"
          },
          "date": {
            "type": "string"
          },
          "map": {
            "type": "number"
          },
          "duration": {
            "type": "number"
          },
          "season": {
            "type": "number"
          },
          "region": {
            "type": "number"
          },
          "participants": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MatchParticipant"
            },
            "description": "ordered by team, then score descending"
          }
        },
        "required": [
          "match_id",
          "date",
          "map",
          "duration",
          "season",
          "region",
          "participants"
        ],
        "description": "GET /api/match/:id"
      },
      "MatchParticipant": {
        "type": "object",
        "properties": {
          "player_name": {
            "type": "string"
          },
          "kills": {
            "type": "number",
            "description": "Player's kills in this match"
          },
          "deaths": {
            "type": "number",
            "description": "Player's deaths in this match"
          },
          "assists": {
            "type": "number",
            "description": "Player's assists in this match"
          },
          "score": {
            "type": "number",
            "description": "Player's score in this match"
          },
          "damage_done": {
            "type": "number",
            "description": "Player's damage dealt in this match"
          },
          "headshots": {
            "type": "number",
            "description": "Player's headshots in this match"
          },
          "accuracy": {
            "type": "number",
            "description": "Player's accuracy percentage"
          },
          "objective_score": {
            "type": "number",
            "description": "Player's objective score"
          },
          "victory": {
            "$ref": "#/components/schemas/MatchResult",
            "description": "Match result (1 = win, 0 = loss, -1 = draw)"
          },
          "rounds_won": {
            "type": "number",
            "description": "Rounds won by player's team"
          },
          "team": {
            "type": "number",
            "description": "Player's team number"
          },
          "play_time": {
            "type": "number",
            "description": "milliseconds"
          }
        },
        "required": [
          "player_name",
          "kills",
          "deaths",
          "assists",
          "score",
          "damage_done",
          "headshots",
          "accuracy",
          "objective_score",
          "victory",
          "rounds_won",
          "team",
          "play_time"
        ],
        "description": "one player of a ranked match"
      },
      "MarketSkin": {
        "type": "object",
        "properties": {
          "skin_index": {
            "type": "number",
            "description": "The skin index queried"
          },
          "total_listings": {
            "type": "number",
            "description": "Total number of active listings"
          },
          "lowest_price": {
            "type": "number",
            "description": "0 without listings"
          },
          "average_price": {
            "type": "number",
            "description": "sales of the last 7 days"
          },
          "total_circulating": {
            "type": "number",
            "description": "Total quantity of this skin in circulation"
          },
          "listings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MarketListing"
            },
            "description": "page of active listings, cheapest first"
          },
          "owners": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MarketOwner"
            },
            "description": "up to 100, most owned first, banned users excluded"
          },
          "price_history": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PricePoint"
            },
            "description": "only days with sales"
          }
        },
        "required": [
          "skin_index",
          "total_listings",
          "lowest_price",
          "average_price",
          "total_circulating",
          "listings",
          "owners",
          "price_history"
        ],
        "description": "GET /api/market/skin/:skinindex"
      },
      "MarketListing": {
        "type": "object",
        "properties": {
          "price": {
            "type": "number",
            "description": "Listing price in KR"
          },
          "seller_name": {
            "type": "string",
            "description": "Seller's username"
          },
          "listed_at": {
            "type": "string",
            "description": "When the listing was created"
          }
        },
        "required": [
          "price",
          "seller_name",
          "listed_at"
        ],
        "description": "one active listing of a skin on the market"
      },
      "MarketOwner": {
        "type": "object",
        "properties": {
          "player_name": {
            "type": "string",
            "description": "Owner's username"
          },
          "count": {
            "type": "number",
            "description": "Number of this skin the player owns"
          }
        },
        "required": [
          "player_name",
          "count"
        ],
        "description": "one owner in a skin's top owners"
      },
      "PricePoint": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "YYYY-MM-DD"
          },
          "average_price": {
            "type": "number",
            "description": "Average sale price on that day"
          },
          "sales": {
            "type": "number",
            "description": "Number of sales on that day"
          }
        },
        "required": [
          "date",
          "average_price",
          "sales"
        ],
        "description": "one day of a skin's price history"
      },
      "MapLeaderboardPlayer": {
        "type": "object",
        "properties": {
          "map_name": {
            "type": "string",
            "description": "The map name queried"
          },
          "leaderboard_type": {
            "$ref": "#/components/schemas/LeaderboardType",
            "description": "Type of leaderboard (e.g., \"time\", \"score\")"
          },
          "leaderboard_order": {
            "$ref": "#/components/schemas/LeaderboardOrder",
            "description": "Sort order (0 = ascending, 1 = descending)"
          },
          "player_name": {
            "type": "string",
            "description": "Player's username"
          },
          "position": {
            "type": "number",
            "description": "Player's position on the leaderboard"
          },
          "value": {
            "type": "number",
            "description": "Player's score or time value"
          },
          "date": {
            "type": "string",
            "description": "When the entry was recorded"
          }
        },
        "required": [
          "map_name",
          "leaderboard_type",
          "leaderboard_order",
          "player_name",
          "position",
          "value",
          "date"
        ],
        "description": "GET /api/map/:name/leaderboard/player/:player, one player's entry"
      },
      "LeaderboardType": {
        "type": "string",
        "enum": [
          "score",
          "time"
        ],
        "description": "which built in board a map has: score or time"
      },
      "LeaderboardOrder": {
        "type": "number",
        "enum": [
          0,
          1
        ],
        "description": "0 = ascending (lower is better), 1 = descending"
      },
      "MapLeaderboard": {
        "type": "object",
        "properties": {
          "page": {
            "type": "number",
            "description": "Current page number"
          },
          "per_page": {
            "type": "number",
            "description": "Number of entries per page (25)"
          },
          "map_name": {
            "type": "string",
            "description": "The map name queried"
          },
          "leaderboard_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LeaderboardType"
              },
              {
                "type": "string",
                "const": ""
              }
            ],
            "description": "Type of leaderboard (e.g., \"time\", \"score\")"
          },
          "leaderboard_order": {
            "$ref": "#/components/schemas/LeaderboardOrder",
            "description": "Sort order (0 = ascending, 1 = descending)"
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/MapLeaderboardEntry"
            },
            "description": "Array of leaderboard entries"
          }
        },
        "required": [
          "page",
          "per_page",
          "map_name",
          "leaderboard_type",
          "leaderboard_order",
          "entries"
        ],
        "description": "GET /api/map/:name/leaderboard, 25 per page"
      },
      "MapLeaderboardEntry": {
        "type": "object",
        "properties": {
          "position": {
            "type": "number",
            "description": "Leaderboard position"
          },
          "player_name": {
            "type": "string",
            "description": "Player's username"
          },
          "value": {
            "type": "number",
            "description": "Score or time value"
          },
          "date": {
            "type": "string",
            "description": "When the entry was recorded"
          }
        },
        "required": [
          "position",
          "player_name",
          "value",
          "date"
        ],
        "description": "one row of a map leaderboard"
      },
      "FeaturedMaps": {
        "type": "object",
        "properties": {
          "maps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/FeaturedMap"
            }
          },
          "count": {
            "type": "number",
            "description": "Number of maps returned"
          }
        },
        "required": [
          "maps",
          "count"
        ],
        "description": "GET /api/maps/featured"
      },
      "FeaturedMap": {
        "type": "object",
        "properties": {
          "map_id": {
            "type": "number",
            "description": "Unique map identifier"
          },
          "name": {
            "type": "string",
            "description": "Map name"
          },
          "creator_id": {
            "type": "number",
            "description": "Player id of the map creator"
          },
          "creator_name": {
            "type": "string",
            "description": "Username of the map creator"
          }
        },
        "required": [
          "map_id",
          "name",
          "creator_id",
          "creator_name"
        ],
        "description": "one featured map"
      },
      "MapInfo": {
        "type": "object",
        "properties": {
          "map_id": {
            "type": "number",
            "description": "Unique map identifier"
          },
          "name": {
            "type": "string",
            "description": "Map name"
          },
          "description": {
            "type": "string",
            "description": "Map description"
          },
          "creator_name": {
            "type": "string",
            "description": "Username of the map creator"
          },
          "votes": {
            "type": "number",
            "description": "Total upvotes"
          },
          "gameplays": {
            "type": "number",
            "description": "Number of times the map has been played"
          },
          "playtime": {
            "type": "number",
            "description": "milliseconds"
          },
          "category": {
            "type": "number",
            "description": "Map category ID"
          },
          "created_at": {
            "type": "string",
            "description": "\"YYYY-MM-DD HH:MM:SS\", not rfc3339 like the docs say"
          },
          "updated_at": {
            "type": "string",
            "description": "When the map was last updated"
          },
          "leaderboard_type": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/LeaderboardType"
              },
              {
                "type": "string",
                "const": ""
              }
            ],
            "description": "\"time\", \"score\" or empty when the map has no leaderboard"
          },
          "leaderboard_order": {
            "$ref": "#/components/schemas/LeaderboardOrder",
            "description": "Sort order for leaderboard (0 = ascending/lower is better, 1 = descending/higher is better)"
          },
          "featured": {
            "type": "boolean",
            "description": "undocumented"
          }
        },
        "required": [
          "map_id",
          "name",
          "description",
          "creator_name",
          "votes",
          "gameplays",
          "playtime",
          "category",
          "created_at",
          "updated_at",
          "leaderboard_type",
          "leaderboard_order",
          "featured"
        ],
        "description": "GET /api/map/:name"
      },
      "RankedLeaderboard": {
        "type": "object",
        "properties": {
          "page": {
            "type": "number",
            "description": "Current page number"
          },
          "per_page": {
            "type": "number",
            "description": "Number of entries per page (10)"
          },
          "season": {
            "type": "number",
            "description": "Current ranked season"
          },
          "region": {
            "type": "number",
            "description": "Region ID"
          },
          "entries": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LeaderboardEntry"
            },
            "description": "Array of leaderboard entries"
          }
        },
        "required": [
          "page",
          "per_page",
          "season",
          "region",
          "entries"
        ],
        "description": "GET /api/leaderboard/:region, 10 per page"
      },
      "LeaderboardEntry": {
        "type": "object",
        "properties": {
          "position": {
            "type": "number",
            "description": "Leaderboard position"
          },
          "player_name": {
            "type": "string",
            "description": "Player's username"
          },
          "mmr": {
            "type": "number",
            "description": "Matchmaking rating"
          },
          "wins": {
            "type": "number",
            "description": "Total ranked wins"
          },
          "losses": {
            "type": "number",
            "description": "Total ranked losses"
          },
          "kills": {
            "type": "number",
            "description": "Total kills in ranked matches"
          },
          "deaths": {
            "type": "number",
            "description": "Total deaths in ranked matches"
          },
          "assists": {
            "type": "number",
            "description": "Total assists in ranked matches"
          },
          "score": {
            "type": "number",
            "description": "Total score in ranked matches"
          },
          "damage_done": {
            "type": "number",
            "description": "Total damage dealt in ranked matches"
          }
        },
        "required": [
          "position",
          "player_name",
          "mmr",
          "wins",
          "losses",
          "kills",
          "deaths",
          "assists",
          "score",
          "damage_done"
        ],
        "description": "one row of the ranked leaderboard"
      },
      "KpdCall": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "Report id"
          },
          "date": {
            "type": "string",
            "description": "rfc3339 utc"
          },
          "caller_id": {
            "type": "number",
            "description": "Reporter player id"
          },
          "caller_name": {
            "type": "string",
            "description": "Reporter name"
          },
          "caller_score": {
            "type": "number",
            "description": "Reporter score"
          },
          "caller_job_rating": {
            "type": "number",
            "description": "Reporter's total KPD job rating"
          },
          "caller_job_rating_positive": {
            "type": "number",
            "description": "correct calls of the reporter"
          },
          "called_id": {
            "type": "number",
            "description": "Reported player id"
          },
          "called_name": {
            "type": "string",
            "description": "\"guest\" when unregistered"
          },
          "called_score": {
            "type": "number",
            "description": "Reported player score"
          },
          "kdf_type": {
            "$ref": "#/components/schemas/KpdCallContext",
            "description": "Call context: 0=public, 1=ranked, 2=comp, 3=custom"
          },
          "kdf_type_label": {
            "type": "string",
            "description": "Readable kdf_type"
          },
          "status": {
            "$ref": "#/components/schemas/KpdCallStatus",
            "description": "1=not responded, 2=responded, 3=reviewed"
          },
          "status_label": {
            "type": "string",
            "description": "Readable status"
          },
          "rating": {
            "$ref": "#/components/schemas/KpdCallRating",
            "description": "Officer verdict: 0=pending, 1=banned, 2=rejected"
          },
          "rating_label": {
            "type": "string",
            "description": "Readable rating"
          },
          "officer_id": {
            "type": "number",
            "description": "0 without one"
          },
          "officer_name": {
            "type": "string",
            "description": "Officer name"
          },
          "status_date": {
            "type": "string",
            "description": "last status change, rfc3339 utc"
          },
          "game_code": {
            "type": "string",
            "description": "Game instance code"
          },
          "host": {
            "type": "string",
            "description": "Game server host"
          },
          "port": {
            "type": "string",
            "description": "Game server port"
          },
          "token": {
            "type": "string",
            "description": "internal call token"
          }
        },
        "required": [
          "id",
          "date",
          "caller_id",
          "caller_name",
          "caller_score",
          "caller_job_rating",
          "caller_job_rating_positive",
          "called_id",
          "called_name",
          "called_score",
          "kdf_type",
          "kdf_type_label",
          "status",
          "status_label",
          "rating",
          "rating_label",
          "officer_id",
          "officer_name",
          "status_date",
          "game_code",
          "host",
          "port",
          "token"
        ],
        "description": "one row of GET /api/kpd/latest-calls"
      },
      "KpdCallContext": {
        "type": "number",
        "enum": [
          0,
          1,
          2,
          3
        ],
        "description": "0 public, 1 ranked, 2 comp, 3 custom"
      },
      "KpdCallStatus": {
        "type": "number",
        "enum": [
          1,
          2,
          3
        ],
        "description": "1 not responded, 2 responded, 3 reviewed"
      },
      "KpdCallRating": {
        "type": "number",
        "enum": [
          0,
          1,
          2
        ],
        "description": "0 pending, 1 banned, 2 rejected"
      },
      "EventsPage": {
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ApiEvent"
            },
            "description": "oldest first"
          },
          "next": {
            "type": "number",
            "description": "pass as `after` on the next call, it also moves past events the filters skipped"
          },
          "has_more": {
            "type": "boolean"
          }
        },
        "required": [
          "events",
          "next",
          "has_more"
        ],
        "description": "GET /api/events"
      },
      "ApiEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "number",
            "description": "only ever increases, gaps are normal"
          },
          "type": {
            "$ref": "#/components/schemas/EventType"
          },
          "created_at": {
            "type": "string",
            "description": "rfc3339 utc"
          },
          "target": {
            "$ref": "#/components/schemas/EventTarget"
          },
          "data": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/MapEventData"
              },
              {
                "type": "object",
                "additionalProperties": {}
              }
            ]
          }
        },
        "required": [
          "id",
          "type",
          "created_at",
          "target",
          "data"
        ],
        "description": "one event of GET /api/events or of a webhook delivery"
      },
      "EventType": {
        "type": "string",
        "description": "the types documented so far; a key only sees the types of the event scopes it holds"
      },
      "EventTarget": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "id": {
            "type": [
              "number",
              "string"
            ]
          }
        },
        "required": [
          "type",
          "id"
        ],
        "description": "what an event is about, e.g. type \"map\" and the map id"
      },
      "MapEventData": {
        "type": "object",
        "properties": {
          "map_id": {
            "type": "number"
          },
          "map_name": {
            "type": "string"
          },
          "creator": {
            "type": "string"
          }
        },
        "required": [
          "map_id",
          "map_name",
          "creator"
        ],
        "description": "data of map.featured and map.unfeatured"
      },
      "ClanMembers": {
        "type": "object",
        "properties": {
          "page": {
            "type": "number"
          },
          "per_page": {
            "type": "number"
          },
          "members": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ClanMember"
            }
          }
        },
        "required": [
          "page",
          "per_page",
          "members"
        ],
        "description": "GET /api/clan/:name/members, 10 per page"
      },
      "ClanMember": {
        "type": "object",
        "properties": {
          "player_name": {
            "type": "string",
            "description": "Member's username"
          },
          "role": {
            "type": "number",
            "description": "Member's role in the clan"
          },
          "verified": {
            "type": "boolean",
            "description": "Whether the player is verified"
          },
          "score": {
            "type": "number",
            "description": "undocumented"
          }
        },
        "required": [
          "player_name",
          "role",
          "verified",
          "score"
        ],
        "description": "one row of a clan's member list"
      },
      "ClanProfile": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Clan name"
          },
          "owner_name": {
            "type": "string",
            "description": "Name of the clan owner"
          },
          "score": {
            "type": "number",
            "description": "Clan's total score"
          },
          "rank": {
            "type": "number",
            "description": "Clan's leaderboard rank"
          },
          "member_count": {
            "type": "number",
            "description": "Number of members in the clan"
          },
          "created_at": {
            "type": "string",
            "description": "Clan creation date"
          },
          "discord": {
            "type": "string",
            "description": "discord invite code, empty when not set"
          }
        },
        "required": [
          "name",
          "owner_name",
          "score",
          "rank",
          "member_count",
          "created_at",
          "discord"
        ],
        "description": "GET /api/clan/:name"
      },
      "EnvelopeError": {
        "type": "object",
        "description": "an error reply of gapi: data is null and error carries a code and a message",
        "properties": {
          "data": {
            "type": "null"
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        },
        "required": [
          "data",
          "error"
        ]
      }
    }
  }
}
