{
    "openapi": "3.1.2",
    "info": {
        "title": "QuestEngine API",
        "version": "1.0.0",
        "description": "QuestEngine is a backend for game features: player accounts, wallets and items, a store with App Store and Google Play receipt checks, boosters, missions, live events, leaderboards, levels, friends, an inbox and remote config. Any engine that can make HTTPS requests can use it. There are SDKs for **Unity**, **Godot 4** and **Unreal Engine 5**.\n\n## Authentication\n\nEvery request identifies the game with its **client key**. Requests on behalf of a player also send a **player token**.\n\n| Header | Value | Used by |\n| --- | --- | --- |\n| `X-Game-Key` | Client key, `qe_pk_\u2026`. It is public and ships in your game build. | Every game request |\n| `Authorization` | `Bearer <player token>`, from a sign-in endpoint | Player endpoints (`\/me`, store, levels\u2026) |\n| `X-Server-Key` | Server key, `qe_sk_\u2026`. It is secret: never put it in a game build. | `\/server\/*`, from your own servers |\n\n**Sign-in flow.** Call `POST \/auth\/device` with a stable device ID, or use `\/auth\/custom` (Steam, Game Center, your own accounts) or `\/auth\/email\/*`. The first call creates the player. Every sign-in returns a token and its expiry. Keep the token, send it as `Authorization: Bearer \u2026`, and renew it with `POST \/auth\/refresh` before it expires. `POST \/auth\/link` attaches more sign-in methods to the same player, so progress survives a phone change.\n\nHTML5 games on Facebook Instant Games and Reddit sign in differently: see [Web games](#web-games) below.\n\n## Responses and errors\n\nSuccessful responses wrap their payload in `data`:\n\n```json\n{ \"data\": { \"currency\": \"coins\", \"balance\": 1250 } }\n```\n\nErrors always use the same shape. `code` is stable, so branch on it rather than on the message. `details` appears only when there is something to add:\n\n```json\n{ \"error\": { \"code\": \"insufficient_funds\", \"message\": \"Not enough Coins.\", \"details\": { \"currency\": \"coins\", \"balance\": 40, \"required\": 100 } } }\n```\n\n| HTTP | Codes |\n| --- | --- |\n| 401 | `invalid_game_key`, `unauthenticated`, `invalid_token`, `invalid_credentials`, `invalid_server_key`, `invalid_signature`, `signature_expired` |\n| 403 | `game_disabled`, `player_banned`, `auth_method_disabled`, `server_only`, `stat_not_writable`, `test_purchases_disabled`, `feature_disabled`, `not_a_participant` |\n| 404 | `not_found`, `player_not_found`, `unknown_product` |\n| 409 | `insufficient_funds`, `not_enough_energy`, `not_enough_items`, `item_locked`, `item_not_usable`, `level_locked`, `attempt_finished`, `offer_unavailable`, `offer_locked`, `purchase_limit_reached`, `real_money_offer`, `transaction_already_used`, `mission_incomplete`, `already_claimed`, `nothing_to_claim`, `version_conflict`, `email_taken`, `identity_in_use`, `last_identity`, `signature_replayed`, `period_closed`, `cannot_challenge_self`, `duel_not_pending`, `duel_not_in_progress`, `duel_expired`, `duel_not_ended`, `no_opponent`, `no_ghost_available` \u2026 |\n| 413 | `value_too_large` |\n| 422 | `validation_failed` (`details` lists each field), `invalid_receipt`, `score_out_of_range`, `unknown_stat`, `invalid_answers`, `timing_implausible` |\n| 429 | `rate_limited` |\n| 502 \/ 503 | `store_unavailable`, `iap_not_configured`, `facebook_not_configured`, `pack_missing` |\n\n**Rate limits:** 300 requests per minute per player, 30 sign-ins per minute per IP, and 1,200 server-key requests per minute per game. New duels, duel answers and daily results are also limited to 20 per minute per player.\n\n## Rewards\n\nEverything that pays out uses one format: missions, events, levels, offers, chests, inbox messages and leaderboard prizes.\n\n```json\n[{ \"type\": \"currency\", \"code\": \"coins\", \"quantity\": 100 },\n { \"type\": \"item\", \"code\": \"hammer\", \"quantity\": 2 },\n { \"type\": \"chest\", \"code\": \"treasure_chest\", \"quantity\": 1 }]\n```\n\nGranted rewards are returned as a list in the same format. Opened chests include their `contents`.\n\n## Time and periods\n\nAll times are UTC (ISO 8601). Daily missions, leaderboards and daily challenges reset at 00:00 UTC, weekly ones on Monday 00:00 UTC, and monthly ones on the 1st. `GET \/time` returns the server time and the next reset of each period. Use it instead of the device clock.\n\n## Purchases\n\n* **In-game currency:** call `POST \/store\/{code}\/purchase`. Send an `Idempotency-Key` header so a retried request doesn't buy twice.\n* **Real money:** buy through StoreKit or Google Play Billing, then call `POST \/purchases\/verify` with the receipt:\n  * Apple: the StoreKit 2 `signed_transaction`, or a `transaction_id`.\n  * Google: the `product_id` and `purchase_token`.\n\n  QuestEngine checks the receipt with the store, grants the offer's contents once per transaction, and acknowledges Google purchases.\n* **Refunds:** point App Store Server Notifications V2 and Google real-time developer notifications at the URLs shown on the console's settings page. Refunded purchases are marked and reported by webhook.\n* **Testing:** while the game's IAP mode is *sandbox*, `platform: \"test\"` purchases are accepted without a store.\n\n## Webhooks\n\nQuestEngine can POST events to your server: `player.created`, `purchase.completed`, `purchase.refunded`, `mission.completed`, `level.finished` and `leaderboard.closed`, and for duels `duel.created`, `duel.accepted`, `duel.submitted`, `duel.resolved`, `duel.expired`, `duel.forfeited` and `duel.rematch` (with the `player_ids` to notify, for example through `FBInstant.updateAsync` or a Reddit notification). Failed deliveries are retried with backoff.\n\nEach delivery is signed: `X-QuestEngine-Signature: t=<unix time>,v1=<hex HMAC-SHA256 of \"<t>.<raw body>\">`, using your webhook secret. Check it like this:\n\n```php\n[$t, $v1] = explode(',', $request->header('X-QuestEngine-Signature'));\n$expected = hash_hmac('sha256', substr($t, 2) . '.' . $request->getContent(), $secret);\n$valid = hash_equals($expected, substr($v1, 3)) && abs(time() - (int) substr($t, 2)) < 300;\n```\n\n## Web games\n\nFor HTML5 games on **Facebook Instant Games**, **Reddit** (Devvit), **Discord Activities**, **Telegram Mini Apps** and the plain web. The step-by-step [Facebook Instant Games guide](\/docs\/web-games) walks through the calls in the order a game makes them. These endpoints are off unless the server enables them (`QE_WEB_GAMES` plus a `QE_FEATURE_*` flag each) and, for daily challenges and duels, the game turns them on in its settings. Otherwise they answer `403 feature_disabled`.\n\n* **Instant Games sign-in:** `POST \/auth\/facebook-instant` with the signature from `FBInstant.player.getSignedPlayerInfoAsync()`. No Facebook Login or permissions are needed. Each signature works once and for a day; the game needs its Facebook app secret in the console.\n  Also send `signed_asid` (from `getSignedASIDAsync()`) when the SDK gives one, so Meta's data deletion requests can find the player. `player.id` is the public ID used everywhere else, and `player.instant_player_id` is the player's own Instant ID.\n* **Friends from connected players:** `POST \/friends\/facebook-instant` with the IDs from `getConnectedPlayersAsync()` (up to 200; each import replaces the list). It is one-way: you see them on friends leaderboards, and they see you only if their game reports you. `\/leaderboards\/{code}\/friends` and `\/me` rows carry `instant_player_id` for players you know. World boards never do.\n* **Data deletion:** `DELETE \/me` with `{\"confirm\": true}` deletes the player from inside the game. Meta's Data Deletion Callback goes to `https:\/\/questengine.eu\/api\/v1\/facebook\/data-deletion\/{app_id}`.\n* **Telegram Mini Apps sign-in:** `POST \/auth\/telegram` with the raw `Telegram.WebApp.initData`, checked with the game's bot token. The chat the Mini App was opened from becomes one of the player's groups.\n* **Discord Activities sign-in:** `POST \/auth\/discord` with the code from `discordSdk.commands.authorize()`. QuestEngine exchanges it with the game's Discord client ID and secret and returns `discord.access_token` for `discordSdk.commands.authenticate()`.\n* **Any platform:** players you know carry `platform_ids` (for example `{\"telegram\": \"42\"}`). `POST \/friends\/platform\/{platform}` imports connected players, and duels take `opponent_platform`.\n* **Group leaderboards:** `GET \/leaderboards\/{code}\/context\/{platform}\/{context_id}` ranks the members of a chat, channel or Messenger context. Report a group with `POST \/me\/contexts`; Telegram chats come with the sign-in.\n* **Reddit sign-in:** only your Devvit server calls `POST \/auth\/reddit`, with the **server key** and the Reddit user ID from the Devvit runtime. To link the Reddit account to an existing player, also send that player's token. Never call QuestEngine from the Reddit page itself: the server key must not reach a browser.\n* **Daily challenges:** `GET \/daily\/{channel}` gives every player the same `seed` (or server-scored `items`) for the day; `POST \/daily\/{channel}\/results` records one result per day, echoing the `period_key` you were given, and updates the streak. For a few hours after midnight (`late_completion`) a player who hasn't finished yesterday's challenge still gets it. A day missed completely costs a streak freeze; players get one a week. The first `GET` of a day starts the player's round clock (use `?peek=true` for a badge or menu that shouldn't start it): server-scored channels refuse results without it (`round_not_started`) and implausible timings, and a channel can refuse results faster than its shortest believable round (`too_fast`).\n* **Duels:** `POST \/duels` challenges a player (or makes an open invite with an `invite_code`, or `mode: ghost` against a recorded run). Both players answer the same questions at their own time and the server scores them. Questions go only to players in the duel, who play them right away: answers after the round's time score nothing, as do answers under 200 ms or over a question's time limit (send each answer's `time_ms`). Scores show once the duel has ended, and the correct answers to players who played their round.\n* **Report a question:** `POST \/questions\/report` with where the player saw it (`source: duel` + `duel_id`, or `source: daily` + `channel` + `period_key`), the `item_id` and a `reason`. Only questions the player was given; once per question.\n* **CORS:** browsers may call the API from any origin by default. The server can restrict that to Facebook's Instant Games hosts, localhost and listed origins.\n"
    },
    "servers": [
        {
            "url": "https:\/\/www.questengine.eu\/api\/v1",
            "description": "QuestEngine"
        }
    ],
    "tags": [
        {
            "name": "Authentication",
            "description": "Sign players in (device ID, custom ID, email, Facebook Instant Games, Reddit) and manage their sign-in methods. Tokens expire after the game's session length: refresh them before they do."
        },
        {
            "name": "Player",
            "description": "The signed-in player's profile, cloud saves (key-value data with versions) and stats, plus public profiles of other players."
        },
        {
            "name": "Economy",
            "description": "Currencies, wallet balances (energy refills over time), the transaction ledger, items and the inventory."
        },
        {
            "name": "Store",
            "description": "Store offers, purchases with in-game currency, and App Store \/ Google Play receipt verification."
        },
        {
            "name": "Levels",
            "description": "Levels and their data. Starting a level spends energy; finishing it pays rewards, records stars and submits the score."
        },
        {
            "name": "Missions",
            "description": "Daily, weekly and one-time missions and achievements with claimable rewards. Progress comes from player stats."
        },
        {
            "name": "Live events",
            "description": "Time-limited events: players earn points while an event runs and claim reward tiers."
        },
        {
            "name": "Leaderboards",
            "description": "Ranked scores per period (all-time, daily, weekly or monthly): top lists, the player's neighbourhood and friends."
        },
        {
            "name": "Friends",
            "description": "Friend requests by friend code or player ID, and importing Facebook friends who play the game."
        },
        {
            "name": "Inbox",
            "description": "Messages from the team, the system or leaderboard payouts, with rewards to claim."
        },
        {
            "name": "Game",
            "description": "Health check, server time with the next period resets, and remote config."
        },
        {
            "name": "Questions",
            "description": "Reporting a wrong or unclear question from a duel or a daily quiz."
        },
        {
            "name": "Server API",
            "description": "For your own servers only (X-Server-Key): grant rewards, debit currency, set stats, submit scores and event points, send messages, moderate players and record web-shop purchases."
        },
        {
            "name": "Store notifications",
            "description": "Called by Apple and Google to report refunds and revocations. Set these URLs in App Store Connect and Play Console; you never call them yourself."
        },
        {
            "name": "Daily",
            "description": "Daily challenges: the same seed for every player each day (00:00 UTC), one result per player and day, and streaks with freezes. Needs QE_WEB_GAMES, QE_FEATURE_DAILY and daily challenges turned on for the game."
        },
        {
            "name": "Duels",
            "description": "Async 1v1 duels: both players answer the same seeded questions at different times and the server scores them. Challenge a player or share an invite code, or play a recorded run (ghost). Needs QE_WEB_GAMES, QE_FEATURE_DUELS and duels turned on for the game."
        }
    ],
    "paths": {
        "\/auth\/device": {
            "post": {
                "operationId": "auth.device",
                "description": "The simplest login: the SDK generates a random ID once and stores it on the\ndevice. The player is created on first use (`created: true`).",
                "summary": "Sign in with a device ID",
                "tags": [
                    "Authentication"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "device_id": {
                                        "type": "string",
                                        "minLength": 8,
                                        "maxLength": 191
                                    },
                                    "display_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 50
                                    },
                                    "platform": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 20
                                    },
                                    "country": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "minLength": 2,
                                        "maxLength": 2
                                    },
                                    "locale": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 10
                                    }
                                },
                                "required": [
                                    "device_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": []
                    }
                ]
            }
        },
        "\/auth\/custom": {
            "post": {
                "operationId": "auth.custom",
                "description": "Use your own stable user ID (e.g. from Steam, Game Center or your account\nsystem). Set `create: false` to only sign in existing players.",
                "summary": "Sign in with a custom ID",
                "tags": [
                    "Authentication"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "custom_id": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 191
                                    },
                                    "create": {
                                        "type": "boolean"
                                    },
                                    "display_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 50
                                    },
                                    "platform": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 20
                                    },
                                    "country": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "minLength": 2,
                                        "maxLength": 2
                                    },
                                    "locale": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 10
                                    }
                                },
                                "required": [
                                    "custom_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": []
                    }
                ]
            }
        },
        "\/auth\/email\/register": {
            "post": {
                "operationId": "auth.register",
                "summary": "Register with email and password",
                "tags": [
                    "Authentication"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email",
                                        "maxLength": 191
                                    },
                                    "password": {
                                        "type": "string",
                                        "minLength": 8,
                                        "maxLength": 200
                                    },
                                    "display_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 50
                                    },
                                    "platform": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 20
                                    },
                                    "country": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "minLength": 2,
                                        "maxLength": 2
                                    },
                                    "locale": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 10
                                    }
                                },
                                "required": [
                                    "email",
                                    "password"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "token": {
                                                    "type": "string"
                                                },
                                                "expires_at": {
                                                    "type": "string"
                                                },
                                                "created": {
                                                    "type": "boolean"
                                                },
                                                "player": {
                                                    "$ref": "#\/components\/schemas\/PlayerResource"
                                                }
                                            },
                                            "required": [
                                                "token",
                                                "expires_at",
                                                "created",
                                                "player"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": []
                    }
                ]
            }
        },
        "\/auth\/email\/login": {
            "post": {
                "operationId": "auth.login",
                "summary": "Sign in with email and password",
                "tags": [
                    "Authentication"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "email": {
                                        "type": "string",
                                        "format": "email"
                                    },
                                    "password": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "email",
                                    "password"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "token": {
                                                    "type": "string"
                                                },
                                                "expires_at": {
                                                    "type": "string"
                                                },
                                                "created": {
                                                    "type": "boolean"
                                                },
                                                "player": {
                                                    "$ref": "#\/components\/schemas\/PlayerResource"
                                                }
                                            },
                                            "required": [
                                                "token",
                                                "expires_at",
                                                "created",
                                                "player"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": []
                    }
                ]
            }
        },
        "\/auth\/facebook-instant": {
            "post": {
                "operationId": "auth.facebookInstant",
                "description": "Send the signature from `FBInstant.player.getSignedPlayerInfoAsync()`. It must be\nsigned with the game's Facebook app secret (HMAC-SHA256), be at most a day old and\nis accepted once (409 `signature_replayed` after that). Works with Zero Permissions:\nno Facebook Login and no Graph calls. If you passed a nonce to\n`getSignedPlayerInfoAsync()`, send it as `request_payload` to have it checked.\nSend a valid player token as well to link the Instant Games player to that player.\n\nAlso send `signed_asid`, the signature from `FBInstant.player.getSignedASIDAsync()`, when\nthe SDK gives one: Meta's Data Deletion Callback names people by that app-scoped ID, so\nwithout it a deletion request from Facebook cannot find the player. An invalid\n`signed_asid` fails the sign-in (401 `invalid_asid_signature`); leave it out when there is none.\n\nNeeds `QE_WEB_GAMES` and `QE_FEATURE_FACEBOOK_INSTANT_AUTH` on the server and the\nFacebook Instant Games sign-in method on the game.",
                "summary": "Sign in with Facebook Instant Games",
                "tags": [
                    "Authentication"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "signature": {
                                        "type": "string",
                                        "maxLength": 8192
                                    },
                                    "request_payload": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 191
                                    },
                                    "context_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 191
                                    },
                                    "signed_asid": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 8192
                                    },
                                    "display_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 50
                                    },
                                    "platform": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 20
                                    },
                                    "country": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "minLength": 2,
                                        "maxLength": 2
                                    },
                                    "locale": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 10
                                    }
                                },
                                "required": [
                                    "signature"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": []
                    }
                ]
            }
        },
        "\/auth\/telegram": {
            "post": {
                "operationId": "auth.telegram",
                "description": "Send `init_data`: the raw `Telegram.WebApp.initData` string, exactly as the Mini App got it\n(never `initDataUnsafe`). QuestEngine checks it with the game's bot token (HMAC-SHA256, as\nTelegram documents) and that it is at most a day old. The player is the Telegram user;\ntheir name and language fill in the profile. If the Mini App was opened from a chat, that\nchat (`chat_instance`) becomes one of the player's verified groups for chat leaderboards.\nSend a valid player token as well to link the Telegram account to that player.\n\nNeeds `QE_WEB_GAMES` and `QE_FEATURE_TELEGRAM_AUTH` on the server, the Telegram sign-in\nmethod on the game and the bot token in the console.",
                "summary": "Sign in with Telegram (Mini Apps)",
                "tags": [
                    "Authentication"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "init_data": {
                                        "type": "string",
                                        "maxLength": 8192
                                    },
                                    "display_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 50
                                    },
                                    "platform": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 20
                                    },
                                    "country": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "minLength": 2,
                                        "maxLength": 2
                                    },
                                    "locale": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 10
                                    }
                                },
                                "required": [
                                    "init_data"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": []
                    }
                ]
            }
        },
        "\/auth\/discord": {
            "post": {
                "operationId": "auth.discord",
                "description": "Send the `code` from `discordSdk.commands.authorize({ client_id, response_type: 'code',\nscope: ['identify'], prompt: 'none' })`. QuestEngine exchanges it with the game's Discord\nclient ID and secret and reads the user. The response adds `discord.access_token`: pass it\nto `discordSdk.commands.authenticate({ access_token })`. QuestEngine doesn't keep it.\nSend a valid player token as well to link the Discord account to that player.\n\nNeeds `QE_WEB_GAMES` and `QE_FEATURE_DISCORD_AUTH` on the server, the Discord sign-in\nmethod on the game and the client ID and secret in the console.",
                "summary": "Sign in with Discord (Activities)",
                "tags": [
                    "Authentication"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "code": {
                                        "type": "string",
                                        "maxLength": 512
                                    },
                                    "display_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 50
                                    },
                                    "platform": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 20
                                    },
                                    "country": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "minLength": 2,
                                        "maxLength": 2
                                    },
                                    "locale": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 10
                                    }
                                },
                                "required": [
                                    "code"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": []
                    }
                ]
            }
        },
        "\/auth\/refresh": {
            "post": {
                "operationId": "auth.refresh",
                "description": "Issues a new token and revokes the current one.",
                "summary": "Refresh the session",
                "tags": [
                    "Authentication"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "token": {
                                                    "type": "string"
                                                },
                                                "expires_at": {
                                                    "type": "string"
                                                },
                                                "created": {
                                                    "type": "boolean"
                                                },
                                                "player": {
                                                    "$ref": "#\/components\/schemas\/PlayerResource"
                                                }
                                            },
                                            "required": [
                                                "token",
                                                "expires_at",
                                                "created",
                                                "player"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/auth\/logout": {
            "post": {
                "operationId": "auth.logout",
                "description": "Revokes the current token.",
                "summary": "Sign out",
                "tags": [
                    "Authentication"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "signed_out": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "signed_out"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/auth\/link": {
            "post": {
                "operationId": "auth.link",
                "description": "Lets a guest (device ID) player add an email, custom ID or another device,\nso they can recover the account on a new device.",
                "summary": "Link another login",
                "tags": [
                    "Authentication"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "provider": {
                                        "type": "string",
                                        "enum": [
                                            "device",
                                            "custom",
                                            "email"
                                        ]
                                    },
                                    "identifier": {
                                        "type": "string",
                                        "maxLength": 191
                                    },
                                    "password": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "minLength": 8,
                                        "maxLength": 200
                                    }
                                },
                                "required": [
                                    "provider",
                                    "identifier"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "linked": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "linked"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/auth\/link\/{provider}": {
            "delete": {
                "operationId": "auth.unlink",
                "summary": "Unlink a login method",
                "tags": [
                    "Authentication"
                ],
                "parameters": [
                    {
                        "name": "provider",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "linked": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "linked"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/auth\/reddit": {
            "post": {
                "operationId": "auth.reddit",
                "description": "For your Devvit server only: it authenticates with `X-Server-Key`, which must never\nreach a browser. Pass the Reddit user ID from the Devvit runtime; it is stored as\nsent (for example `t2_abc123`) and QuestEngine trusts your server for it.\n\nTo link the Reddit account to an existing player instead, also send that player's\ntoken as `Authorization: Bearer` (a player ID alone is not enough: player IDs are\npublic). `player_id`, if sent, must be that player. Profile fields then only fill\nin what the player doesn't have yet.\n\nNeeds `QE_WEB_GAMES` and `QE_FEATURE_REDDIT_AUTH` on the server and the Reddit\nsign-in method on the game.",
                "summary": "Sign in with Reddit (server to server)",
                "tags": [
                    "Authentication"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "user_id": {
                                        "type": "string",
                                        "minLength": 1,
                                        "maxLength": 191
                                    },
                                    "username": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 50
                                    },
                                    "player_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "uuid"
                                    },
                                    "display_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 50
                                    },
                                    "platform": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 20
                                    },
                                    "country": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "minLength": 2,
                                        "maxLength": 2
                                    },
                                    "locale": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 10
                                    }
                                },
                                "required": [
                                    "user_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "anyOf": [
                                        {
                                            "type": "string"
                                        },
                                        {
                                            "type": "object",
                                            "properties": {
                                                "data": {
                                                    "type": "object",
                                                    "properties": {
                                                        "token": {
                                                            "type": "string"
                                                        },
                                                        "expires_at": {
                                                            "type": "string"
                                                        },
                                                        "created": {
                                                            "type": "boolean"
                                                        },
                                                        "player": {
                                                            "$ref": "#\/components\/schemas\/PlayerResource"
                                                        }
                                                    },
                                                    "required": [
                                                        "token",
                                                        "expires_at",
                                                        "created",
                                                        "player"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "data"
                                            ]
                                        }
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "serverKey": []
                    }
                ]
            }
        },
        "\/me": {
            "get": {
                "operationId": "player.me",
                "description": "The profile with wallet balances, active boosters and unread inbox count:\neverything a game usually needs on its start screen.",
                "summary": "Get my profile",
                "tags": [
                    "Player"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "player": {
                                                    "$ref": "#\/components\/schemas\/PlayerResource"
                                                },
                                                "wallet": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#\/components\/schemas\/WalletResource"
                                                    }
                                                },
                                                "boosters": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#\/components\/schemas\/BoosterResource"
                                                    }
                                                },
                                                "unread_messages": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                }
                                            },
                                            "required": [
                                                "player",
                                                "wallet",
                                                "boosters",
                                                "unread_messages"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            },
            "patch": {
                "operationId": "player.update",
                "summary": "Update my profile",
                "tags": [
                    "Player"
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "display_name": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 50
                                    },
                                    "avatar_url": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "uri",
                                        "maxLength": 255
                                    },
                                    "country": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "minLength": 2,
                                        "maxLength": 2
                                    },
                                    "locale": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 10
                                    },
                                    "platform": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 20
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/PlayerResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            },
            "delete": {
                "operationId": "player.destroy",
                "description": "Deletes the signed-in player and their data in this game, as the console's Delete player\ndoes: wallet, inventory, progress, saves, friends, inbox, leaderboard entries, daily\nresults, open duels (they end as forfeits) and sign-in tokens. Purchases are kept without\nthe link to the player, as accounting records. Send `{\"confirm\": true}`. Cannot be undone.",
                "summary": "Delete me",
                "tags": [
                    "Player"
                ],
                "parameters": [
                    {
                        "name": "confirm",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "enum": [
                                "yes",
                                "on",
                                "1",
                                1,
                                "true",
                                true
                            ]
                        }
                    },
                    {
                        "name": "confirm",
                        "in": "body",
                        "required": true,
                        "description": "Must be true.",
                        "schema": {
                            "type": "boolean"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "deleted": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "deleted"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/me\/contexts": {
            "get": {
                "operationId": "player.contexts",
                "description": "The groups (Telegram chats, Discord channels, Messenger contexts) you are in, most recent first.",
                "summary": "List my groups",
                "tags": [
                    "Player"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "platform": {
                                                        "type": "string"
                                                    },
                                                    "context_id": {
                                                        "type": "string"
                                                    },
                                                    "verified": {
                                                        "type": "boolean"
                                                    },
                                                    "last_seen_at": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "platform",
                                                    "context_id",
                                                    "verified",
                                                    "last_seen_at"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            },
            "post": {
                "operationId": "player.joinContext",
                "description": "Report the group the player is playing in, for group leaderboards: `facebook_instant` with\n`FBInstant.context.getID()`, `discord` with the channel or Activity instance ID, `reddit`\nwith the post ID. Telegram chats come signed with the sign-in and don't need this. Call it\nwhen the game starts in a group. Joining again just updates the time; a player keeps the\n100 most recent groups per platform.",
                "summary": "Join a group",
                "tags": [
                    "Player"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "platform": {
                                        "type": "string",
                                        "description": "facebook_instant, reddit, discord or telegram."
                                    },
                                    "context_id": {
                                        "type": "string",
                                        "description": "The platform's ID of the group."
                                    }
                                },
                                "required": [
                                    "platform",
                                    "context_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "platform": {
                                                    "type": "string"
                                                },
                                                "context_id": {
                                                    "type": "string"
                                                },
                                                "verified": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "platform",
                                                "context_id",
                                                "verified"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/me\/data": {
            "get": {
                "operationId": "player.data",
                "description": "Returns every key with its value and version; `?keys=a,b` returns only those keys.",
                "summary": "List my cloud save",
                "tags": [
                    "Player"
                ],
                "parameters": [
                    {
                        "name": "keys",
                        "in": "query",
                        "description": "Comma-separated keys to return; all keys when omitted.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "progress,settings"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/me\/data\/{key}": {
            "put": {
                "operationId": "player.putData",
                "description": "Any JSON value up to 64 KB. Send the `version` you last read to avoid\noverwriting a newer save from another device: a mismatch returns\n`version_conflict` with the current value.",
                "summary": "Save a cloud-save key",
                "tags": [
                    "Player"
                ],
                "parameters": [
                    {
                        "name": "key",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "version": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0
                                    },
                                    "public": {
                                        "type": "boolean"
                                    },
                                    "value": {
                                        "description": "Any JSON value: an object, array, string, number, boolean or null (max 64 KB)."
                                    }
                                },
                                "required": [
                                    "value"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "key": {
                                                    "type": "string"
                                                },
                                                "value": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "version": {
                                                    "type": "integer"
                                                },
                                                "public": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "key",
                                                "value",
                                                "version",
                                                "public"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            },
            "delete": {
                "operationId": "player.deleteData",
                "summary": "Delete a cloud-save key",
                "tags": [
                    "Player"
                ],
                "parameters": [
                    {
                        "name": "key",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "deleted": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "deleted"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/me\/stats": {
            "get": {
                "operationId": "player.stats",
                "summary": "Get my stats",
                "tags": [
                    "Player"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            },
            "post": {
                "operationId": "player.submitStats",
                "description": "Only stats marked client-writable in the admin can be changed from the game\nclient. Each value combines according to the stat's mode (sum adds, max\/min\nkeep the record, set replaces). Missions and events progress automatically.",
                "summary": "Submit stats",
                "tags": [
                    "Player"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "stats": {
                                        "type": "object",
                                        "description": "Stat code => value, e.g. {\"tiles_matched\": 40, \"best_combo\": 12}. Only stats marked \"Games may submit it\" are accepted.",
                                        "additionalProperties": {
                                            "type": "integer"
                                        }
                                    }
                                },
                                "required": [
                                    "stats"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/players\/{player}": {
            "get": {
                "operationId": "player.show",
                "description": "By player ID or friend code. Includes public stats and public cloud-save keys.",
                "summary": "Get a player's public profile",
                "tags": [
                    "Player"
                ],
                "parameters": [
                    {
                        "name": "player",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "player": {
                                                    "$ref": "#\/components\/schemas\/PublicPlayerResource"
                                                },
                                                "stats": {
                                                    "type": "object"
                                                },
                                                "data": {
                                                    "type": "object"
                                                }
                                            },
                                            "required": [
                                                "player",
                                                "stats",
                                                "data"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/currencies": {
            "get": {
                "operationId": "economy.currencies",
                "summary": "List currencies",
                "tags": [
                    "Economy"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/CurrencyResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/me\/wallet": {
            "get": {
                "operationId": "economy.wallet",
                "description": "Balances of every currency. Regenerating currencies (energy, lives) include\n`regen.next_in` and `regen.full_in` in seconds.",
                "summary": "Get my wallet",
                "tags": [
                    "Economy"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/WalletResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/me\/transactions": {
            "get": {
                "operationId": "economy.transactions",
                "description": "The most recent changes first, with their reason (purchase, reward, level_start...).",
                "summary": "List my currency transactions",
                "tags": [
                    "Economy"
                ],
                "parameters": [
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "How many to return, 1\u2013100.",
                        "schema": {
                            "type": "integer",
                            "default": 50
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "currency": {
                                                        "type": "string"
                                                    },
                                                    "amount": {
                                                        "type": "integer"
                                                    },
                                                    "balance_after": {
                                                        "type": "integer"
                                                    },
                                                    "reason": {
                                                        "type": "string"
                                                    },
                                                    "reference": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "created_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    }
                                                },
                                                "required": [
                                                    "currency",
                                                    "amount",
                                                    "balance_after",
                                                    "reason",
                                                    "reference",
                                                    "created_at"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/items": {
            "get": {
                "operationId": "economy.items",
                "description": "Filter with `?kind=booster` or `?category=Boosters`.",
                "summary": "List the item catalogue",
                "tags": [
                    "Economy"
                ],
                "parameters": [
                    {
                        "name": "kind",
                        "in": "query",
                        "description": "Only items of this kind: `consumable`, `durable`, `booster` or `chest`.",
                        "schema": {
                            "type": "string"
                        },
                        "example": "booster"
                    },
                    {
                        "name": "category",
                        "in": "query",
                        "description": "Only items in the category with this name.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/ItemResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/me\/inventory": {
            "get": {
                "operationId": "economy.inventory",
                "description": "Item stacks and active boosters.",
                "summary": "Get my inventory",
                "tags": [
                    "Economy"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "items": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#\/components\/schemas\/InventoryItemResource"
                                                    }
                                                },
                                                "boosters": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#\/components\/schemas\/BoosterResource"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "items",
                                                "boosters"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/me\/inventory\/{code}\/use": {
            "post": {
                "operationId": "economy.useItem",
                "description": "Consumables are used up (granting their use rewards), boosters start or\nextend their timer, chests open into random rewards.",
                "summary": "Use an item",
                "tags": [
                    "Economy"
                ],
                "parameters": [
                    {
                        "name": "code",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "quantity": {
                                        "type": "integer",
                                        "minimum": 1,
                                        "maximum": 1000
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "item": {
                                                    "type": "string"
                                                },
                                                "used": {
                                                    "anyOf": [
                                                        {
                                                            "type": "string"
                                                        },
                                                        {
                                                            "type": "integer",
                                                            "enum": [
                                                                1
                                                            ]
                                                        }
                                                    ]
                                                },
                                                "remaining": {
                                                    "type": "integer"
                                                },
                                                "rewards": {
                                                    "type": "string"
                                                },
                                                "booster": {
                                                    "anyOf": [
                                                        {
                                                            "$ref": "#\/components\/schemas\/BoosterResource"
                                                        },
                                                        {
                                                            "type": "null"
                                                        }
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "item",
                                                "used",
                                                "remaining",
                                                "rewards",
                                                "booster"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/store": {
            "get": {
                "operationId": "store.index",
                "description": "Offers on sale now. Virtual offers have `price.type = virtual`; real-money\noffers list their App Store \/ Google Play product IDs. `available: false`\ncomes with a reason (offer_locked, purchase_limit_reached).",
                "summary": "List store offers",
                "tags": [
                    "Store"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "code": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "description": {
                                                        "type": "string"
                                                    },
                                                    "icon_url": {
                                                        "type": "string"
                                                    },
                                                    "contents": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        },
                                                        "minItems": 0,
                                                        "maxItems": 0
                                                    },
                                                    "price": {
                                                        "anyOf": [
                                                            {
                                                                "type": "object",
                                                                "properties": {
                                                                    "type": {
                                                                        "type": "string",
                                                                        "const": "virtual"
                                                                    },
                                                                    "currency": {
                                                                        "type": "string"
                                                                    },
                                                                    "amount": {
                                                                        "type": "integer"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "type",
                                                                    "currency",
                                                                    "amount"
                                                                ]
                                                            },
                                                            {
                                                                "type": "object",
                                                                "properties": {
                                                                    "type": {
                                                                        "type": "string",
                                                                        "const": "real"
                                                                    },
                                                                    "apple_product_id": {
                                                                        "type": "string"
                                                                    },
                                                                    "google_product_id": {
                                                                        "type": "string"
                                                                    },
                                                                    "display_price": {
                                                                        "type": "string"
                                                                    },
                                                                    "price_cents": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "type",
                                                                    "apple_product_id",
                                                                    "google_product_id",
                                                                    "display_price",
                                                                    "price_cents"
                                                                ]
                                                            }
                                                        ]
                                                    },
                                                    "featured": {
                                                        "type": "string"
                                                    },
                                                    "purchase_limit": {
                                                        "type": "string"
                                                    },
                                                    "purchased": {
                                                        "type": "integer"
                                                    },
                                                    "available": {
                                                        "type": "boolean"
                                                    },
                                                    "unavailable_reason": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ],
                                                        "enum": [
                                                            "offer_unavailable",
                                                            "offer_locked",
                                                            "purchase_limit_reached",
                                                            null
                                                        ]
                                                    },
                                                    "required_level": {
                                                        "type": "string"
                                                    },
                                                    "sale_ends_at": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "code",
                                                    "name",
                                                    "description",
                                                    "icon_url",
                                                    "contents",
                                                    "price",
                                                    "featured",
                                                    "purchase_limit",
                                                    "purchased",
                                                    "available",
                                                    "unavailable_reason",
                                                    "required_level",
                                                    "sale_ends_at"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/store\/{code}\/purchase": {
            "post": {
                "operationId": "store.purchase",
                "description": "Spends the game currency and grants the contents in one step. Send an\n`Idempotency-Key` header to make retries safe: the same key returns the\noriginal purchase instead of buying twice.",
                "summary": "Buy a virtual offer",
                "tags": [
                    "Store"
                ],
                "parameters": [
                    {
                        "name": "code",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "description": "Optional, up to 100 characters: a retry with the same key returns the original purchase.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/purchases\/verify": {
            "post": {
                "operationId": "store.verify",
                "description": "Send the purchase from the app store; QuestEngine verifies it and grants the\nlinked offer's contents once (replays return the original purchase).\n\n- `apple`: `signed_transaction` (StoreKit 2 jwsRepresentation) or `transaction_id`\n- `google`: `product_id` and `purchase_token`\n- `test`: `product_id` (offer code or product ID) and optional `transaction_id`; only while the game's IAP mode is sandbox",
                "summary": "Verify a store purchase",
                "tags": [
                    "Store"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "platform": {
                                        "type": "string",
                                        "enum": [
                                            "apple",
                                            "google",
                                            "test"
                                        ]
                                    },
                                    "signed_transaction": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 20000
                                    },
                                    "transaction_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 191
                                    },
                                    "product_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 191
                                    },
                                    "purchase_token": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 2000
                                    }
                                },
                                "required": [
                                    "platform"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/me\/purchases": {
            "get": {
                "operationId": "store.history",
                "summary": "List my purchases",
                "tags": [
                    "Store"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/PurchaseResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/levels": {
            "get": {
                "operationId": "level.index",
                "description": "With my results and whether each level is unlocked. Level definitions\n(`data`) are included with `?include=data`.",
                "summary": "List levels",
                "tags": [
                    "Levels"
                ],
                "parameters": [
                    {
                        "name": "include",
                        "in": "query",
                        "description": "`data` adds each level's design data to the list (larger response).",
                        "schema": {
                            "type": "string"
                        },
                        "example": "data"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "progress_level": {
                                                    "type": "integer"
                                                },
                                                "levels": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "array",
                                                        "items": {}
                                                    }
                                                }
                                            },
                                            "required": [
                                                "progress_level",
                                                "levels"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/levels\/{number}": {
            "get": {
                "operationId": "level.show",
                "description": "Including its definition (`data`, e.g. the level editor's layout).",
                "summary": "Get a level",
                "tags": [
                    "Levels"
                ],
                "parameters": [
                    {
                        "name": "number",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/levels\/{number}\/start": {
            "post": {
                "operationId": "level.start",
                "description": "Spends the level's energy cost (unless an unlimited-energy booster is\nactive) and returns the attempt to finish later.",
                "summary": "Start a level",
                "tags": [
                    "Levels"
                ],
                "parameters": [
                    {
                        "name": "number",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "attempt": {
                                                    "$ref": "#\/components\/schemas\/AttemptResource"
                                                },
                                                "wallet": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#\/components\/schemas\/WalletResource"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "attempt",
                                                "wallet"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/level-attempts\/{attempt}\/finish": {
            "post": {
                "operationId": "level.finish",
                "description": "Records the result. Wins pay the level rewards (plus first-win rewards), may\nrefund the energy, advance `progress_level`, update stats (missions, events)\nand submit the score to the level's leaderboard.",
                "summary": "Finish a level attempt",
                "tags": [
                    "Levels"
                ],
                "parameters": [
                    {
                        "name": "attempt",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "result": {
                                        "type": "string",
                                        "enum": [
                                            "won",
                                            "lost"
                                        ]
                                    },
                                    "score": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ]
                                    },
                                    "stars": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 255
                                    },
                                    "duration_seconds": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0
                                    },
                                    "meta": {
                                        "type": [
                                            "object",
                                            "null"
                                        ],
                                        "description": "Optional JSON object kept with the attempt, e.g. {\"moves\": 31}.",
                                        "additionalProperties": {}
                                    }
                                },
                                "required": [
                                    "result"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "attempt": {
                                                    "$ref": "#\/components\/schemas\/AttemptResource"
                                                },
                                                "rewards": {
                                                    "type": "array",
                                                    "items": {
                                                        "anyOf": [
                                                            {
                                                                "type": "object",
                                                                "properties": {
                                                                    "type": {
                                                                        "type": "string",
                                                                        "const": "currency"
                                                                    },
                                                                    "code": {
                                                                        "type": "string"
                                                                    },
                                                                    "quantity": {
                                                                        "type": "string"
                                                                    },
                                                                    "name": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "type",
                                                                    "code",
                                                                    "quantity",
                                                                    "name"
                                                                ]
                                                            },
                                                            {
                                                                "type": "object",
                                                                "properties": {
                                                                    "type": {
                                                                        "type": "string",
                                                                        "const": "item"
                                                                    },
                                                                    "code": {
                                                                        "type": "string"
                                                                    },
                                                                    "quantity": {
                                                                        "type": "integer"
                                                                    },
                                                                    "name": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "type",
                                                                    "code",
                                                                    "quantity",
                                                                    "name"
                                                                ]
                                                            },
                                                            {
                                                                "type": "object",
                                                                "properties": {
                                                                    "type": {
                                                                        "type": "string",
                                                                        "const": "chest"
                                                                    },
                                                                    "code": {
                                                                        "type": "string"
                                                                    },
                                                                    "quantity": {
                                                                        "type": "string"
                                                                    },
                                                                    "name": {
                                                                        "type": "string"
                                                                    },
                                                                    "contents": {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    }
                                                                },
                                                                "required": [
                                                                    "type",
                                                                    "code",
                                                                    "quantity",
                                                                    "name",
                                                                    "contents"
                                                                ]
                                                            }
                                                        ]
                                                    }
                                                },
                                                "first_win": {
                                                    "type": "boolean"
                                                },
                                                "progress_level": {
                                                    "type": "integer"
                                                },
                                                "leaderboard": {
                                                    "type": "string"
                                                },
                                                "wallet": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#\/components\/schemas\/WalletResource"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "attempt",
                                                "rewards",
                                                "first_win",
                                                "progress_level",
                                                "leaderboard",
                                                "wallet"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/missions": {
            "get": {
                "operationId": "mission.index",
                "description": "Each with its objectives (`value` vs `target`), whether it is completed and\nclaimed, and `resets_at` for daily\/weekly missions.",
                "summary": "List missions and achievements",
                "tags": [
                    "Missions"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "code": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "description": {
                                                        "type": "string"
                                                    },
                                                    "type": {
                                                        "type": "string"
                                                    },
                                                    "icon_url": {
                                                        "type": "string"
                                                    },
                                                    "objectives": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "stat": {
                                                                    "type": "string"
                                                                },
                                                                "target": {
                                                                    "type": "integer"
                                                                },
                                                                "value": {
                                                                    "type": "integer"
                                                                },
                                                                "done": {
                                                                    "type": "boolean"
                                                                }
                                                            },
                                                            "required": [
                                                                "stat",
                                                                "target",
                                                                "value",
                                                                "done"
                                                            ]
                                                        }
                                                    },
                                                    "rewards": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "string"
                                                        },
                                                        "minItems": 0,
                                                        "maxItems": 0
                                                    },
                                                    "completed": {
                                                        "type": "boolean"
                                                    },
                                                    "claimed": {
                                                        "type": "boolean"
                                                    },
                                                    "auto_claim": {
                                                        "type": "string"
                                                    },
                                                    "period_key": {
                                                        "type": "string",
                                                        "const": "all"
                                                    },
                                                    "resets_at": {
                                                        "type": "string"
                                                    },
                                                    "ends_at": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "code",
                                                    "name",
                                                    "description",
                                                    "type",
                                                    "icon_url",
                                                    "objectives",
                                                    "rewards",
                                                    "completed",
                                                    "claimed",
                                                    "auto_claim",
                                                    "period_key",
                                                    "resets_at",
                                                    "ends_at"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/missions\/{code}\/claim": {
            "post": {
                "operationId": "mission.claim",
                "summary": "Claim mission rewards",
                "tags": [
                    "Missions"
                ],
                "parameters": [
                    {
                        "name": "code",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "mission": {
                                                    "type": "string"
                                                },
                                                "rewards": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "mission",
                                                "rewards"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/events": {
            "get": {
                "operationId": "event.index",
                "description": "Running events (`state: active`), events starting within 7 days (`upcoming`)\nand recently ended ones with unclaimed tiers (`ended`).",
                "summary": "List live events",
                "tags": [
                    "Live events"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "code": {
                                                        "type": "string"
                                                    },
                                                    "name": {
                                                        "type": "string"
                                                    },
                                                    "description": {
                                                        "type": "string"
                                                    },
                                                    "type": {
                                                        "type": "string"
                                                    },
                                                    "banner_url": {
                                                        "type": "string"
                                                    },
                                                    "state": {
                                                        "type": "string"
                                                    },
                                                    "occurrence": {
                                                        "type": "string"
                                                    },
                                                    "starts_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "ends_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "requires_join": {
                                                        "type": "string"
                                                    },
                                                    "joined": {
                                                        "type": "string"
                                                    },
                                                    "points_stat": {
                                                        "type": "string"
                                                    },
                                                    "points": {
                                                        "type": "string"
                                                    },
                                                    "tiers": {
                                                        "type": "string"
                                                    },
                                                    "claimable_tiers": {
                                                        "type": "string"
                                                    }
                                                },
                                                "required": [
                                                    "code",
                                                    "name",
                                                    "description",
                                                    "type",
                                                    "banner_url",
                                                    "state",
                                                    "occurrence",
                                                    "starts_at",
                                                    "ends_at",
                                                    "requires_join",
                                                    "joined",
                                                    "points_stat",
                                                    "points",
                                                    "tiers",
                                                    "claimable_tiers"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/events\/{code}": {
            "get": {
                "operationId": "event.show",
                "summary": "Get one live event",
                "tags": [
                    "Live events"
                ],
                "parameters": [
                    {
                        "name": "code",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "code": {
                                                    "type": "string"
                                                },
                                                "name": {
                                                    "type": "string"
                                                },
                                                "description": {
                                                    "type": "string"
                                                },
                                                "type": {
                                                    "type": "string"
                                                },
                                                "banner_url": {
                                                    "type": "string"
                                                },
                                                "state": {
                                                    "type": "string"
                                                },
                                                "occurrence": {
                                                    "type": "string"
                                                },
                                                "starts_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "ends_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "requires_join": {
                                                    "type": "string"
                                                },
                                                "joined": {
                                                    "type": "string"
                                                },
                                                "points_stat": {
                                                    "type": "string"
                                                },
                                                "points": {
                                                    "type": "string"
                                                },
                                                "tiers": {
                                                    "type": "string"
                                                },
                                                "claimable_tiers": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "code",
                                                "name",
                                                "description",
                                                "type",
                                                "banner_url",
                                                "state",
                                                "occurrence",
                                                "starts_at",
                                                "ends_at",
                                                "requires_join",
                                                "joined",
                                                "points_stat",
                                                "points",
                                                "tiers",
                                                "claimable_tiers"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/events\/{code}\/join": {
            "post": {
                "operationId": "event.join",
                "description": "Only needed for events that require joining; points count from then on.",
                "summary": "Join a live event",
                "tags": [
                    "Live events"
                ],
                "parameters": [
                    {
                        "name": "code",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "joined": {
                                                    "type": "boolean"
                                                },
                                                "points": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "joined",
                                                "points"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/events\/{code}\/claim": {
            "post": {
                "operationId": "event.claim",
                "description": "Claims every reached tier (or only `tier`). Works while the event runs and\nfor 3 days after it ends.",
                "summary": "Claim event tier rewards",
                "tags": [
                    "Live events"
                ],
                "parameters": [
                    {
                        "name": "code",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "tier": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "tiers": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "integer"
                                                    }
                                                },
                                                "rewards": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "tiers",
                                                "rewards"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/events\/{code}\/standings": {
            "get": {
                "operationId": "event.standings",
                "description": "Top players of the current (or just ended) occurrence by points.",
                "summary": "Event standings",
                "tags": [
                    "Live events"
                ],
                "parameters": [
                    {
                        "name": "code",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "How many to return, 1\u2013100.",
                        "schema": {
                            "type": "integer",
                            "default": 50
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "occurrence": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "entries": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "occurrence",
                                                "entries"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/leaderboards": {
            "get": {
                "operationId": "leaderboard.index",
                "summary": "List leaderboards",
                "tags": [
                    "Leaderboards"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/LeaderboardResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/leaderboards\/{code}": {
            "get": {
                "operationId": "leaderboard.show",
                "description": "`?period=previous` shows the last closed period (daily\/weekly\/monthly boards).\nPage with `limit` (max 100) and `offset`.",
                "summary": "Get top scores",
                "tags": [
                    "Leaderboards"
                ],
                "parameters": [
                    {
                        "name": "code",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "description": "How many to return, 1\u2013100.",
                        "schema": {
                            "type": "integer",
                            "default": 50
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "description": "Skip this many entries (paging).",
                        "schema": {
                            "type": "integer",
                            "default": 0
                        }
                    },
                    {
                        "name": "period",
                        "in": "query",
                        "description": "`current` (default) or `previous`, the last closed period of a resetting board.",
                        "schema": {
                            "type": "string",
                            "default": "current"
                        },
                        "example": "previous"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "leaderboard": {
                                                    "$ref": "#\/components\/schemas\/LeaderboardResource"
                                                },
                                                "period_key": {
                                                    "type": "string",
                                                    "const": "all"
                                                },
                                                "total": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "entries": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "leaderboard",
                                                "period_key",
                                                "total",
                                                "entries"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/leaderboards\/{code}\/me": {
            "get": {
                "operationId": "leaderboard.me",
                "description": "My entry plus `range` players above and below (default 5). Each `player` also has\n`instant_player_id`: the Instant Games player ID (`FBInstant.player.getID()`) of you,\nyour friends and your connected players, and null for everyone else.",
                "summary": "Get my rank",
                "tags": [
                    "Leaderboards"
                ],
                "parameters": [
                    {
                        "name": "code",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "range",
                        "in": "query",
                        "description": "Entries above and below the player, 1\u201325.",
                        "schema": {
                            "type": "integer",
                            "default": 5
                        }
                    },
                    {
                        "name": "period",
                        "in": "query",
                        "description": "`current` (default) or `previous`, the last closed period of a resetting board.",
                        "schema": {
                            "type": "string",
                            "default": "current"
                        },
                        "example": "previous"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "period_key": {
                                                    "type": "string",
                                                    "const": "all"
                                                },
                                                "me": {},
                                                "entries": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "period_key",
                                                "me",
                                                "entries"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/leaderboards\/{code}\/friends": {
            "get": {
                "operationId": "leaderboard.friends",
                "description": "You, your friends and the players you imported with `POST \/friends\/facebook-instant`\n(one-way: they see you only if their game imported you too). Each `player` also has\n`instant_player_id`, so Instant Games can match rows to `getConnectedPlayersAsync()`.",
                "summary": "Get the friends leaderboard",
                "tags": [
                    "Leaderboards"
                ],
                "parameters": [
                    {
                        "name": "code",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "period",
                        "in": "query",
                        "description": "`current` (default) or `previous`, the last closed period of a resetting board.",
                        "schema": {
                            "type": "string",
                            "default": "current"
                        },
                        "example": "previous"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "period_key": {
                                                    "type": "string",
                                                    "const": "all"
                                                },
                                                "entries": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "period_key",
                                                "entries"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/leaderboards\/{code}\/context\/{platform}\/{context}": {
            "get": {
                "operationId": "leaderboard.context",
                "description": "The players of one group on a platform ranked among themselves: \"who in this chat did\n     * best today\". `{platform}` is `facebook_instant` (a Messenger context:\n`FBInstant.context.getID()`), `telegram` (the chat a Mini App was opened from, recorded\nat sign-in), `discord` (a channel or Activity instance) or `reddit`. You must be in the\ngroup yourself (`POST \/me\/contexts`, or Telegram sign-in). `?verified=true` keeps only\nmembers the platform vouched for (Telegram); other platforms' groups are reported by the\ngames, so anyone with the group's ID can join its board.",
                "summary": "Get a group leaderboard",
                "tags": [
                    "Leaderboards"
                ],
                "parameters": [
                    {
                        "name": "code",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "platform",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "context",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "period",
                        "in": "query",
                        "description": "`current` (default) or `previous`, the last closed period of a resetting board.",
                        "schema": {
                            "type": "string",
                            "default": "current"
                        },
                        "example": "previous"
                    },
                    {
                        "name": "verified",
                        "in": "query",
                        "description": "true: only members the platform vouched for (Telegram chats).",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "period_key": {
                                                    "type": "string",
                                                    "const": "all"
                                                },
                                                "platform": {
                                                    "type": "string"
                                                },
                                                "context_id": {
                                                    "type": "string"
                                                },
                                                "entries": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "period_key",
                                                "platform",
                                                "context_id",
                                                "entries"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/leaderboards\/{code}\/scores": {
            "post": {
                "operationId": "leaderboard.submit",
                "description": "Combined with my existing entry according to the board's aggregation\n(best, latest or sum). Returns my score and rank.",
                "summary": "Submit a score",
                "tags": [
                    "Leaderboards"
                ],
                "parameters": [
                    {
                        "name": "code",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "score": {
                                        "type": "integer"
                                    },
                                    "metadata": {
                                        "type": [
                                            "object",
                                            "null"
                                        ],
                                        "description": "Optional JSON object kept with the score and returned in standings, e.g. {\"character\": \"mage\"}.",
                                        "additionalProperties": {}
                                    }
                                },
                                "required": [
                                    "score"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "improved": {
                                                    "type": "boolean"
                                                },
                                                "score": {
                                                    "type": "integer"
                                                },
                                                "rank": {
                                                    "type": "integer"
                                                },
                                                "period_key": {
                                                    "type": "string",
                                                    "const": "all"
                                                }
                                            },
                                            "required": [
                                                "improved",
                                                "score",
                                                "rank",
                                                "period_key"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/friends": {
            "get": {
                "operationId": "friend.index",
                "summary": "List friends and requests",
                "tags": [
                    "Friends"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "friends": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "incoming": {
                                                    "type": "array",
                                                    "items": {}
                                                },
                                                "outgoing": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "friends",
                                                "incoming",
                                                "outgoing"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            },
            "post": {
                "operationId": "friend.store",
                "description": "By `friend_code` (shown in the other player's profile) or `player_id`. If they\nalready asked you, this accepts their request.",
                "summary": "Send a friend request",
                "tags": [
                    "Friends"
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "friend_code": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 12
                                    },
                                    "player_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "uuid"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "player": {
                                                    "$ref": "#\/components\/schemas\/PublicPlayerResource"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status",
                                                "player"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/friends\/requests\/{id}\/accept": {
            "post": {
                "operationId": "friend.accept",
                "summary": "Accept a friend request",
                "tags": [
                    "Friends"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/friends\/requests\/{id}\/decline": {
            "post": {
                "operationId": "friend.decline",
                "summary": "Decline a friend request",
                "tags": [
                    "Friends"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "status": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/friends\/{player}": {
            "delete": {
                "operationId": "friend.destroy",
                "summary": "Remove a friend",
                "tags": [
                    "Friends"
                ],
                "parameters": [
                    {
                        "name": "player",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "removed": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "removed"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/friends\/facebook": {
            "post": {
                "operationId": "friend.facebook",
                "description": "Links the Facebook account (verified with the game's Facebook app) and adds\nFacebook friends who also play as friends.",
                "summary": "Import Facebook friends",
                "tags": [
                    "Friends"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "access_token": {
                                        "type": "string",
                                        "maxLength": 2000
                                    }
                                },
                                "required": [
                                    "access_token"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "added": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "added"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/friends\/facebook-instant": {
            "post": {
                "operationId": "friend.facebookInstant",
                "description": "Send the IDs from `FBInstant.player.getConnectedPlayersAsync()` (`player.getID()` of each,\nup to 200). The same as `POST \/friends\/platform\/facebook_instant`: see there.",
                "summary": "Import Instant Games connected players",
                "tags": [
                    "Friends"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "player_ids": {
                                        "type": "array",
                                        "description": "Instant Games player IDs from getConnectedPlayersAsync(), at most 200.",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                },
                                "required": [
                                    "player_ids"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "connected": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "players": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "array",
                                                        "items": {}
                                                    }
                                                }
                                            },
                                            "required": [
                                                "connected",
                                                "players"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/friends\/platform\/{platform}": {
            "post": {
                "operationId": "friend.platform",
                "description": "`{platform}` is `facebook_instant`, `reddit`, `discord` or `telegram`. Send the platform\nplayer IDs of the people the player is connected to there (up to 200), for example\nInstant Games `getConnectedPlayersAsync()`. Players of this game who signed in with those\nIDs show up on your friends leaderboards; unknown IDs are ignored. Each import replaces\nthe previous list for that platform.\n\nThe IDs aren't signed, so this is one-way: they see you only if their game reports you\ntoo. It doesn't make friendships. Returns the matched players with their `platform_ids`,\nso the game can map leaderboard rows (`player.id`) to the IDs it knows.",
                "summary": "Import connected players from a platform",
                "tags": [
                    "Friends"
                ],
                "parameters": [
                    {
                        "name": "platform",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "player_ids": {
                                        "type": "array",
                                        "description": "Platform player IDs, at most 200.",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                },
                                "required": [
                                    "player_ids"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "connected": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "players": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "array",
                                                        "items": {}
                                                    }
                                                }
                                            },
                                            "required": [
                                                "connected",
                                                "players"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/inbox": {
            "get": {
                "operationId": "inbox.index",
                "description": "Newest first; expired messages without rewards are hidden.",
                "summary": "List my inbox",
                "tags": [
                    "Inbox"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#\/components\/schemas\/InboxMessageResource"
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/inbox\/{id}\/read": {
            "post": {
                "operationId": "inbox.read",
                "summary": "Mark a message read",
                "tags": [
                    "Inbox"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/InboxMessageResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/inbox\/{id}\/claim": {
            "post": {
                "operationId": "inbox.claim",
                "summary": "Claim a message's rewards",
                "tags": [
                    "Inbox"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                },
                                                "rewards": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "rewards"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/inbox\/{id}": {
            "delete": {
                "operationId": "inbox.destroy",
                "summary": "Delete a message",
                "tags": [
                    "Inbox"
                ],
                "parameters": [
                    {
                        "name": "id",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "integer"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "deleted": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "deleted"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/health": {
            "get": {
                "operationId": "meta.health",
                "summary": "Health check",
                "tags": [
                    "Game"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "status": {
                                                    "type": "string",
                                                    "const": "ok"
                                                },
                                                "version": {
                                                    "type": "string",
                                                    "const": "v1"
                                                },
                                                "time": {
                                                    "type": "string"
                                                }
                                            },
                                            "required": [
                                                "status",
                                                "version",
                                                "time"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {}
                ]
            }
        },
        "\/time": {
            "get": {
                "operationId": "meta.time",
                "description": "Use this instead of the device clock for timers: current UTC time and when\nthe daily, weekly and monthly periods reset.",
                "summary": "Server time and reset times",
                "tags": [
                    "Game"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "now": {
                                                    "type": "string"
                                                },
                                                "unix": {
                                                    "type": "string"
                                                },
                                                "game": {
                                                    "type": "object",
                                                    "properties": {
                                                        "id": {
                                                            "type": "string"
                                                        },
                                                        "name": {
                                                            "type": "string"
                                                        }
                                                    },
                                                    "required": [
                                                        "id",
                                                        "name"
                                                    ]
                                                },
                                                "periods": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "string"
                                                    }
                                                }
                                            },
                                            "required": [
                                                "now",
                                                "unix",
                                                "game",
                                                "periods"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": []
                    }
                ]
            }
        },
        "\/config": {
            "get": {
                "operationId": "meta.config",
                "description": "All active config values as one object. Supports caching: send the ETag back\nin If-None-Match and get 304 when nothing changed.",
                "summary": "Get remote config",
                "tags": [
                    "Game"
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "anyOf": [
                                                {
                                                    "type": "string"
                                                },
                                                {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "array",
                                                        "items": {}
                                                    }
                                                }
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "304": {
                        "description": ""
                    }
                },
                "security": [
                    {
                        "gameKey": []
                    }
                ]
            }
        },
        "\/questions\/report": {
            "post": {
                "operationId": "questionReport.store",
                "description": "For a \"Report question\" button after a duel or daily quiz. Send where the player saw\nit, `source: \"duel\"` with `duel_id`, or `source: \"daily\"` with `channel` and\n`period_key`, plus the question's `item_id` and a `reason`: `wrong_answer`, `unclear`,\n`typo`, `outdated`, `offensive` or `other` (an optional `note`, up to 500 characters).\nOnly questions the player was given can be reported, once per question (a repeat\nanswers 200 with the first report). The studio fixes or retires reported questions in\nthe console.",
                "summary": "Report a question",
                "tags": [
                    "Questions"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "source": {
                                        "type": "string",
                                        "enum": [
                                            "duel",
                                            "daily"
                                        ]
                                    },
                                    "duel_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "uuid"
                                    },
                                    "channel": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 50
                                    },
                                    "period_key": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date"
                                    },
                                    "item_id": {
                                        "type": "string",
                                        "maxLength": 50
                                    },
                                    "reason": {
                                        "type": "string",
                                        "enum": [
                                            "wrong_answer",
                                            "unclear",
                                            "typo",
                                            "outdated",
                                            "offensive",
                                            "other"
                                        ]
                                    },
                                    "note": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 500
                                    }
                                },
                                "required": [
                                    "source",
                                    "item_id",
                                    "reason"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/server\/players\/{player}": {
            "get": {
                "operationId": "server.showPlayer",
                "description": "Profile, wallet, inventory and stats.",
                "summary": "Get a player",
                "tags": [
                    "Server API"
                ],
                "parameters": [
                    {
                        "name": "player",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "player": {
                                                    "$ref": "#\/components\/schemas\/PlayerResource"
                                                },
                                                "wallet": {
                                                    "type": "array",
                                                    "items": {
                                                        "$ref": "#\/components\/schemas\/WalletResource"
                                                    }
                                                },
                                                "inventory": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "item": {
                                                                "type": "string"
                                                            },
                                                            "quantity": {
                                                                "type": "integer"
                                                            }
                                                        },
                                                        "required": [
                                                            "item",
                                                            "quantity"
                                                        ]
                                                    }
                                                },
                                                "stats": {
                                                    "type": "object"
                                                }
                                            },
                                            "required": [
                                                "player",
                                                "wallet",
                                                "inventory",
                                                "stats"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "serverKey": []
                    }
                ]
            }
        },
        "\/server\/players\/{player}\/grant": {
            "post": {
                "operationId": "server.grant",
                "description": "Currencies, items or chests, e.g. for compensation or server-side gameplay.",
                "summary": "Grant rewards",
                "tags": [
                    "Server API"
                ],
                "parameters": [
                    {
                        "name": "player",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "rewards": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        },
                                        "minItems": 1
                                    },
                                    "reason": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 40
                                    },
                                    "reference": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 100
                                    }
                                },
                                "required": [
                                    "rewards"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "rewards": {
                                                    "type": "array",
                                                    "items": {
                                                        "anyOf": [
                                                            {
                                                                "type": "object",
                                                                "properties": {
                                                                    "type": {
                                                                        "type": "string",
                                                                        "const": "currency"
                                                                    },
                                                                    "code": {
                                                                        "type": "string"
                                                                    },
                                                                    "quantity": {
                                                                        "type": "string"
                                                                    },
                                                                    "name": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "type",
                                                                    "code",
                                                                    "quantity",
                                                                    "name"
                                                                ]
                                                            },
                                                            {
                                                                "type": "object",
                                                                "properties": {
                                                                    "type": {
                                                                        "type": "string",
                                                                        "const": "item"
                                                                    },
                                                                    "code": {
                                                                        "type": "string"
                                                                    },
                                                                    "quantity": {
                                                                        "type": "integer"
                                                                    },
                                                                    "name": {
                                                                        "type": "string"
                                                                    }
                                                                },
                                                                "required": [
                                                                    "type",
                                                                    "code",
                                                                    "quantity",
                                                                    "name"
                                                                ]
                                                            },
                                                            {
                                                                "type": "object",
                                                                "properties": {
                                                                    "type": {
                                                                        "type": "string",
                                                                        "const": "chest"
                                                                    },
                                                                    "code": {
                                                                        "type": "string"
                                                                    },
                                                                    "quantity": {
                                                                        "type": "string"
                                                                    },
                                                                    "name": {
                                                                        "type": "string"
                                                                    },
                                                                    "contents": {
                                                                        "type": "array",
                                                                        "items": {}
                                                                    }
                                                                },
                                                                "required": [
                                                                    "type",
                                                                    "code",
                                                                    "quantity",
                                                                    "name",
                                                                    "contents"
                                                                ]
                                                            }
                                                        ]
                                                    }
                                                }
                                            },
                                            "required": [
                                                "rewards"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "serverKey": []
                    }
                ]
            }
        },
        "\/server\/players\/{player}\/debit": {
            "post": {
                "operationId": "server.debit",
                "description": "Spends a currency on the player's behalf; fails with insufficient_funds.",
                "summary": "Take currency",
                "tags": [
                    "Server API"
                ],
                "parameters": [
                    {
                        "name": "player",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "currency": {
                                        "type": "string"
                                    },
                                    "amount": {
                                        "type": "integer",
                                        "minimum": 1
                                    },
                                    "reason": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 40
                                    }
                                },
                                "required": [
                                    "currency",
                                    "amount"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/WalletResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "serverKey": []
                    }
                ]
            }
        },
        "\/server\/players\/{player}\/stats": {
            "post": {
                "operationId": "server.stats",
                "description": "Any stat (not only client-writable ones), combined by the stat's mode.",
                "summary": "Update stats",
                "tags": [
                    "Server API"
                ],
                "parameters": [
                    {
                        "name": "player",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "stats": {
                                        "type": "object",
                                        "description": "Stat code => value, e.g. {\"kills\": 7}. Unknown codes create new stats.",
                                        "additionalProperties": {
                                            "type": "integer"
                                        }
                                    }
                                },
                                "required": [
                                    "stats"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "serverKey": []
                    }
                ]
            }
        },
        "\/server\/players\/{player}\/inbox": {
            "post": {
                "operationId": "server.inbox",
                "summary": "Send an inbox message",
                "tags": [
                    "Server API"
                ],
                "parameters": [
                    {
                        "name": "player",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "title": {
                                        "type": "string",
                                        "maxLength": 255
                                    },
                                    "body": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 5000
                                    },
                                    "rewards": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    },
                                    "expires_at": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date-time"
                                    }
                                },
                                "required": [
                                    "title"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "id"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "serverKey": []
                    }
                ]
            }
        },
        "\/server\/players\/{player}\/moderate": {
            "post": {
                "operationId": "server.moderate",
                "summary": "Ban, suspend or restore a player",
                "tags": [
                    "Server API"
                ],
                "parameters": [
                    {
                        "name": "player",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "status": {
                                        "type": "string",
                                        "enum": [
                                            "active",
                                            "suspended",
                                            "banned"
                                        ]
                                    },
                                    "reason": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 255
                                    },
                                    "until": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date-time"
                                    }
                                },
                                "required": [
                                    "status"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#\/components\/schemas\/PlayerResource"
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "serverKey": []
                    }
                ]
            }
        },
        "\/server\/leaderboards\/{code}\/scores": {
            "post": {
                "operationId": "server.score",
                "description": "Works on leaderboards that don't accept client scores.",
                "summary": "Submit an authoritative score",
                "tags": [
                    "Server API"
                ],
                "parameters": [
                    {
                        "name": "code",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "player_id": {
                                        "type": "string"
                                    },
                                    "score": {
                                        "type": "integer"
                                    },
                                    "metadata": {
                                        "type": [
                                            "object",
                                            "null"
                                        ],
                                        "description": "Optional JSON object kept with the score and returned in standings, e.g. {\"character\": \"mage\"}.",
                                        "additionalProperties": {}
                                    }
                                },
                                "required": [
                                    "player_id",
                                    "score"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "improved": {
                                                    "type": "boolean"
                                                },
                                                "score": {
                                                    "type": "integer"
                                                },
                                                "rank": {
                                                    "type": "integer"
                                                },
                                                "period_key": {
                                                    "type": "string",
                                                    "const": "all"
                                                }
                                            },
                                            "required": [
                                                "improved",
                                                "score",
                                                "rank",
                                                "period_key"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "serverKey": []
                    }
                ]
            }
        },
        "\/server\/events\/{code}\/points": {
            "post": {
                "operationId": "server.eventPoints",
                "summary": "Add live event points",
                "tags": [
                    "Server API"
                ],
                "parameters": [
                    {
                        "name": "code",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "player_id": {
                                        "type": "string"
                                    },
                                    "points": {
                                        "type": "integer",
                                        "minimum": 1
                                    }
                                },
                                "required": [
                                    "player_id",
                                    "points"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "points": {
                                                    "type": "integer"
                                                }
                                            },
                                            "required": [
                                                "points"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "serverKey": []
                    }
                ]
            }
        },
        "\/server\/purchases": {
            "post": {
                "operationId": "server.purchase",
                "description": "For purchases made outside the app stores (your web shop, Steam, codes):\ngrants the offer's contents once per transaction ID.",
                "summary": "Grant a web-shop purchase",
                "tags": [
                    "Server API"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "player_id": {
                                        "type": "string"
                                    },
                                    "offer": {
                                        "type": "string"
                                    },
                                    "transaction_id": {
                                        "type": "string",
                                        "maxLength": 191
                                    },
                                    "revenue_cents": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0
                                    }
                                },
                                "required": [
                                    "player_id",
                                    "offer",
                                    "transaction_id"
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "serverKey": []
                    }
                ]
            }
        },
        "\/daily\/{channel}": {
            "get": {
                "operationId": "daily.show",
                "description": "`{channel}` is one of the game's daily channels (for example `huddle`); the game\nitself comes from `X-Game-Key`. Build the puzzle from `seed`, or for server-scored\nchannels play `items` (questions without answers). During the grace window after\nmidnight (`late_completion: true`) a player who hasn't finished yesterday's\nchallenge still gets yesterday's. `grace_until` is the last moment a result for\n`period_key` is accepted; send that `period_key` with the result.\n\nThe first call of a day (without `peek`) starts the player's round clock, so call it when\nthe player starts playing. For a streak badge or a menu, use `?peek=true`: the same\nanswer without `seed` and `items`, and the clock doesn't start.",
                "summary": "Get the daily challenge",
                "tags": [
                    "Daily"
                ],
                "parameters": [
                    {
                        "name": "channel",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "peek",
                        "in": "query",
                        "description": "true: only the day, streak and whether you played, without seed or questions, and without starting the round clock. Use it for a streak badge or menu; call without it when the player starts playing.",
                        "schema": {
                            "type": "boolean",
                            "default": false
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "channel": {
                                                    "type": "string"
                                                },
                                                "period_key": {
                                                    "type": "string"
                                                },
                                                "current_period_key": {
                                                    "type": "string"
                                                },
                                                "timezone": {
                                                    "type": "string"
                                                },
                                                "starts_at": {
                                                    "type": "string"
                                                },
                                                "resets_at": {
                                                    "type": "string"
                                                },
                                                "late_completion": {
                                                    "type": "boolean"
                                                },
                                                "grace_until": {
                                                    "type": "string"
                                                },
                                                "seed": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "scoring": {
                                                    "type": "string",
                                                    "enum": [
                                                        "authoritative",
                                                        "seed"
                                                    ]
                                                },
                                                "content_pack": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "locale": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "time_limit_ms": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "items": {
                                                    "type": "null"
                                                },
                                                "peek": {
                                                    "type": "boolean"
                                                },
                                                "submitted": {
                                                    "type": "boolean"
                                                },
                                                "result": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "period_key": {
                                                            "type": "string"
                                                        },
                                                        "seed": {
                                                            "type": "string"
                                                        },
                                                        "score": {
                                                            "type": "integer"
                                                        },
                                                        "stars": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "duration_ms": {
                                                            "type": [
                                                                "integer",
                                                                "null"
                                                            ]
                                                        },
                                                        "submitted_at": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "period_key",
                                                        "seed",
                                                        "score",
                                                        "stars",
                                                        "duration_ms",
                                                        "submitted_at"
                                                    ]
                                                },
                                                "streak": {
                                                    "type": "object",
                                                    "properties": {
                                                        "current": {
                                                            "type": "integer"
                                                        },
                                                        "best": {
                                                            "type": "integer"
                                                        },
                                                        "freezes": {
                                                            "type": "integer"
                                                        },
                                                        "last_period_key": {
                                                            "type": [
                                                                "string",
                                                                "null"
                                                            ]
                                                        }
                                                    },
                                                    "required": [
                                                        "current",
                                                        "best",
                                                        "freezes",
                                                        "last_period_key"
                                                    ]
                                                }
                                            },
                                            "required": [
                                                "channel",
                                                "period_key",
                                                "current_period_key",
                                                "timezone",
                                                "starts_at",
                                                "resets_at",
                                                "late_completion",
                                                "grace_until",
                                                "seed",
                                                "scoring",
                                                "content_pack",
                                                "locale",
                                                "time_limit_ms",
                                                "items",
                                                "peek",
                                                "submitted",
                                                "result",
                                                "streak"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/daily\/{channel}\/results": {
            "post": {
                "operationId": "daily.submit",
                "description": "One result per player and day: a retry, or an `Idempotency-Key` used before, returns\nthe first result with `duplicate: true`. Send the `period_key` you played; without it\nthe result counts for the day being played now. Seed channels take `score` (0 up to\nthe channel's maximum); server-scored channels score `answers` (one per question, by\n`id` or `index`, with `choice` and `time_ms`) and ignore `score`. The first result of\na day updates the streak and grants the channel's `rewards`.\n\nOpen the challenge with `GET \/daily\/{channel}` (without `peek`) when the player starts\nplaying: the first such call of a day starts the player's round clock. Server-scored channels refuse a result without it (409\n`round_not_started`), refuse answer times longer than the real time (422\n`timing_implausible`) and score 0 for a round finished after every question's limit\nplus 60 seconds (the streak still counts). A channel with a shortest believable round\nrefuses results faster than that (422 `too_fast`); send `duration_ms`.",
                "summary": "Submit the daily result",
                "tags": [
                    "Daily"
                ],
                "parameters": [
                    {
                        "name": "channel",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "Idempotency-Key",
                        "in": "header",
                        "description": "Optional, up to 100 characters: a retry with the same key returns the first result.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "period_key": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "date"
                                    },
                                    "score": {
                                        "type": "integer"
                                    },
                                    "stars": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 255
                                    },
                                    "duration_ms": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 86400000
                                    },
                                    "answers": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string",
                                                    "maxLength": 50
                                                },
                                                "index": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "choice": {
                                                    "type": "integer"
                                                },
                                                "time_ms": {
                                                    "type": "integer",
                                                    "minimum": 0,
                                                    "maximum": 600000
                                                }
                                            }
                                        },
                                        "maxItems": 50
                                    },
                                    "replay": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "string"
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/notifications\/apple\/{game}": {
            "post": {
                "operationId": "storeNotification.apple",
                "description": "Marks refunded or revoked purchases. The payload is verified against Apple's\ncertificate chain.",
                "summary": "App Store Server Notifications",
                "tags": [
                    "Store notifications"
                ],
                "parameters": [
                    {
                        "name": "game",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "received": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "received"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {}
                ]
            }
        },
        "\/notifications\/google\/{game}": {
            "post": {
                "operationId": "storeNotification.google",
                "description": "Pub\/Sub push endpoint: append ?token=<rtdn token from the game's IAP settings>.\nVoided purchases are marked refunded.",
                "summary": "Google Play Real-time Developer Notifications",
                "tags": [
                    "Store notifications"
                ],
                "parameters": [
                    {
                        "name": "game",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "description": "The notification token from Game settings, as configured in the Pub\/Sub push URL.",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "received": {
                                                    "type": "boolean"
                                                }
                                            },
                                            "required": [
                                                "received"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {}
                ]
            }
        },
        "\/duels": {
            "get": {
                "operationId": "duel.index",
                "description": "Newest first, without the questions.",
                "summary": "List my duels",
                "tags": [
                    "Duels"
                ],
                "parameters": [
                    {
                        "name": "status",
                        "in": "query",
                        "schema": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "enum": [
                                "pending",
                                "in_progress",
                                "completed",
                                "expired",
                                "forfeited",
                                "declined",
                                null
                            ]
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 1,
                            "maximum": 50
                        }
                    },
                    {
                        "name": "offset",
                        "in": "query",
                        "schema": {
                            "type": "integer",
                            "minimum": 0
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "id": {
                                                        "type": "string"
                                                    },
                                                    "status": {
                                                        "type": "string"
                                                    },
                                                    "mode": {
                                                        "type": "string"
                                                    },
                                                    "best_of": {
                                                        "type": "integer"
                                                    },
                                                    "invite_code": {
                                                        "type": "string"
                                                    },
                                                    "share_url": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "seed": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "content_pack": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "scored_by": {
                                                        "type": "string",
                                                        "enum": [
                                                            "server",
                                                            "client"
                                                        ]
                                                    },
                                                    "time_limit_ms": {
                                                        "type": [
                                                            "integer",
                                                            "null"
                                                        ]
                                                    },
                                                    "locale": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "region": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "context_id": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "series_id": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "expires_at": {
                                                        "type": "string"
                                                    },
                                                    "resolved_at": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "winner_player_id": {
                                                        "type": [
                                                            "string",
                                                            "null"
                                                        ]
                                                    },
                                                    "you": {
                                                        "type": [
                                                            "object",
                                                            "null"
                                                        ],
                                                        "properties": {
                                                            "role": {
                                                                "type": "string"
                                                            },
                                                            "status": {
                                                                "type": "string"
                                                            },
                                                            "submitted": {
                                                                "type": "boolean"
                                                            },
                                                            "score": {
                                                                "type": "null"
                                                            }
                                                        },
                                                        "required": [
                                                            "role",
                                                            "status",
                                                            "submitted",
                                                            "score"
                                                        ]
                                                    },
                                                    "participants": {
                                                        "type": "array",
                                                        "items": {
                                                            "type": "object",
                                                            "properties": {
                                                                "role": {
                                                                    "type": "string"
                                                                },
                                                                "kind": {
                                                                    "type": "string"
                                                                },
                                                                "status": {
                                                                    "type": "string"
                                                                },
                                                                "player": {
                                                                    "type": [
                                                                        "array",
                                                                        "null"
                                                                    ],
                                                                    "items": {}
                                                                },
                                                                "submitted": {
                                                                    "type": "boolean"
                                                                },
                                                                "score": {
                                                                    "type": [
                                                                        "integer",
                                                                        "null"
                                                                    ]
                                                                }
                                                            },
                                                            "required": [
                                                                "role",
                                                                "kind",
                                                                "status",
                                                                "player",
                                                                "submitted",
                                                                "score"
                                                            ]
                                                        }
                                                    },
                                                    "items": {
                                                        "type": "array",
                                                        "items": {}
                                                    }
                                                },
                                                "required": [
                                                    "id",
                                                    "status",
                                                    "mode",
                                                    "best_of",
                                                    "invite_code",
                                                    "share_url",
                                                    "seed",
                                                    "content_pack",
                                                    "scored_by",
                                                    "time_limit_ms",
                                                    "locale",
                                                    "region",
                                                    "context_id",
                                                    "series_id",
                                                    "expires_at",
                                                    "resolved_at",
                                                    "winner_player_id",
                                                    "you",
                                                    "participants",
                                                    "items"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            },
            "post": {
                "operationId": "duel.store",
                "description": "Challenge a player by `opponent_player_id` or by a platform ID (`opponent_platform`:\n`facebook_instant`, `reddit` or `facebook`), leave the opponent out for an open invite\nthat anyone with the `invite_code` (or `share_url`) can accept, or set `mode: ghost` to\nplay a recent recorded run on the same pack. You can play your round right away: the\nresponse has the questions (`items`, without answers) or, for packs the game builds\nitself, the `seed`.",
                "summary": "Create a duel",
                "tags": [
                    "Duels"
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "content_pack": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 50
                                    },
                                    "mode": {
                                        "type": "string",
                                        "enum": [
                                            "challenge",
                                            "ghost"
                                        ]
                                    },
                                    "opponent_player_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "format": "uuid"
                                    },
                                    "opponent_platform": {
                                        "type": [
                                            "object",
                                            "null"
                                        ],
                                        "properties": {
                                            "provider": {
                                                "type": "string",
                                                "enum": [
                                                    "facebook_instant",
                                                    "reddit",
                                                    "discord",
                                                    "telegram",
                                                    "facebook"
                                                ]
                                            },
                                            "id": {
                                                "type": "string",
                                                "maxLength": 191
                                            }
                                        }
                                    },
                                    "locale": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 10
                                    },
                                    "region": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 8
                                    },
                                    "context_id": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "maxLength": 191
                                    },
                                    "device_fingerprint": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "pattern": "^[a-f0-9]{64}$"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "mode": {
                                                    "type": "string"
                                                },
                                                "best_of": {
                                                    "type": "integer"
                                                },
                                                "invite_code": {
                                                    "type": "string"
                                                },
                                                "share_url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "seed": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "content_pack": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "scored_by": {
                                                    "type": "string",
                                                    "enum": [
                                                        "server",
                                                        "client"
                                                    ]
                                                },
                                                "time_limit_ms": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "locale": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "region": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "context_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "series_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "expires_at": {
                                                    "type": "string"
                                                },
                                                "resolved_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "winner_player_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "you": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "role": {
                                                            "type": "string"
                                                        },
                                                        "status": {
                                                            "type": "string"
                                                        },
                                                        "submitted": {
                                                            "type": "boolean"
                                                        },
                                                        "score": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "role",
                                                        "status",
                                                        "submitted",
                                                        "score"
                                                    ]
                                                },
                                                "participants": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "role": {
                                                                "type": "string"
                                                            },
                                                            "kind": {
                                                                "type": "string"
                                                            },
                                                            "status": {
                                                                "type": "string"
                                                            },
                                                            "player": {
                                                                "type": [
                                                                    "array",
                                                                    "null"
                                                                ],
                                                                "items": {}
                                                            },
                                                            "submitted": {
                                                                "type": "boolean"
                                                            },
                                                            "score": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "role",
                                                            "kind",
                                                            "status",
                                                            "player",
                                                            "submitted",
                                                            "score"
                                                        ]
                                                    }
                                                },
                                                "items": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status",
                                                "mode",
                                                "best_of",
                                                "invite_code",
                                                "share_url",
                                                "seed",
                                                "content_pack",
                                                "scored_by",
                                                "time_limit_ms",
                                                "locale",
                                                "region",
                                                "context_id",
                                                "series_id",
                                                "expires_at",
                                                "resolved_at",
                                                "winner_player_id",
                                                "you",
                                                "participants",
                                                "items"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/duels\/invite\/{code}": {
            "get": {
                "operationId": "duel.invite",
                "description": "For the invite screen: who is challenging and on which pack. The questions come\nwith the response of accepting.",
                "summary": "Look up a duel by invite code",
                "tags": [
                    "Duels"
                ],
                "parameters": [
                    {
                        "name": "code",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "mode": {
                                                    "type": "string"
                                                },
                                                "best_of": {
                                                    "type": "integer"
                                                },
                                                "invite_code": {
                                                    "type": "string"
                                                },
                                                "share_url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "seed": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "content_pack": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "scored_by": {
                                                    "type": "string",
                                                    "enum": [
                                                        "server",
                                                        "client"
                                                    ]
                                                },
                                                "time_limit_ms": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "locale": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "region": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "context_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "series_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "expires_at": {
                                                    "type": "string"
                                                },
                                                "resolved_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "winner_player_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "you": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "role": {
                                                            "type": "string"
                                                        },
                                                        "status": {
                                                            "type": "string"
                                                        },
                                                        "submitted": {
                                                            "type": "boolean"
                                                        },
                                                        "score": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "role",
                                                        "status",
                                                        "submitted",
                                                        "score"
                                                    ]
                                                },
                                                "participants": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "role": {
                                                                "type": "string"
                                                            },
                                                            "kind": {
                                                                "type": "string"
                                                            },
                                                            "status": {
                                                                "type": "string"
                                                            },
                                                            "player": {
                                                                "type": [
                                                                    "array",
                                                                    "null"
                                                                ],
                                                                "items": {}
                                                            },
                                                            "submitted": {
                                                                "type": "boolean"
                                                            },
                                                            "score": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "role",
                                                            "kind",
                                                            "status",
                                                            "player",
                                                            "submitted",
                                                            "score"
                                                        ]
                                                    }
                                                },
                                                "items": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status",
                                                "mode",
                                                "best_of",
                                                "invite_code",
                                                "share_url",
                                                "seed",
                                                "content_pack",
                                                "scored_by",
                                                "time_limit_ms",
                                                "locale",
                                                "region",
                                                "context_id",
                                                "series_id",
                                                "expires_at",
                                                "resolved_at",
                                                "winner_player_id",
                                                "you",
                                                "participants",
                                                "items"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/duels\/head-to-head\/{player}": {
            "get": {
                "operationId": "duel.headToHead",
                "description": "Ended live duels between you and that player (ghost duels don't count). A forfeit\nor an expired duel counts for the player who won it; equal scores are draws.",
                "summary": "Head-to-head record against a player",
                "tags": [
                    "Duels"
                ],
                "parameters": [
                    {
                        "name": "player",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "wins": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "losses": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "draws": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "last_duel_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "recent": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "wins",
                                                "losses",
                                                "draws",
                                                "last_duel_at",
                                                "recent"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/duels\/{duel}": {
            "get": {
                "operationId": "duel.show",
                "description": "For players in the duel (anyone else looks an open duel up by its invite code). The\nquestions are included, with the correct answers once the duel has ended if you\nplayed your round. Scores are shown when it has ended (your own after you submit).",
                "summary": "Get a duel",
                "tags": [
                    "Duels"
                ],
                "parameters": [
                    {
                        "name": "duel",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "mode": {
                                                    "type": "string"
                                                },
                                                "best_of": {
                                                    "type": "integer"
                                                },
                                                "invite_code": {
                                                    "type": "string"
                                                },
                                                "share_url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "seed": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "content_pack": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "scored_by": {
                                                    "type": "string",
                                                    "enum": [
                                                        "server",
                                                        "client"
                                                    ]
                                                },
                                                "time_limit_ms": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "locale": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "region": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "context_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "series_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "expires_at": {
                                                    "type": "string"
                                                },
                                                "resolved_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "winner_player_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "you": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "role": {
                                                            "type": "string"
                                                        },
                                                        "status": {
                                                            "type": "string"
                                                        },
                                                        "submitted": {
                                                            "type": "boolean"
                                                        },
                                                        "score": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "role",
                                                        "status",
                                                        "submitted",
                                                        "score"
                                                    ]
                                                },
                                                "participants": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "role": {
                                                                "type": "string"
                                                            },
                                                            "kind": {
                                                                "type": "string"
                                                            },
                                                            "status": {
                                                                "type": "string"
                                                            },
                                                            "player": {
                                                                "type": [
                                                                    "array",
                                                                    "null"
                                                                ],
                                                                "items": {}
                                                            },
                                                            "submitted": {
                                                                "type": "boolean"
                                                            },
                                                            "score": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "role",
                                                            "kind",
                                                            "status",
                                                            "player",
                                                            "submitted",
                                                            "score"
                                                        ]
                                                    }
                                                },
                                                "items": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status",
                                                "mode",
                                                "best_of",
                                                "invite_code",
                                                "share_url",
                                                "seed",
                                                "content_pack",
                                                "scored_by",
                                                "time_limit_ms",
                                                "locale",
                                                "region",
                                                "context_id",
                                                "series_id",
                                                "expires_at",
                                                "resolved_at",
                                                "winner_player_id",
                                                "you",
                                                "participants",
                                                "items"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/duels\/{duel}\/accept": {
            "post": {
                "operationId": "duel.accept",
                "description": "The invited player, or anyone with the invite code of an open duel. The response\nhas the questions.",
                "summary": "Accept a duel",
                "tags": [
                    "Duels"
                ],
                "parameters": [
                    {
                        "name": "duel",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "mode": {
                                                    "type": "string"
                                                },
                                                "best_of": {
                                                    "type": "integer"
                                                },
                                                "invite_code": {
                                                    "type": "string"
                                                },
                                                "share_url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "seed": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "content_pack": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "scored_by": {
                                                    "type": "string",
                                                    "enum": [
                                                        "server",
                                                        "client"
                                                    ]
                                                },
                                                "time_limit_ms": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "locale": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "region": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "context_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "series_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "expires_at": {
                                                    "type": "string"
                                                },
                                                "resolved_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "winner_player_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "you": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "role": {
                                                            "type": "string"
                                                        },
                                                        "status": {
                                                            "type": "string"
                                                        },
                                                        "submitted": {
                                                            "type": "boolean"
                                                        },
                                                        "score": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "role",
                                                        "status",
                                                        "submitted",
                                                        "score"
                                                    ]
                                                },
                                                "participants": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "role": {
                                                                "type": "string"
                                                            },
                                                            "kind": {
                                                                "type": "string"
                                                            },
                                                            "status": {
                                                                "type": "string"
                                                            },
                                                            "player": {
                                                                "type": [
                                                                    "array",
                                                                    "null"
                                                                ],
                                                                "items": {}
                                                            },
                                                            "submitted": {
                                                                "type": "boolean"
                                                            },
                                                            "score": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "role",
                                                            "kind",
                                                            "status",
                                                            "player",
                                                            "submitted",
                                                            "score"
                                                        ]
                                                    }
                                                },
                                                "items": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status",
                                                "mode",
                                                "best_of",
                                                "invite_code",
                                                "share_url",
                                                "seed",
                                                "content_pack",
                                                "scored_by",
                                                "time_limit_ms",
                                                "locale",
                                                "region",
                                                "context_id",
                                                "series_id",
                                                "expires_at",
                                                "resolved_at",
                                                "winner_player_id",
                                                "you",
                                                "participants",
                                                "items"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/duels\/{duel}\/decline": {
            "post": {
                "operationId": "duel.decline",
                "description": "Only the invited player, before accepting.",
                "summary": "Decline a duel",
                "tags": [
                    "Duels"
                ],
                "parameters": [
                    {
                        "name": "duel",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "mode": {
                                                    "type": "string"
                                                },
                                                "best_of": {
                                                    "type": "integer"
                                                },
                                                "invite_code": {
                                                    "type": "string"
                                                },
                                                "share_url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "seed": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "content_pack": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "scored_by": {
                                                    "type": "string",
                                                    "enum": [
                                                        "server",
                                                        "client"
                                                    ]
                                                },
                                                "time_limit_ms": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "locale": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "region": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "context_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "series_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "expires_at": {
                                                    "type": "string"
                                                },
                                                "resolved_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "winner_player_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "you": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "role": {
                                                            "type": "string"
                                                        },
                                                        "status": {
                                                            "type": "string"
                                                        },
                                                        "submitted": {
                                                            "type": "boolean"
                                                        },
                                                        "score": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "role",
                                                        "status",
                                                        "submitted",
                                                        "score"
                                                    ]
                                                },
                                                "participants": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "role": {
                                                                "type": "string"
                                                            },
                                                            "kind": {
                                                                "type": "string"
                                                            },
                                                            "status": {
                                                                "type": "string"
                                                            },
                                                            "player": {
                                                                "type": [
                                                                    "array",
                                                                    "null"
                                                                ],
                                                                "items": {}
                                                            },
                                                            "submitted": {
                                                                "type": "boolean"
                                                            },
                                                            "score": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "role",
                                                            "kind",
                                                            "status",
                                                            "player",
                                                            "submitted",
                                                            "score"
                                                        ]
                                                    }
                                                },
                                                "items": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status",
                                                "mode",
                                                "best_of",
                                                "invite_code",
                                                "share_url",
                                                "seed",
                                                "content_pack",
                                                "scored_by",
                                                "time_limit_ms",
                                                "locale",
                                                "region",
                                                "context_id",
                                                "series_id",
                                                "expires_at",
                                                "resolved_at",
                                                "winner_player_id",
                                                "you",
                                                "participants",
                                                "items"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/duels\/{duel}\/submit": {
            "post": {
                "operationId": "duel.submit",
                "description": "For server-scored packs send `answers`: one per question, by `id` (or `index` in\n`items`), with the `choice` index and `time_ms`. Each correct answer is worth 100;\nanswers under 200 ms or over the question's time limit score nothing, and timings\nthat can't be real are refused (422 `timing_implausible`). For packs the game builds\nitself, send `client_score`. The challenger can submit before the opponent accepts.\nPlay right after getting the questions: answers sent after the round's time is up\n(questions \u00d7 (time limit + 5 s) + 30 s) score nothing. Submitting again returns the\nfirst result with `duplicate: true`.",
                "summary": "Submit your round",
                "tags": [
                    "Duels"
                ],
                "parameters": [
                    {
                        "name": "duel",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "requestBody": {
                    "content": {
                        "application\/json": {
                            "schema": {
                                "type": "object",
                                "properties": {
                                    "answers": {
                                        "type": [
                                            "array",
                                            "null"
                                        ],
                                        "items": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string",
                                                    "maxLength": 50
                                                },
                                                "index": {
                                                    "type": "integer",
                                                    "minimum": 0
                                                },
                                                "choice": {
                                                    "type": "integer"
                                                },
                                                "time_ms": {
                                                    "type": "integer",
                                                    "minimum": 0,
                                                    "maximum": 600000
                                                }
                                            }
                                        },
                                        "maxItems": 50
                                    },
                                    "client_score": {
                                        "type": "integer"
                                    },
                                    "score": {
                                        "type": "integer"
                                    },
                                    "duration_ms": {
                                        "type": [
                                            "integer",
                                            "null"
                                        ],
                                        "minimum": 0,
                                        "maximum": 86400000
                                    },
                                    "device_fingerprint": {
                                        "type": [
                                            "string",
                                            "null"
                                        ],
                                        "pattern": "^[a-f0-9]{64}$"
                                    }
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {}
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    },
                    "422": {
                        "$ref": "#\/components\/responses\/ValidationException"
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/duels\/{duel}\/forfeit": {
            "post": {
                "operationId": "duel.forfeit",
                "description": "An accepted duel goes to the other player. Forfeiting a pending duel just ends it\n(no winner), which is how a challenger withdraws an invite, but only before playing\nit (409 `already_submitted` after that).",
                "summary": "Forfeit a duel",
                "tags": [
                    "Duels"
                ],
                "parameters": [
                    {
                        "name": "duel",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "mode": {
                                                    "type": "string"
                                                },
                                                "best_of": {
                                                    "type": "integer"
                                                },
                                                "invite_code": {
                                                    "type": "string"
                                                },
                                                "share_url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "seed": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "content_pack": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "scored_by": {
                                                    "type": "string",
                                                    "enum": [
                                                        "server",
                                                        "client"
                                                    ]
                                                },
                                                "time_limit_ms": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "locale": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "region": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "context_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "series_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "expires_at": {
                                                    "type": "string"
                                                },
                                                "resolved_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "winner_player_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "you": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "role": {
                                                            "type": "string"
                                                        },
                                                        "status": {
                                                            "type": "string"
                                                        },
                                                        "submitted": {
                                                            "type": "boolean"
                                                        },
                                                        "score": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "role",
                                                        "status",
                                                        "submitted",
                                                        "score"
                                                    ]
                                                },
                                                "participants": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "role": {
                                                                "type": "string"
                                                            },
                                                            "kind": {
                                                                "type": "string"
                                                            },
                                                            "status": {
                                                                "type": "string"
                                                            },
                                                            "player": {
                                                                "type": [
                                                                    "array",
                                                                    "null"
                                                                ],
                                                                "items": {}
                                                            },
                                                            "submitted": {
                                                                "type": "boolean"
                                                            },
                                                            "score": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "role",
                                                            "kind",
                                                            "status",
                                                            "player",
                                                            "submitted",
                                                            "score"
                                                        ]
                                                    }
                                                },
                                                "items": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status",
                                                "mode",
                                                "best_of",
                                                "invite_code",
                                                "share_url",
                                                "seed",
                                                "content_pack",
                                                "scored_by",
                                                "time_limit_ms",
                                                "locale",
                                                "region",
                                                "context_id",
                                                "series_id",
                                                "expires_at",
                                                "resolved_at",
                                                "winner_player_id",
                                                "you",
                                                "participants",
                                                "items"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        },
        "\/duels\/{duel}\/rematch": {
            "post": {
                "operationId": "duel.rematch",
                "description": "A new duel against the same opponent in the same series (`series_id`), with you as\nthe challenger. For a ghost duel that is a live challenge to the player whose run\nit was.",
                "summary": "Rematch",
                "tags": [
                    "Duels"
                ],
                "parameters": [
                    {
                        "name": "duel",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "201": {
                        "description": "",
                        "content": {
                            "application\/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "object",
                                            "properties": {
                                                "id": {
                                                    "type": "string"
                                                },
                                                "status": {
                                                    "type": "string"
                                                },
                                                "mode": {
                                                    "type": "string"
                                                },
                                                "best_of": {
                                                    "type": "integer"
                                                },
                                                "invite_code": {
                                                    "type": "string"
                                                },
                                                "share_url": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "seed": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "content_pack": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "scored_by": {
                                                    "type": "string",
                                                    "enum": [
                                                        "server",
                                                        "client"
                                                    ]
                                                },
                                                "time_limit_ms": {
                                                    "type": [
                                                        "integer",
                                                        "null"
                                                    ]
                                                },
                                                "locale": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "region": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "context_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "series_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "expires_at": {
                                                    "type": "string"
                                                },
                                                "resolved_at": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "winner_player_id": {
                                                    "type": [
                                                        "string",
                                                        "null"
                                                    ]
                                                },
                                                "you": {
                                                    "type": [
                                                        "object",
                                                        "null"
                                                    ],
                                                    "properties": {
                                                        "role": {
                                                            "type": "string"
                                                        },
                                                        "status": {
                                                            "type": "string"
                                                        },
                                                        "submitted": {
                                                            "type": "boolean"
                                                        },
                                                        "score": {
                                                            "type": "null"
                                                        }
                                                    },
                                                    "required": [
                                                        "role",
                                                        "status",
                                                        "submitted",
                                                        "score"
                                                    ]
                                                },
                                                "participants": {
                                                    "type": "array",
                                                    "items": {
                                                        "type": "object",
                                                        "properties": {
                                                            "role": {
                                                                "type": "string"
                                                            },
                                                            "kind": {
                                                                "type": "string"
                                                            },
                                                            "status": {
                                                                "type": "string"
                                                            },
                                                            "player": {
                                                                "type": [
                                                                    "array",
                                                                    "null"
                                                                ],
                                                                "items": {}
                                                            },
                                                            "submitted": {
                                                                "type": "boolean"
                                                            },
                                                            "score": {
                                                                "type": [
                                                                    "integer",
                                                                    "null"
                                                                ]
                                                            }
                                                        },
                                                        "required": [
                                                            "role",
                                                            "kind",
                                                            "status",
                                                            "player",
                                                            "submitted",
                                                            "score"
                                                        ]
                                                    }
                                                },
                                                "items": {
                                                    "type": "array",
                                                    "items": {}
                                                }
                                            },
                                            "required": [
                                                "id",
                                                "status",
                                                "mode",
                                                "best_of",
                                                "invite_code",
                                                "share_url",
                                                "seed",
                                                "content_pack",
                                                "scored_by",
                                                "time_limit_ms",
                                                "locale",
                                                "region",
                                                "context_id",
                                                "series_id",
                                                "expires_at",
                                                "resolved_at",
                                                "winner_player_id",
                                                "you",
                                                "participants",
                                                "items"
                                            ]
                                        }
                                    },
                                    "required": [
                                        "data"
                                    ]
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "gameKey": [],
                        "playerToken": []
                    }
                ]
            }
        }
    },
    "components": {
        "securitySchemes": {
            "gameKey": {
                "type": "apiKey",
                "description": "The game's public client key (qe_pk_\u2026), from the console's API & SDKs page.",
                "in": "header",
                "name": "X-Game-Key"
            },
            "playerToken": {
                "type": "http",
                "description": "A player token from one of the \/auth endpoints.",
                "scheme": "bearer"
            },
            "serverKey": {
                "type": "apiKey",
                "description": "The game's secret server key (qe_sk_\u2026). Only for your own servers.",
                "in": "header",
                "name": "X-Server-Key"
            }
        },
        "schemas": {
            "AttemptResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "level": {
                        "type": "integer"
                    },
                    "status": {
                        "type": "string"
                    },
                    "score": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "stars": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "duration_seconds": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "energy_spent": {
                        "type": "integer"
                    },
                    "time_limit": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "started_at": {
                        "type": "string"
                    },
                    "ended_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "level",
                    "status",
                    "score",
                    "stars",
                    "duration_seconds",
                    "energy_spent",
                    "time_limit",
                    "started_at",
                    "ended_at"
                ],
                "title": "AttemptResource"
            },
            "BoosterResource": {
                "type": "object",
                "properties": {
                    "item": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "started_at": {
                        "type": "string"
                    },
                    "expires_at": {
                        "type": "string"
                    },
                    "remaining_seconds": {},
                    "properties": {
                        "type": [
                            "array",
                            "string"
                        ]
                    }
                },
                "required": [
                    "item",
                    "name",
                    "started_at",
                    "expires_at",
                    "remaining_seconds",
                    "properties"
                ],
                "title": "BoosterResource"
            },
            "CurrencyResource": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "icon_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "premium": {
                        "type": "boolean"
                    },
                    "initial_balance": {
                        "type": "integer"
                    },
                    "max_balance": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "regen": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "amount": {
                                "type": "integer"
                            },
                            "interval_seconds": {
                                "type": "integer"
                            },
                            "cap": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            }
                        },
                        "required": [
                            "amount",
                            "interval_seconds",
                            "cap"
                        ]
                    }
                },
                "required": [
                    "code",
                    "name",
                    "description",
                    "icon_url",
                    "premium",
                    "initial_balance",
                    "max_balance",
                    "regen"
                ],
                "title": "CurrencyResource"
            },
            "InboxMessageResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "title": {
                        "type": "string"
                    },
                    "body": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "sender": {
                        "type": "string"
                    },
                    "rewards": {
                        "type": "array",
                        "items": {}
                    },
                    "read": {
                        "type": "boolean"
                    },
                    "claimed": {
                        "type": "boolean"
                    },
                    "expires_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "title",
                    "body",
                    "sender",
                    "rewards",
                    "read",
                    "claimed",
                    "expires_at",
                    "created_at"
                ],
                "title": "InboxMessageResource"
            },
            "InventoryItemResource": {
                "type": "object",
                "properties": {
                    "item": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "kind": {
                        "type": "string"
                    },
                    "quantity": {
                        "type": "integer"
                    },
                    "properties": {
                        "type": [
                            "array",
                            "string"
                        ]
                    }
                },
                "required": [
                    "item",
                    "name",
                    "kind",
                    "quantity",
                    "properties"
                ],
                "title": "InventoryItemResource"
            },
            "ItemResource": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "kind": {
                        "type": "string"
                    },
                    "category": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "icon_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "max_stack": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "duration_seconds": {
                        "type": [
                            "integer",
                            "null"
                        ]
                    },
                    "unlock_level": {
                        "type": "integer"
                    },
                    "use_rewards": {
                        "type": "array",
                        "items": {}
                    },
                    "properties": {
                        "type": [
                            "array",
                            "string"
                        ]
                    }
                },
                "required": [
                    "code",
                    "name",
                    "description",
                    "kind",
                    "category",
                    "icon_url",
                    "max_stack",
                    "duration_seconds",
                    "unlock_level",
                    "use_rewards",
                    "properties"
                ],
                "title": "ItemResource"
            },
            "LeaderboardResource": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "sort": {
                        "type": "string"
                    },
                    "aggregation": {
                        "type": "string"
                    },
                    "reset_period": {
                        "type": "string"
                    },
                    "resets_at": {
                        "type": "null"
                    },
                    "client_submit": {
                        "type": "boolean"
                    },
                    "rewards": {
                        "type": "array",
                        "description": "Rank rewards paid when a period closes: ranks `from`..`to` receive `rewards`.",
                        "items": {
                            "type": "object",
                            "properties": {
                                "from": {
                                    "type": "integer"
                                },
                                "to": {
                                    "type": "integer"
                                },
                                "rewards": {
                                    "type": "array",
                                    "items": {
                                        "type": "object",
                                        "properties": {
                                            "type": {
                                                "type": "string"
                                            },
                                            "code": {
                                                "type": "string"
                                            },
                                            "quantity": {
                                                "type": "integer"
                                            }
                                        },
                                        "required": [
                                            "type",
                                            "code",
                                            "quantity"
                                        ]
                                    }
                                }
                            },
                            "required": [
                                "from",
                                "to",
                                "rewards"
                            ]
                        }
                    }
                },
                "required": [
                    "code",
                    "name",
                    "description",
                    "sort",
                    "aggregation",
                    "reset_period",
                    "resets_at",
                    "client_submit",
                    "rewards"
                ],
                "title": "LeaderboardResource"
            },
            "PlayerResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "display_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "avatar_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "friend_code": {
                        "type": "string"
                    },
                    "country": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "locale": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "platform": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "platform_ids": {
                        "type": "string"
                    },
                    "instant_player_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "progress_level": {
                        "type": "integer"
                    },
                    "status": {
                        "type": "string"
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "last_login_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "display_name",
                    "avatar_url",
                    "friend_code",
                    "country",
                    "locale",
                    "platform",
                    "platform_ids",
                    "instant_player_id",
                    "progress_level",
                    "status",
                    "created_at",
                    "last_login_at"
                ],
                "title": "PlayerResource"
            },
            "PublicPlayerResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "display_name": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "avatar_url": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "progress_level": {
                        "type": "integer"
                    }
                },
                "required": [
                    "id",
                    "display_name",
                    "avatar_url",
                    "progress_level"
                ],
                "title": "PublicPlayerResource"
            },
            "PurchaseResource": {
                "type": "object",
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "offer": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "platform": {
                        "type": "string"
                    },
                    "environment": {
                        "type": "string"
                    },
                    "product_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "transaction_id": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "status": {
                        "type": "string"
                    },
                    "price": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "properties": {
                            "currency": {
                                "type": [
                                    "string",
                                    "null"
                                ]
                            },
                            "amount": {
                                "type": "integer"
                            }
                        },
                        "required": [
                            "currency",
                            "amount"
                        ]
                    },
                    "rewards": {
                        "type": "array",
                        "items": {}
                    },
                    "created_at": {
                        "type": [
                            "string",
                            "null"
                        ]
                    }
                },
                "required": [
                    "id",
                    "offer",
                    "platform",
                    "environment",
                    "product_id",
                    "transaction_id",
                    "status",
                    "price",
                    "rewards",
                    "created_at"
                ],
                "title": "PurchaseResource"
            },
            "WalletResource": {
                "type": "object",
                "properties": {
                    "currency": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "balance": {
                        "type": "integer"
                    },
                    "premium": {
                        "type": "boolean"
                    },
                    "regen": {
                        "type": [
                            "object",
                            "null"
                        ],
                        "description": "Refill state for currencies that refill over time (lives, energy), else null.\nnext_in: seconds to the next refill (null when full); full_in: seconds until full.",
                        "properties": {
                            "cap": {
                                "type": "integer"
                            },
                            "next_in": {
                                "type": [
                                    "integer",
                                    "null"
                                ]
                            },
                            "full_in": {
                                "type": "integer"
                            }
                        },
                        "required": [
                            "cap",
                            "next_in",
                            "full_in"
                        ]
                    }
                },
                "required": [
                    "currency",
                    "name",
                    "balance",
                    "premium",
                    "regen"
                ],
                "title": "WalletResource"
            }
        },
        "responses": {
            "ValidationException": {
                "description": "Validation error",
                "content": {
                    "application\/json": {
                        "schema": {
                            "type": "object",
                            "properties": {
                                "message": {
                                    "type": "string",
                                    "description": "Errors overview."
                                },
                                "errors": {
                                    "type": "object",
                                    "description": "A detailed description of each field that failed validation.",
                                    "additionalProperties": {
                                        "type": "array",
                                        "items": {
                                            "type": "string"
                                        }
                                    }
                                }
                            },
                            "required": [
                                "message",
                                "errors"
                            ]
                        }
                    }
                }
            }
        }
    }
}