{
  "openapi": "3.1.0",
  "info": {
    "title": "Elemental Clash Developer API",
    "version": "v1",
    "description": "Read-only public game data. A personal API key normally requires a linked game account at player level 5. Default allowance is 100 requests per minute per key; administration can override it. Resetting a key does not reset the owner rate window. Keys must be sent in a header, never a URL. Cookies do not authenticate v1 endpoints. Every public response has an array data and metadata meta. Single-resource lookups return one item; lists return flat entities. Errors return data: [] and meta.code/message with the appropriate HTTP status. Need a higher usage limit? Contact an admin to apply.",
    "contact": {
      "url": "https://elementclash.io/"
    }
  },
  "servers": [
    {
      "url": "https://api.elementclash.io"
    }
  ],
  "security": [
    {
      "BearerApiKey": []
    },
    {
      "HeaderApiKey": []
    }
  ],
  "paths": {
    "/v1/profile": {
      "get": {
        "operationId": "getPlayerProfile",
        "summary": "Find a public player profile",
        "description": "Supply exactly one of id, username or discord_id. Names must match one account; use id when a name is ambiguous. Private profiles expose basic identity only. Success data is a flat array; metadata and pagination, where applicable, are in meta. Errors return an empty data array with meta.code and meta.message.",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Exact player ID. Exclusive with username and discord_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "username",
            "in": "query",
            "required": false,
            "description": "Exact game username. Exclusive with id and discord_id.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "discord_id",
            "in": "query",
            "required": false,
            "description": "Linked Discord ID as a string. Exclusive with id and username.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful read-only response; data is always an array.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "Current window reset time, Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProfileResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "405": {
            "$ref": "#/components/responses/Error405"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/v1/arena": {
      "get": {
        "operationId": "getLiveArena",
        "summary": "Read current public arena state",
        "description": "Supply exactly one of id or name. Public roster sampled every 5 seconds, expired after 15 seconds without a fresh report. Success data is a flat array; metadata and pagination, where applicable, are in meta. Errors return an empty data array with meta.code and meta.message.",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Exact arena ID. Exclusive with name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Arena name, for example ascendant. Exclusive with id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful read-only response; data is always an array.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "Current window reset time, Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "405": {
            "$ref": "#/components/responses/Error405"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/v1/arena/list": {
      "get": {
        "operationId": "listActiveArenas",
        "summary": "List active public arenas",
        "description": "No query parameters or pagination. Returns only active public arenas; private Practice worlds are excluded. Counts come from the same invisible-player-filtered view as /v1/arena: players counts visible humans, bots counts visible bots, totalPlayers counts both. No player identities, full rosters, WebSocket URLs, ping URLs or private connection metadata. Reports are sampled every 5 seconds; arenas expire after 15 seconds. An active arena missing its roster state returns SERVICE_UNAVAILABLE rather than an invented count. Success data is a flat array; metadata and pagination, where applicable, are in meta. Errors return an empty data array with meta.code and meta.message.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful read-only response; data is always an array.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "Current window reset time, Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ArenaDirectoryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "405": {
            "$ref": "#/components/responses/Error405"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/v1/leaderboard": {
      "get": {
        "operationId": "getLeaderboard",
        "summary": "Read global leaderboard entries",
        "description": "Select a ranking category and page. champion applies to matching champion rankings; element applies to mastery. Success data is a flat array; metadata and pagination, where applicable, are in meta. Errors return an empty data array with meta.code and meta.message.",
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "required": false,
            "description": "Ranking category. Aliases: score, eliminations, clans, time.",
            "schema": {
              "type": "string",
              "default": "totalScore",
              "enum": [
                "totalScore",
                "kills",
                "highscore",
                "highestKillstreak",
                "crowns",
                "xp",
                "clanXp",
                "assists",
                "deaths",
                "playtime",
                "damageDealt",
                "damageTaken",
                "mastery",
                "score",
                "eliminations",
                "clans",
                "time"
              ]
            }
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "One-based page number.",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "description": "Rows per page.",
            "schema": {
              "type": "integer",
              "default": 10,
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "champion",
            "in": "query",
            "required": false,
            "description": "Champion filter for supported categories.",
            "schema": {
              "type": "string",
              "default": "overall"
            }
          },
          {
            "name": "element",
            "in": "query",
            "required": false,
            "description": "Mastery element filter.",
            "schema": {
              "type": "string",
              "default": "overall"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful read-only response; data is always an array.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "Current window reset time, Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LeaderboardResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "405": {
            "$ref": "#/components/responses/Error405"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/v1/clans": {
      "get": {
        "operationId": "getClan",
        "summary": "Find one public clan",
        "description": "Supply exactly one of id, name or tag. Clan tag does not include brackets. Private individual presence and member rank progression remain excluded. Success data is a flat array; metadata and pagination, where applicable, are in meta. Errors return an empty data array with meta.code and meta.message.",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "description": "Exact clan ID. Exclusive with name and tag.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "name",
            "in": "query",
            "required": false,
            "description": "Exact clan name. Exclusive with id and tag.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "description": "Clan tag without square brackets. Exclusive with id and name.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful read-only response; data is always an array.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "Current window reset time, Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClanResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "405": {
            "$ref": "#/components/responses/Error405"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/v1/clans/list": {
      "get": {
        "operationId": "listClans",
        "summary": "Browse public clan summaries",
        "description": "Returns public summaries with pagination; use /v1/clans for full public details. Success data is a flat array; metadata and pagination, where applicable, are in meta. Errors return an empty data array with meta.code and meta.message.",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "required": false,
            "description": "One-based page number.",
            "schema": {
              "type": "integer",
              "default": 1,
              "minimum": 1
            }
          },
          {
            "name": "size",
            "in": "query",
            "required": false,
            "description": "Rows per page.",
            "schema": {
              "type": "integer",
              "default": 10,
              "minimum": 1,
              "maximum": 100
            }
          },
          {
            "name": "search",
            "in": "query",
            "required": false,
            "description": "Search names and tags.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful read-only response; data is always an array.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "Current window reset time, Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ClanDirectoryResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "405": {
            "$ref": "#/components/responses/Error405"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/v1/store": {
      "get": {
        "operationId": "getCurrentStore",
        "summary": "Read the public store",
        "description": "Current public offers only. No purchases or private account balances. Success data is a flat array; metadata and pagination, where applicable, are in meta. Errors return an empty data array with meta.code and meta.message.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful read-only response; data is always an array.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "Current window reset time, Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StoreResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "405": {
            "$ref": "#/components/responses/Error405"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    },
    "/v1/events": {
      "get": {
        "operationId": "getActiveEvents",
        "summary": "Read active public events",
        "description": "Read active public scheduled effects and current arena events. No query parameters. Arena information is sampled every 5 seconds and expires after 15 seconds without a report. Success data is a flat array; metadata and pagination, where applicable, are in meta. Errors return an empty data array with meta.code and meta.message. Entities have type boost, quest or arena; an inactive period returns an empty array.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "Successful read-only response; data is always an array.",
            "headers": {
              "X-RateLimit-Limit": {
                "description": "Requests allowed per minute.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Remaining": {
                "description": "Requests remaining in the current window.",
                "schema": {
                  "type": "integer",
                  "minimum": 0
                }
              },
              "X-RateLimit-Reset": {
                "description": "Current window reset time, Unix seconds.",
                "schema": {
                  "type": "integer"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EventsResponse"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error400"
          },
          "401": {
            "$ref": "#/components/responses/Error401"
          },
          "403": {
            "$ref": "#/components/responses/Error403"
          },
          "404": {
            "$ref": "#/components/responses/Error404"
          },
          "405": {
            "$ref": "#/components/responses/Error405"
          },
          "409": {
            "$ref": "#/components/responses/Error409"
          },
          "429": {
            "$ref": "#/components/responses/Error429"
          },
          "503": {
            "$ref": "#/components/responses/Error503"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "ec_live_<64 lowercase hex>",
        "description": "Personal API key, shown only when created or reset."
      },
      "HeaderApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Alternative to Authorization: Bearer."
      }
    },
    "schemas": {
      "Meta": {
        "type": "object",
        "required": [
          "apiVersion",
          "requestId",
          "serverTime",
          "count",
          "code"
        ],
        "properties": {
          "apiVersion": {
            "const": "v1"
          },
          "requestId": {
            "type": "string"
          },
          "serverTime": {
            "type": "integer",
            "description": "Server clock in Unix milliseconds."
          },
          "count": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of entities in data."
          },
          "code": {
            "type": "string",
            "enum": [
              "OK",
              "API_KEY_REQUIRED",
              "API_KEY_INVALID",
              "API_KEY_DISABLED",
              "API_KEY_BANNED",
              "ACCOUNT_BANNED",
              "LEVEL_REQUIRED",
              "INVALID_QUERY",
              "NOT_FOUND",
              "AMBIGUOUS_SELECTOR",
              "RATE_LIMITED",
              "METHOD_NOT_ALLOWED",
              "SERVICE_UNAVAILABLE"
            ]
          },
          "message": {
            "type": "string",
            "description": "Error description on non-success responses."
          },
          "page": {
            "type": "integer",
            "minimum": 1
          },
          "size": {
            "type": "integer",
            "minimum": 1,
            "maximum": 100
          },
          "total": {
            "type": "integer",
            "minimum": 0
          },
          "pages": {
            "type": "integer",
            "minimum": 0
          },
          "category": {
            "type": "string"
          },
          "filters": {
            "type": "object",
            "additionalProperties": true
          },
          "currency": {
            "type": "string"
          },
          "enabled": {
            "type": "boolean"
          },
          "revision": {
            "type": [
              "string",
              "number"
            ]
          },
          "serverNow": {
            "type": "integer"
          },
          "stacking": {
            "description": "Public stacking policy for active effects."
          }
        },
        "additionalProperties": true
      },
      "Error": {
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "type": "array",
            "maxItems": 0,
            "items": {}
          },
          "meta": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Meta"
              },
              {
                "type": "object",
                "required": [
                  "code",
                  "message"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "enum": [
                      "API_KEY_REQUIRED",
                      "API_KEY_INVALID",
                      "API_KEY_DISABLED",
                      "API_KEY_BANNED",
                      "ACCOUNT_BANNED",
                      "LEVEL_REQUIRED",
                      "INVALID_QUERY",
                      "NOT_FOUND",
                      "AMBIGUOUS_SELECTOR",
                      "RATE_LIMITED",
                      "METHOD_NOT_ALLOWED",
                      "SERVICE_UNAVAILABLE"
                    ]
                  },
                  "message": {
                    "type": "string"
                  }
                }
              }
            ]
          }
        },
        "additionalProperties": false
      },
      "Profile": {
        "type": "object",
        "description": "The same normally viewable public player identity, statistics, clan and mastery. A private profile exposes basic identity only. Linked account credentials and private account data are never returned.",
        "additionalProperties": true
      },
      "VisiblePlayer": {
        "type": "object",
        "description": "Current arena-visible player fields, such as identity, score, kills, deaths, level and clan. Private account data is excluded.",
        "additionalProperties": true,
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "champion": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "level": {
            "type": "integer",
            "minimum": 0
          },
          "kills": {
            "type": "integer",
            "minimum": 0
          },
          "deaths": {
            "type": "integer",
            "minimum": 0
          },
          "assists": {
            "type": "integer",
            "minimum": 0
          },
          "score": {
            "type": "number"
          },
          "kd": {
            "type": "number"
          },
          "dead": {
            "type": "boolean"
          },
          "spectating": {
            "type": "boolean"
          },
          "bot": {
            "type": "boolean"
          },
          "king": {
            "type": "boolean"
          },
          "clanId": {
            "type": [
              "string",
              "null"
            ]
          },
          "clan": {
            "type": [
              "object",
              "null"
            ],
            "description": "Public clan identity only.",
            "additionalProperties": true
          }
        }
      },
      "Arena": {
        "type": "object",
        "description": "Arena metadata and a public roster sampled every 5 seconds; data expires after 15 seconds without a fresh report.",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "players": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/VisiblePlayer"
            }
          },
          "playerCount": {
            "type": "integer",
            "minimum": 0
          },
          "humanCount": {
            "type": "integer",
            "minimum": 0
          },
          "botCount": {
            "type": "integer",
            "minimum": 0
          },
          "kingId": {
            "type": [
              "string",
              "null"
            ]
          },
          "asOf": {
            "type": "integer",
            "description": "Unix timestamp in milliseconds."
          },
          "updatedAt": {
            "type": "integer",
            "description": "Unix timestamp in milliseconds."
          },
          "mapId": {
            "type": [
              "string",
              "null"
            ]
          },
          "mapVersion": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": [
              "string",
              "null"
            ]
          },
          "phase": {
            "type": [
              "string",
              "null"
            ]
          },
          "capacity": {
            "type": "integer",
            "minimum": 0
          },
          "roundTimeLeft": {
            "type": "number",
            "description": "Seconds left in the current round."
          },
          "roundInfinite": {
            "type": "boolean"
          },
          "paused": {
            "type": "boolean"
          },
          "eventsDisabled": {
            "type": "boolean"
          },
          "activeEvents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "timeLeft": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              },
              "additionalProperties": true
            }
          }
        },
        "additionalProperties": true
      },
      "Clan": {
        "type": "object",
        "description": "Public clan details, aggregate XP and level, global position and roster. Members include public role, contributed XP and member rank. Aggregate onlineCount, individual presence, requests, invitations, administrative state and private rank-progression details are excluded.",
        "additionalProperties": true
      },
      "ProfileResponse": {
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Profile"
            },
            "minItems": 1,
            "maxItems": 1
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "ArenaResponse": {
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Arena"
            },
            "minItems": 1,
            "maxItems": 1
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "ClanResponse": {
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Clan"
            },
            "minItems": 1,
            "maxItems": 1
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "LeaderboardResponse": {
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LeaderboardEntry"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "ClanDirectoryResponse": {
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Clan"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "StoreResponse": {
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/StoreOffer"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "EventsResponse": {
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublicEvent"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "ArenaSummary": {
        "type": "object",
        "required": [
          "id",
          "name",
          "region",
          "capacity",
          "mapId",
          "mapVersion",
          "players",
          "bots",
          "totalPlayers"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "capacity": {
            "type": "integer",
            "minimum": 0
          },
          "mapId": {
            "type": [
              "string",
              "null"
            ]
          },
          "mapVersion": {
            "type": [
              "string",
              "null"
            ]
          },
          "players": {
            "type": "integer",
            "minimum": 0,
            "description": "Visible human players."
          },
          "bots": {
            "type": "integer",
            "minimum": 0,
            "description": "Visible bot players."
          },
          "totalPlayers": {
            "type": "integer",
            "minimum": 0,
            "description": "Visible humans and bots combined."
          },
          "phase": {
            "type": "string"
          },
          "roundTimeLeft": {
            "type": "number",
            "description": "Seconds remaining."
          },
          "roundInfinite": {
            "type": "boolean"
          },
          "paused": {
            "type": "boolean"
          },
          "eventsDisabled": {
            "type": "boolean"
          },
          "asOf": {
            "type": "integer",
            "description": "Snapshot Unix timestamp in milliseconds."
          },
          "updatedAt": {
            "type": "integer",
            "description": "Snapshot Unix timestamp in milliseconds."
          }
        },
        "additionalProperties": false
      },
      "ArenaDirectoryResponse": {
        "type": "object",
        "required": [
          "data",
          "meta"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ArenaSummary"
            }
          },
          "meta": {
            "$ref": "#/components/schemas/Meta"
          }
        }
      },
      "LeaderboardEntry": {
        "type": "object",
        "description": "One ranking entry with its rank, identity and value. Category, pagination and filters are in meta.",
        "additionalProperties": true
      },
      "StoreOffer": {
        "type": "object",
        "description": "One current public offer, including its category. No balance or account entitlements.",
        "properties": {
          "category": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "icon": {
                "type": "string"
              },
              "order": {
                "type": "number"
              }
            },
            "additionalProperties": true
          }
        },
        "additionalProperties": true
      },
      "PublicEvent": {
        "type": "object",
        "required": [
          "type"
        ],
        "description": "One active public boost, quest or arena event; inactive future boosts are not included.",
        "properties": {
          "type": {
            "enum": [
              "boost",
              "quest",
              "arena"
            ]
          },
          "arenaId": {
            "type": "string"
          },
          "arenaName": {
            "type": "string"
          },
          "asOf": {
            "type": "integer"
          }
        },
        "additionalProperties": true
      }
    },
    "responses": {
      "Error400": {
        "description": "Invalid query or selector combination.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "data": [],
              "meta": {
                "apiVersion": "v1",
                "requestId": "request-id",
                "serverTime": 1760000000000,
                "count": 0,
                "code": "INVALID_QUERY",
                "message": "Invalid query or selector combination."
              }
            }
          }
        },
        "headers": {
          "X-RateLimit-Limit": {
            "description": "Requests allowed per minute.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          "X-RateLimit-Remaining": {
            "description": "Requests remaining in the current window.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          "X-RateLimit-Reset": {
            "description": "Current window reset time, Unix seconds.",
            "schema": {
              "type": "integer"
            }
          }
        }
      },
      "Error401": {
        "description": "Missing, invalid or revoked API key.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "data": [],
              "meta": {
                "apiVersion": "v1",
                "requestId": "request-id",
                "serverTime": 1760000000000,
                "count": 0,
                "code": "API_KEY_REQUIRED",
                "message": "Missing, invalid or revoked API key."
              }
            }
          }
        },
        "headers": {
          "X-RateLimit-Limit": {
            "description": "Requests allowed per minute.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          "X-RateLimit-Remaining": {
            "description": "Requests remaining in the current window.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          "X-RateLimit-Reset": {
            "description": "Current window reset time, Unix seconds.",
            "schema": {
              "type": "integer"
            }
          }
        }
      },
      "Error403": {
        "description": "API key, account or level restriction.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "data": [],
              "meta": {
                "apiVersion": "v1",
                "requestId": "request-id",
                "serverTime": 1760000000000,
                "count": 0,
                "code": "API_KEY_DISABLED",
                "message": "API key, account or level restriction."
              }
            }
          }
        },
        "headers": {
          "X-RateLimit-Limit": {
            "description": "Requests allowed per minute.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          "X-RateLimit-Remaining": {
            "description": "Requests remaining in the current window.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          "X-RateLimit-Reset": {
            "description": "Current window reset time, Unix seconds.",
            "schema": {
              "type": "integer"
            }
          }
        }
      },
      "Error404": {
        "description": "No matching public resource.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "data": [],
              "meta": {
                "apiVersion": "v1",
                "requestId": "request-id",
                "serverTime": 1760000000000,
                "count": 0,
                "code": "NOT_FOUND",
                "message": "No matching public resource."
              }
            }
          }
        },
        "headers": {
          "X-RateLimit-Limit": {
            "description": "Requests allowed per minute.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          "X-RateLimit-Remaining": {
            "description": "Requests remaining in the current window.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          "X-RateLimit-Reset": {
            "description": "Current window reset time, Unix seconds.",
            "schema": {
              "type": "integer"
            }
          }
        }
      },
      "Error405": {
        "description": "Only GET is supported.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "data": [],
              "meta": {
                "apiVersion": "v1",
                "requestId": "request-id",
                "serverTime": 1760000000000,
                "count": 0,
                "code": "METHOD_NOT_ALLOWED",
                "message": "Only GET is supported."
              }
            }
          }
        },
        "headers": {
          "X-RateLimit-Limit": {
            "description": "Requests allowed per minute.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          "X-RateLimit-Remaining": {
            "description": "Requests remaining in the current window.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          "X-RateLimit-Reset": {
            "description": "Current window reset time, Unix seconds.",
            "schema": {
              "type": "integer"
            }
          }
        }
      },
      "Error409": {
        "description": "Selector is ambiguous; use an exact ID.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "data": [],
              "meta": {
                "apiVersion": "v1",
                "requestId": "request-id",
                "serverTime": 1760000000000,
                "count": 0,
                "code": "AMBIGUOUS_SELECTOR",
                "message": "Selector is ambiguous; use an exact ID."
              }
            }
          }
        },
        "headers": {
          "X-RateLimit-Limit": {
            "description": "Requests allowed per minute.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          "X-RateLimit-Remaining": {
            "description": "Requests remaining in the current window.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          "X-RateLimit-Reset": {
            "description": "Current window reset time, Unix seconds.",
            "schema": {
              "type": "integer"
            }
          }
        }
      },
      "Error429": {
        "description": "Request allowance exceeded; respect Retry-After.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "data": [],
              "meta": {
                "apiVersion": "v1",
                "requestId": "request-id",
                "serverTime": 1760000000000,
                "count": 0,
                "code": "RATE_LIMITED",
                "message": "Request allowance exceeded; respect Retry-After."
              }
            }
          }
        },
        "headers": {
          "X-RateLimit-Limit": {
            "description": "Requests allowed per minute.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          "X-RateLimit-Remaining": {
            "description": "Requests remaining in the current window.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          "X-RateLimit-Reset": {
            "description": "Current window reset time, Unix seconds.",
            "schema": {
              "type": "integer"
            }
          },
          "Retry-After": {
            "description": "Seconds to wait after a 429 response.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        }
      },
      "Error503": {
        "description": "Requested data is temporarily unavailable.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "example": {
              "data": [],
              "meta": {
                "apiVersion": "v1",
                "requestId": "request-id",
                "serverTime": 1760000000000,
                "count": 0,
                "code": "SERVICE_UNAVAILABLE",
                "message": "Requested data is temporarily unavailable."
              }
            }
          }
        },
        "headers": {
          "X-RateLimit-Limit": {
            "description": "Requests allowed per minute.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          "X-RateLimit-Remaining": {
            "description": "Requests remaining in the current window.",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          },
          "X-RateLimit-Reset": {
            "description": "Current window reset time, Unix seconds.",
            "schema": {
              "type": "integer"
            }
          }
        }
      }
    }
  }
}
