{
  "opencollection": "1.0.0",
  "info": {
    "name": "Lichess.org API reference",
    "version": "2.0.144"
  },
  "items": [
    {
      "info": {
        "name": "Users",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get real-time users status",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/users/status",
            "params": [
              {
                "name": "ids",
                "value": "thibault,maia1,maia5",
                "type": "query",
                "description": "User IDs separated by commas. Up to 100 IDs."
              },
              {
                "name": "withSignal",
                "value": "true",
                "type": "query",
                "description": "Also return the network signal of the player, when available.\nIt ranges from 1 (poor connection, lag > 500ms) to 4 (great connection, lag < 150ms)\nDefaults to `false` to preserve server resources.\n"
              },
              {
                "name": "withGameIds",
                "value": "true",
                "type": "query",
                "description": "Also return the ID of the game being played, if any, for each player, in a `playingId` field.\nDefaults to `false` to preserve server resources.\n"
              },
              {
                "name": "withGameMetas",
                "value": "true",
                "type": "query",
                "description": "Also return the id, time control and variant of the game being played, if any, for each player, in a `playing` field.\nDefaults to `false` to preserve server resources. Disables `withGameIds`.\n"
              }
            ]
          },
          "docs": "Read the `online`, `playing` and `streaming` flags of several users.\nThis API is very fast and cheap on lichess side.\nSo you can call it quite often (like once every 5 seconds).\nUse it to track players and know when they're connected on lichess and playing games.\n"
        },
        {
          "info": {
            "name": "Get all top 10",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/player"
          },
          "docs": "Get the top 10 players for each speed and variant.\nSee <https://lichess.org/player>.\n"
        },
        {
          "info": {
            "name": "Get one leaderboard",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/player/top/:nb/:perfType",
            "params": [
              {
                "name": "nb",
                "value": "",
                "type": "path",
                "description": "How many users to fetch"
              },
              {
                "name": "perfType",
                "value": "",
                "type": "path",
                "description": "The speed or variant"
              }
            ]
          },
          "docs": "Get the leaderboard for a single speed or variant (a.k.a. `perfType`).\nThere is no leaderboard for correspondence or puzzles.\nSee <https://lichess.org/player/top/100/bullet>.\n"
        },
        {
          "info": {
            "name": "Get user public data",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/user/:username",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path"
              },
              {
                "name": "trophies",
                "value": "",
                "type": "query",
                "description": "Include user trophies"
              },
              {
                "name": "profile",
                "value": "",
                "type": "query",
                "description": "Include user profile data"
              },
              {
                "name": "rank",
                "value": "",
                "type": "query",
                "description": "Include global lichess ranking for each perf"
              },
              {
                "name": "fideId",
                "value": "",
                "type": "query",
                "description": "Include public FIDE ID if any"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Read public data of a user.\n"
        },
        {
          "info": {
            "name": "Get rating history of a user",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/user/:username/rating-history",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Read rating history of a user, for all perf types.\nThere is at most one entry per day.\nFormat of an entry is `[year, month, day, rating]`.\n`month` starts at zero (January).\n"
        },
        {
          "info": {
            "name": "Get performance statistics of a user",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/user/:username/perf/:perf",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path"
              },
              {
                "name": "perf",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Read performance statistics of a user, for a single performance.\nSimilar to the [performance pages on the website](https://lichess.org/@/thibault/perf/bullet).\n"
        },
        {
          "info": {
            "name": "Get user activity",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/user/:username/activity",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Read data to generate the activity feed of a user.\n"
        },
        {
          "info": {
            "name": "Get users by ID",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/users",
            "params": [
              {
                "name": "profile",
                "value": "",
                "type": "query",
                "description": "Include user profile data"
              },
              {
                "name": "rank",
                "value": "",
                "type": "query",
                "description": "Include global lichess ranking for each perf"
              }
            ]
          },
          "docs": "Get up to 300 users by their IDs. Users are returned in the same order as the IDs.\nThe method is `POST` to allow a longer list of IDs to be sent in the request body.\nPlease do not try to download all the Lichess users with this endpoint, or any other endpoint.\nAn API is not a way to fully export a website. We do not provide a full download of the Lichess users.\nThis endpoint is limited to 8,000 users every 10 minutes, and 120,000 every day.\n"
        },
        {
          "info": {
            "name": "Get live streamers",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/streamer/live"
          },
          "docs": "Get basic info about currently streaming users.\nThis API is very fast and cheap on lichess side.\nSo you can call it quite often (like once every 5 seconds).\n"
        },
        {
          "info": {
            "name": "Get crosstable",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/crosstable/:user1/:user2",
            "params": [
              {
                "name": "user1",
                "value": "",
                "type": "path"
              },
              {
                "name": "user2",
                "value": "",
                "type": "path"
              },
              {
                "name": "matchup",
                "value": "",
                "type": "query",
                "description": "Whether to get the current match data, if any"
              }
            ]
          },
          "docs": "Get total number of games, and current score, of any two users.\nIf the `matchup` flag is provided, and the users are currently playing, also gets the current match game number and scores.\n"
        },
        {
          "info": {
            "name": "Autocomplete usernames",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/player/autocomplete",
            "params": [
              {
                "name": "term",
                "value": "",
                "type": "query",
                "description": "The beginning of a username"
              },
              {
                "name": "exists",
                "value": "",
                "type": "query",
                "description": "If `true`, only checks if the user exists.\n"
              },
              {
                "name": "object",
                "value": "",
                "type": "query",
                "description": "- `false` returns an array of usernames\n- `true` returns an object with matching users\n"
              },
              {
                "name": "names",
                "value": "",
                "type": "query",
                "description": "- `false` returns an array of usernames\n- `true` returns an array of usernames with preferred casing\n"
              },
              {
                "name": "friend",
                "value": "",
                "type": "query",
                "description": "Returns followed players matching `term` if any, else returns other players.\nRequires [OAuth](#tag/OAuth).\n"
              },
              {
                "name": "team",
                "value": "",
                "type": "query",
                "description": "Search within a team.\nUse team ID/slug.\n"
              },
              {
                "name": "tour",
                "value": "",
                "type": "query",
                "description": "Search within a arena tournament.\nUse tournament ID.\n"
              },
              {
                "name": "swiss",
                "value": "",
                "type": "query",
                "description": "Search within a Swiss tournament.\n"
              },
              {
                "name": "teacher",
                "value": "",
                "type": "query",
                "description": "Only search for players who also have a teacher role.\n"
              }
            ]
          },
          "docs": "Provides autocompletion options for an incomplete username.\n"
        },
        {
          "info": {
            "name": "Get notes for a user",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/user/:username/note",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Get the private notes that you have added for a user.\n"
        },
        {
          "info": {
            "name": "Add a note for a user",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/user/:username/note",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "text",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Add a private note available only to you about this account.\n"
        }
      ]
    },
    {
      "info": {
        "name": "Puzzles",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get the daily puzzle",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/puzzle/daily"
          },
          "docs": "Get the daily Lichess puzzle in JSON format.\n"
        },
        {
          "info": {
            "name": "Get a puzzle by its ID",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/puzzle/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The puzzle ID"
              }
            ]
          },
          "docs": "Get a single Lichess puzzle in JSON format."
        },
        {
          "info": {
            "name": "Get a new puzzle",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/puzzle/next",
            "params": [
              {
                "name": "angle",
                "value": "",
                "type": "query",
                "description": "The theme or opening to filter puzzles with.\n\nAvailable themes are listed in [the lichess source code](https://github.com/ornicar/lila/blob/master/translation/source/puzzleTheme.xml) and [the lichess training themes hyperlinks](https://lichess.org/training/themes).\n"
              },
              {
                "name": "difficulty",
                "value": "",
                "type": "query",
                "description": "The desired puzzle difficulty, relative to the authenticated user puzzle rating, or 1500 if anonymous."
              },
              {
                "name": "color",
                "value": "",
                "type": "query",
                "description": "The color to play. Better left empty to automatically get 50% white."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Get a random Lichess puzzle in JSON format.\n\nIf authenticated, only returns puzzles that the user has never seen before.\n\n**DO NOT** use this endpoint to enumerate puzzles for mass download. Instead, download the [full public puzzle database](https://database.lichess.org/#puzzles).\n"
        },
        {
          "info": {
            "name": "Get multiple puzzles at once",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/puzzle/batch/:angle",
            "params": [
              {
                "name": "angle",
                "value": "",
                "type": "path",
                "description": "The theme or opening to filter puzzles with. Recommended: `mix`.\n\nAvailable themes are listed in [the lichess source code](https://github.com/ornicar/lila/blob/master/translation/source/puzzleTheme.xml) and [the lichess training themes hyperlinks](https://lichess.org/training/themes).\n"
              },
              {
                "name": "difficulty",
                "value": "",
                "type": "query",
                "description": "The desired puzzle difficulty, relative to the authenticated user puzzle rating, or 1500 if anonymous."
              },
              {
                "name": "nb",
                "value": "",
                "type": "query",
                "description": "How many puzzles to fetch. Just set it to `1` if you only need one puzzle.\n"
              },
              {
                "name": "color",
                "value": "",
                "type": "query",
                "description": "The color to play. Better left empty to automatically get 50% white.\nCurrently only works when `nb=1`.\n"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Get a batch of random Lichess puzzles in JSON format.\n\nIf authenticated, only returns puzzles that the user has never seen before.\n\n**DO NOT** use this endpoint to enumerate puzzles for mass download. Instead, download the [full public puzzle database](https://database.lichess.org/#puzzles).\n"
        },
        {
          "info": {
            "name": "Solve multiple puzzles at once",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/puzzle/batch/:angle",
            "params": [
              {
                "name": "angle",
                "value": "",
                "type": "path",
                "description": "The theme or opening of the solved puzzles.\n\nAvailable themes are listed in [the lichess source code](https://github.com/ornicar/lila/blob/master/translation/source/puzzleTheme.xml) and [the lichess training themes hyperlinks](https://lichess.org/training/themes).\n"
              },
              {
                "name": "nb",
                "value": "",
                "type": "query",
                "description": "When > 0, the response includes a new puzzle batch with that many puzzles.\n\nThis is equivalent to calling [/api/puzzle/batch/{angle}](#tag/puzzles/GET/api/puzzle/batch/{angle}),\nand can sometimes save a request.\n"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Set puzzles as solved and update ratings.\n"
        },
        {
          "info": {
            "name": "Get your puzzle activity",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/puzzle/activity",
            "params": [
              {
                "name": "max",
                "value": "",
                "type": "query",
                "description": "How many entries to download. Leave empty to download all activity."
              },
              {
                "name": "before",
                "value": "",
                "type": "query",
                "description": "Download entries before this timestamp. Defaults to now. Use `before` and `max` for pagination."
              },
              {
                "name": "since",
                "value": "",
                "type": "query",
                "description": "Download entries since this timestamp. Defaults to account creation date."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Download your puzzle activity in [ndjson](#description/streaming-with-nd-json) format.\nPuzzle activity is sorted by reverse chronological order (most recent first)\nWe recommend streaming the response, for it can be very long.\n"
        },
        {
          "info": {
            "name": "Get puzzles to replay",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/puzzle/replay/:days/:theme",
            "params": [
              {
                "name": "days",
                "value": "",
                "type": "path",
                "description": "How many days to look back when aggregating puzzle results. 30 is sensible."
              },
              {
                "name": "theme",
                "value": "",
                "type": "path",
                "description": "The theme or opening to filter puzzles with."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Gets the puzzle IDs of remaining puzzles to re-attempt in JSON format."
        },
        {
          "info": {
            "name": "Get your puzzle dashboard",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/puzzle/dashboard/:days",
            "params": [
              {
                "name": "days",
                "value": "",
                "type": "path",
                "description": "How many days to look back when aggregating puzzle results. 30 is sensible."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Download your [puzzle dashboard](https://lichess.org/training/dashboard/30/dashboard) as JSON.\nAlso includes all puzzle themes played, with aggregated results.\nAllows re-creating the [improvement/strengths](https://lichess.org/training/dashboard/30/improvementAreas) interfaces.\n"
        },
        {
          "info": {
            "name": "Get the storm dashboard of a player",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/storm/dashboard/:username",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path",
                "description": "Username of the player"
              },
              {
                "name": "days",
                "value": "",
                "type": "query",
                "description": "How many days of history to return"
              }
            ]
          },
          "docs": "Download the [storm dashboard](https://lichess.org/storm/dashboard/mrbasso) of any player as JSON.\nContains the aggregated highscores, and the history of storm runs aggregated by days.\nUse `?days=0` if you only care about the highscores.\n"
        },
        {
          "info": {
            "name": "Create and join a puzzle race",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/racer",
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Create a new private [puzzle race](https://lichess.org/racer).\nThe Lichess user who creates the race must join the race page,\nand manually start the race when enough players have joined.\n- <https://lichess.org/racer>\n"
        },
        {
          "info": {
            "name": "Get puzzle race results",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/racer/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The puzzle race ID"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Get the results of a [puzzle race](https://lichess.org/racer).\nReturns information about players, puzzles, and the current status of the race.\n- <https://lichess.org/racer>\n\nNote that Lichess puzzle races are not persisted, and are only available\nfor 30 minutes. After that delay, they are permanently deleted.\n"
        }
      ]
    },
    {
      "info": {
        "name": "Account",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get my profile",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/account",
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Public information about the logged in user.\n"
        },
        {
          "info": {
            "name": "Get my email address",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/account/email",
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Read the email address of the logged in user.\n"
        },
        {
          "info": {
            "name": "Get my preferences",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/account/preferences",
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Read the preferences of the logged in user.\n- <https://lichess.org/account/preferences/game-display>\n- <https://github.com/ornicar/lila/blob/master/modules/pref/src/main/Pref.scala>\n"
        },
        {
          "info": {
            "name": "Get my kid mode status",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/account/kid",
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Read the kid mode status of the logged in user.\n- <https://lichess.org/account/kid>\n"
        },
        {
          "info": {
            "name": "Set my kid mode status",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/account/kid",
            "params": [
              {
                "name": "v",
                "value": "true",
                "type": "query",
                "description": "Kid mode status"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Set the kid mode status of the logged in user.\n- <https://lichess.org/account/kid>\n"
        },
        {
          "info": {
            "name": "Get my timeline",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/timeline",
            "params": [
              {
                "name": "since",
                "value": "",
                "type": "query",
                "description": "Show events since this timestamp."
              },
              {
                "name": "nb",
                "value": "",
                "type": "query",
                "description": "Max number of events to fetch."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Get the timeline events of the logged in user.\n"
        }
      ]
    },
    {
      "info": {
        "name": "Games",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Export one game",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/game/export/:gameId",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path",
                "description": "The game ID"
              },
              {
                "name": "moves",
                "value": "",
                "type": "query",
                "description": "Include the PGN moves."
              },
              {
                "name": "pgnInJson",
                "value": "",
                "type": "query",
                "description": "Include the full PGN within the JSON response, in a `pgn` field."
              },
              {
                "name": "tags",
                "value": "",
                "type": "query",
                "description": "Include the PGN tags."
              },
              {
                "name": "clocks",
                "value": "",
                "type": "query",
                "description": "Include clock status when available.\nEither as PGN comments: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`\nOr in a `clocks` JSON field, as centisecond integers, depending on the response type.\n"
              },
              {
                "name": "evals",
                "value": "",
                "type": "query",
                "description": "Include analysis evaluations and comments, when available.\nEither as PGN comments: `12. Bxf6 { [%eval 0.23] } a3 { [%eval -1.09] }`\nOr in an `analysis` JSON field, depending on the response type.\n"
              },
              {
                "name": "accuracy",
                "value": "",
                "type": "query",
                "description": "Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available. Only available in JSON.\n"
              },
              {
                "name": "opening",
                "value": "",
                "type": "query",
                "description": "Include the opening name.\nExample: `[Opening \"King's Gambit Accepted, King's Knight Gambit\"]`\n"
              },
              {
                "name": "division",
                "value": "",
                "type": "query",
                "description": "Plies which mark the beginning of the middlegame and endgame.\nOnly available in JSON\n"
              },
              {
                "name": "literate",
                "value": "",
                "type": "query",
                "description": "Insert textual annotations in the PGN about the opening, analysis variations, mistakes, and game termination.\nExample: `5... g4? { (-0.98 → 0.60) Mistake. Best move was h6. } (5... h6 6. d4 Ne7 7. g3 d5 8. exd5 fxg3 9. hxg3 c6 10. dxc6)`\n"
              },
              {
                "name": "withBookmarked",
                "value": "",
                "type": "query",
                "description": "Add a `bookmarked: true` JSON field when the logged in user has bookmarked the game.\nThe response type must be set to `application/x-ndjson` by the request `Accept` header.\n"
              }
            ]
          },
          "docs": "Download one game in either PGN or JSON format.\nOngoing games are delayed by 3 moves, as to prevent cheat bots from using this API.\n"
        },
        {
          "info": {
            "name": "Fetch the spectator game chat",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/game/:gameId/chat",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Get the messages posted in the public spectator chat of a game.\n\nGames also have a private players chat, which only the 2 players can see.\n"
        },
        {
          "info": {
            "name": "Export ongoing game of a user",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/user/:username/current-game",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path"
              },
              {
                "name": "moves",
                "value": "",
                "type": "query",
                "description": "Include the PGN moves."
              },
              {
                "name": "pgnInJson",
                "value": "",
                "type": "query",
                "description": "Include the full PGN within the JSON response, in a `pgn` field."
              },
              {
                "name": "tags",
                "value": "",
                "type": "query",
                "description": "Include the PGN tags."
              },
              {
                "name": "clocks",
                "value": "",
                "type": "query",
                "description": "Include clock status when available.\nEither as PGN comments: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`\nOr in a `clocks` JSON field, as centisecond integers, depending on the response type.\n"
              },
              {
                "name": "evals",
                "value": "",
                "type": "query",
                "description": "Include analysis evaluations and comments, when available.\nEither as PGN comments: `12. Bxf6 { [%eval 0.23] } a3 { [%eval -1.09] }`\nOr in an `analysis` JSON field, depending on the response type.\n"
              },
              {
                "name": "accuracy",
                "value": "",
                "type": "query",
                "description": "Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available. Only available in JSON.\n"
              },
              {
                "name": "opening",
                "value": "",
                "type": "query",
                "description": "Include the opening name.\nExample: `[Opening \"King's Gambit Accepted, King's Knight Gambit\"]`\n"
              },
              {
                "name": "division",
                "value": "",
                "type": "query",
                "description": "Plies which mark the beginning of the middlegame and endgame.\nOnly available in JSON\n"
              },
              {
                "name": "literate",
                "value": "",
                "type": "query",
                "description": "Insert textual annotations in the PGN about the opening, analysis variations, mistakes, and game termination.\nExample: `5... g4? { (-0.98 → 0.60) Mistake. Best move was h6. } (5... h6 6. d4 Ne7 7. g3 d5 8. exd5 fxg3 9. hxg3 c6 10. dxc6)`\n"
              }
            ]
          },
          "docs": "Download the ongoing game, or the last game played, of a user.\nAvailable in either PGN or JSON format.\nOngoing games are delayed by 3 moves, as to prevent cheat bots from using this API.\n"
        },
        {
          "info": {
            "name": "Export games of a user",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/games/user/:username",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path",
                "description": "The user name."
              },
              {
                "name": "since",
                "value": "",
                "type": "query",
                "description": "Download games played since this timestamp. Defaults to account creation date."
              },
              {
                "name": "until",
                "value": "",
                "type": "query",
                "description": "Download games played until this timestamp. Defaults to now."
              },
              {
                "name": "max",
                "value": "",
                "type": "query",
                "description": "How many games to download. Leave empty to download all games."
              },
              {
                "name": "vs",
                "value": "",
                "type": "query",
                "description": "[Filter] Only games played against this opponent"
              },
              {
                "name": "rated",
                "value": "",
                "type": "query",
                "description": "[Filter] Only rated (`true`) or casual (`false`) games"
              },
              {
                "name": "perfType",
                "value": "",
                "type": "query",
                "description": "[Filter] Only games in these speeds or variants.\nMultiple perf types can be specified, separated by a comma.\nExample: blitz,rapid,classical\n"
              },
              {
                "name": "color",
                "value": "",
                "type": "query",
                "description": "[Filter] Only games played as this color."
              },
              {
                "name": "analysed",
                "value": "",
                "type": "query",
                "description": "[Filter] Only games with or without a computer analysis available"
              },
              {
                "name": "moves",
                "value": "",
                "type": "query",
                "description": "Include the PGN moves."
              },
              {
                "name": "pgnInJson",
                "value": "",
                "type": "query",
                "description": "Include the full PGN within the JSON response, in a `pgn` field. The response type must be set to `application/x-ndjson` by the request `Accept` header."
              },
              {
                "name": "tags",
                "value": "",
                "type": "query",
                "description": "Include the PGN tags."
              },
              {
                "name": "clocks",
                "value": "",
                "type": "query",
                "description": "Include clock status when available.\nEither as PGN comments: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`\nOr in a `clocks` JSON field, as centisecond integers, depending on the response type.\n"
              },
              {
                "name": "evals",
                "value": "",
                "type": "query",
                "description": "Include analysis evaluations and comments, when available.\nEither as PGN comments: `12. Bxf6 { [%eval 0.23] } a3 { [%eval -1.09] }`\nOr in an `analysis` JSON field, depending on the response type.\n"
              },
              {
                "name": "accuracy",
                "value": "",
                "type": "query",
                "description": "Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available. Only available in JSON.\n"
              },
              {
                "name": "opening",
                "value": "",
                "type": "query",
                "description": "Include the opening name.\nExample: `[Opening \"King's Gambit Accepted, King's Knight Gambit\"]`\n"
              },
              {
                "name": "division",
                "value": "",
                "type": "query",
                "description": "Plies which mark the beginning of the middlegame and endgame.\nOnly available in JSON\n"
              },
              {
                "name": "ongoing",
                "value": "",
                "type": "query",
                "description": "Ongoing games are delayed by a few seconds ranging from 3 to 60 depending on the time control, as to prevent cheat bots from using this API."
              },
              {
                "name": "finished",
                "value": "",
                "type": "query",
                "description": "Include finished games. Set to `false` to only get ongoing games."
              },
              {
                "name": "literate",
                "value": "",
                "type": "query",
                "description": "Insert textual annotations in the PGN about the opening, analysis variations, mistakes, and game termination.\nExample: `5... g4? { (-0.98 → 0.60) Mistake. Best move was h6. } (5... h6 6. d4 Ne7 7. g3 d5 8. exd5 fxg3 9. hxg3 c6 10. dxc6)`\n"
              },
              {
                "name": "lastFen",
                "value": "",
                "type": "query",
                "description": "Include the X-FEN notation of the last position of the game.\nThe response type must be set to `application/x-ndjson` by the request `Accept` header.\n"
              },
              {
                "name": "withBookmarked",
                "value": "",
                "type": "query",
                "description": "Add a `bookmarked: true` JSON field when the logged in user has bookmarked the game.\nThe response type must be set to `application/x-ndjson` by the request `Accept` header.\n"
              },
              {
                "name": "sort",
                "value": "",
                "type": "query",
                "description": "Sort order of the games."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Download all games of any user in PGN or [ndjson](#description/streaming-with-nd-json) format.\nGames are sorted by reverse chronological order (most recent first).\nWe recommend streaming the response, for it can be very long.\n<https://lichess.org/@/german11> for instance has more than 500,000 games.\nThe game stream is throttled, depending on who is making the request:\n  - Anonymous request: 20 games per second\n  - [OAuth2 authenticated](#description/authentication) request: 30 games per second\n "
        },
        {
          "info": {
            "name": "Export games by IDs",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/games/export/_ids",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "moves",
                "value": "",
                "type": "query",
                "description": "Include the PGN moves."
              },
              {
                "name": "pgnInJson",
                "value": "",
                "type": "query",
                "description": "Include the full PGN within the JSON response, in a `pgn` field."
              },
              {
                "name": "tags",
                "value": "",
                "type": "query",
                "description": "Include the PGN tags."
              },
              {
                "name": "clocks",
                "value": "",
                "type": "query",
                "description": "Include clock status when available.\nEither as PGN comments: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`\nOr in a `clocks` JSON field, as centisecond integers, depending on the response type.\n"
              },
              {
                "name": "evals",
                "value": "",
                "type": "query",
                "description": "Include analysis evaluations and comments, when available.\nEither as PGN comments: `12. Bxf6 { [%eval 0.23] } a3 { [%eval -1.09] }`\nOr in an `analysis` JSON field, depending on the response type.\n"
              },
              {
                "name": "accuracy",
                "value": "",
                "type": "query",
                "description": "Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available. Only available in JSON.\n"
              },
              {
                "name": "opening",
                "value": "",
                "type": "query",
                "description": "Include the opening name.\nExample: `[Opening \"King's Gambit Accepted, King's Knight Gambit\"]`\n"
              },
              {
                "name": "division",
                "value": "",
                "type": "query",
                "description": "Plies which mark the beginning of the middlegame and endgame.\nOnly available in JSON\n"
              },
              {
                "name": "literate",
                "value": "",
                "type": "query",
                "description": "Insert textual annotations in the PGN about the opening, analysis variations, mistakes, and game termination.\nExample: `5... g4? { (-0.98 → 0.60) Mistake. Best move was h6. } (5... h6 6. d4 Ne7 7. g3 d5 8. exd5 fxg3 9. hxg3 c6 10. dxc6)`\n"
              }
            ]
          },
          "docs": "Download games by IDs in PGN or [ndjson](#description/streaming-with-nd-json) format, depending on the request `Accept` header.\nGames are sorted by reverse chronological order (most recent first)\nThe method is `POST` so a longer list of IDs can be sent in the request body.\n300 IDs can be submitted.\nOngoing games are delayed by 3 moves, as to prevent cheat bots from using this API.\n"
        },
        {
          "info": {
            "name": "Stream games of users",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/stream/games-by-users",
            "params": [
              {
                "name": "withCurrentGames",
                "value": "",
                "type": "query",
                "description": "Include the already started games at the beginning of the stream."
              }
            ]
          },
          "docs": "Stream the games played between a list of users, in real time.\nOnly games where **both players** are part of the list are included.\nThe stream emits an event each time a game is started or finished.\nTo also get all current ongoing games at the beginning of the stream, use the `withCurrentGames` flag.\nGames are streamed as [ndjson](#description/streaming-with-nd-json).\nMaximum number of users: 300.\nThe method is `POST` so a longer list of IDs can be sent in the request body.\n"
        },
        {
          "info": {
            "name": "Stream games by IDs",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/stream/games/:streamId",
            "params": [
              {
                "name": "streamId",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Creates a stream of games from an arbitrary streamId, and a list of game IDs.\nThe stream first outputs the games that already exists, then emits an event each time a game is started or finished.\nGames are streamed as [ndjson](#description/streaming-with-nd-json).\nMaximum number of games: 500 for anonymous requests, or 1000 for [OAuth2 authenticated](#description/authentication) requests.\nWhile the stream is open, it is possible to [add new game IDs to watch](#tag/games/POST/api/stream/games/{str"
        },
        {
          "info": {
            "name": "Add game IDs to stream",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/stream/games/:streamId/add",
            "params": [
              {
                "name": "streamId",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Add new game IDs for [an existing stream](#tag/games/POST/api/stream/games/{streamId}) to watch.\nThe stream will immediately outputs the games that already exists, then emit an event each time a game is started or finished.\n"
        },
        {
          "info": {
            "name": "Get my ongoing games",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/account/playing",
            "params": [
              {
                "name": "nb",
                "value": "",
                "type": "query",
                "description": "Max number of games to fetch"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Get the ongoing games of the current user.\nReal-time and correspondence games are included.\nThe most urgent games are listed first.\n"
        },
        {
          "info": {
            "name": "Stream moves of a game",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/stream/game/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Stream positions and moves of any ongoing game, in [ndjson](#description/streaming-with-nd-json).\nA description of the game is sent as a first message.\nThen a message is sent each time a move is played.\nFinally, a description of the game is sent when it finishes, and the stream is closed.\nOngoing games are delayed by 3 moves, as to prevent cheat bots from using this API.\nNo more than 8 game streams can be opened at the same time from the same IP address.\n"
        },
        {
          "info": {
            "name": "Import one game",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/import",
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "pgn",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Import a game from PGN. See <https://lichess.org/paste>.\nRate limiting: 200 games per hour for OAuth requests, 100 games per hour for anonymous requests.\nTo broadcast ongoing games, consider [pushing to a broadcast instead](#tag/broadcasts/POST/api/broadcast/round/{broadcastRoundId}/push).\nTo analyse a position or a line, just construct an analysis board URL (most standard tags supported if URL-encoded):\n[https://lichess.org/analysis/pgn/e4_e5_Nf3_Nc6_Bc4_Bc5_Bxf7+](https://lichess.org/analysis/"
        },
        {
          "info": {
            "name": "Export your imported games",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/games/export/imports",
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Download all games imported by you. Games are exported in PGN format."
        },
        {
          "info": {
            "name": "Export your bookmarked games",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/games/export/bookmarks",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "since",
                "value": "",
                "type": "query",
                "description": "Download games bookmarked since this timestamp. Defaults to account creation date."
              },
              {
                "name": "until",
                "value": "",
                "type": "query",
                "description": "Download games bookmarked until this timestamp. Defaults to now."
              },
              {
                "name": "max",
                "value": "",
                "type": "query",
                "description": "How many bookmarked games to download. Leave empty to download all bookmarked games."
              },
              {
                "name": "moves",
                "value": "",
                "type": "query",
                "description": "Include the PGN moves."
              },
              {
                "name": "pgnInJson",
                "value": "",
                "type": "query",
                "description": "Include the full PGN within the JSON response, in a `pgn` field. The response type must be set to `application/x-ndjson` by the request `Accept` header."
              },
              {
                "name": "tags",
                "value": "",
                "type": "query",
                "description": "Include the PGN tags."
              },
              {
                "name": "clocks",
                "value": "",
                "type": "query",
                "description": "Include clock status when available.\nEither as PGN comments: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`\nOr in a `clocks` JSON field, as centisecond integers, depending on the response type.\n"
              },
              {
                "name": "evals",
                "value": "",
                "type": "query",
                "description": "Include analysis evaluations and comments, when available.\nEither as PGN comments: `12. Bxf6 { [%eval 0.23] } a3 { [%eval -1.09] }`\nOr in an `analysis` JSON field, depending on the response type.\n"
              },
              {
                "name": "accuracy",
                "value": "",
                "type": "query",
                "description": "Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available. Only available in JSON.\n"
              },
              {
                "name": "opening",
                "value": "",
                "type": "query",
                "description": "Include the opening name.\nExample: `[Opening \"King's Gambit Accepted, King's Knight Gambit\"]`\n"
              },
              {
                "name": "division",
                "value": "",
                "type": "query",
                "description": "Plies which mark the beginning of the middlegame and endgame.\nOnly available in JSON\n"
              },
              {
                "name": "literate",
                "value": "",
                "type": "query",
                "description": "Insert textual annotations in the PGN about the opening, analysis variations, mistakes, and game termination.\nExample: `5... g4? { (-0.98 → 0.60) Mistake. Best move was h6. } (5... h6 6. d4 Ne7 7. g3 d5 8. exd5 fxg3 9. hxg3 c6 10. dxc6)`\n"
              },
              {
                "name": "lastFen",
                "value": "",
                "type": "query",
                "description": "Include the X-FEN notation of the last position of the game.\nThe response type must be set to `application/x-ndjson` by the request `Accept` header.\n"
              },
              {
                "name": "sort",
                "value": "",
                "type": "query",
                "description": "Sort order of the bookmarks."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Download all games bookmarked by you, in PGN or [ndjson](#description/streaming-with-nd-json) format.\nGames are sorted by reverse chronological order (most recent first).\nWe recommend streaming the response, for it can be very long.\n"
        }
      ]
    },
    {
      "info": {
        "name": "TV",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get current TV games",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/tv/channels"
          },
          "docs": "Get basic info about the best games being played for each speed and variant,\nbut also computer games and bot games.\nSee [lichess.org/tv](https://lichess.org/tv).\n"
        },
        {
          "info": {
            "name": "Stream current TV game",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/tv/feed"
          },
          "docs": "Stream positions and moves of the current [TV game](https://lichess.org/tv) in [ndjson](#description/streaming-with-nd-json).\nTry it with `curl https://lichess.org/api/tv/feed`.\n"
        },
        {
          "info": {
            "name": "Stream current TV game of a TV channel",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/tv/:channel/feed",
            "params": [
              {
                "name": "channel",
                "value": "",
                "type": "path",
                "description": "The name of the channel in camel case."
              }
            ]
          },
          "docs": "Stream positions and moves of a current [TV channel's game](https://lichess.org/tv/rapid) in [ndjson](#description/streaming-with-nd-json).\nTry it with `curl https://lichess.org/api/tv/rapid/feed`.\n"
        },
        {
          "info": {
            "name": "Get best ongoing games of a TV channel",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/tv/:channel",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "channel",
                "value": "",
                "type": "path",
                "description": "The name of the channel in camel case."
              },
              {
                "name": "nb",
                "value": "",
                "type": "query",
                "description": "Number of games to fetch."
              },
              {
                "name": "moves",
                "value": "",
                "type": "query",
                "description": "Include the PGN moves."
              },
              {
                "name": "pgnInJson",
                "value": "",
                "type": "query",
                "description": "Include the full PGN within the JSON response, in a `pgn` field."
              },
              {
                "name": "tags",
                "value": "",
                "type": "query",
                "description": "Include the PGN tags."
              },
              {
                "name": "clocks",
                "value": "",
                "type": "query",
                "description": "Include clock status when available.\nEither as PGN comments: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`\nOr in a `clocks` JSON field, as centisecond integers, depending on the response type.\n"
              },
              {
                "name": "opening",
                "value": "",
                "type": "query",
                "description": "Include the opening name.\nExample: `[Opening \"King's Gambit Accepted, King's Knight Gambit\"]`\n"
              }
            ]
          },
          "docs": "Get a list of ongoing games for a given TV channel. Similar to [lichess.org/games](https://lichess.org/games).\nAvailable in PGN or [ndjson](#description/streaming-with-nd-json) format, depending on the request `Accept` header.\n"
        }
      ]
    },
    {
      "info": {
        "name": "Tournaments (Arena)",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get current tournaments",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/tournament"
          },
          "docs": "Get recently active and finished tournaments.\nThis API is used to display the [Lichess tournament schedule](https://lichess.org/tournament).\n"
        },
        {
          "info": {
            "name": "Create a new Arena tournament",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/tournament",
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "name",
                  "value": ""
                },
                {
                  "name": "clockTime",
                  "value": ""
                },
                {
                  "name": "clockIncrement",
                  "value": ""
                },
                {
                  "name": "minutes",
                  "value": ""
                },
                {
                  "name": "waitMinutes",
                  "value": ""
                },
                {
                  "name": "startDate",
                  "value": ""
                },
                {
                  "name": "variant",
                  "value": ""
                },
                {
                  "name": "rated",
                  "value": ""
                },
                {
                  "name": "position",
                  "value": ""
                },
                {
                  "name": "berserkable",
                  "value": ""
                },
                {
                  "name": "streakable",
                  "value": ""
                },
                {
                  "name": "hasChat",
                  "value": ""
                },
                {
                  "name": "description",
                  "value": ""
                },
                {
                  "name": "password",
                  "value": ""
                },
                {
                  "name": "teamBattleByTeam",
                  "value": ""
                },
                {
                  "name": "conditions.teamMember.teamId",
                  "value": ""
                },
                {
                  "name": "conditions.minRating.rating",
                  "value": ""
                },
                {
                  "name": "conditions.maxRating.rating",
                  "value": ""
                },
                {
                  "name": "conditions.nbRatedGame.nb",
                  "value": ""
                },
                {
                  "name": "conditions.allowList",
                  "value": ""
                },
                {
                  "name": "conditions.bots",
                  "value": ""
                },
                {
                  "name": "conditions.accountAge",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Create a public or private Arena tournament.\nThis endpoint mirrors the form on <https://lichess.org/tournament/new>.\nYou can create up to 12 public tournaments per day, or 24 private tournaments.\nA team battle can be created by specifying the `teamBattleByTeam` argument.\nAdditional restrictions:\n  - clockTime + clockIncrement > 0\n  - 15s and 0+1 variant tournaments cannot be rated\n  - Clock time in comparison to tournament length must be reasonable: 3 <= (minutes * 60) / (96 * clockTime + 48 * c"
        },
        {
          "info": {
            "name": "Get info about an Arena tournament",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/tournament/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The tournament ID."
              },
              {
                "name": "page",
                "value": "",
                "type": "query",
                "description": "Specify which page of player standings to view."
              }
            ]
          },
          "docs": "Get detailed info about recently finished, current, or upcoming tournament's duels, player standings, and other info.\n"
        },
        {
          "info": {
            "name": "Update an Arena tournament",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/tournament/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The tournament ID."
              }
            ],
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "name",
                  "value": ""
                },
                {
                  "name": "clockTime",
                  "value": ""
                },
                {
                  "name": "clockIncrement",
                  "value": ""
                },
                {
                  "name": "minutes",
                  "value": ""
                },
                {
                  "name": "waitMinutes",
                  "value": ""
                },
                {
                  "name": "startDate",
                  "value": ""
                },
                {
                  "name": "variant",
                  "value": ""
                },
                {
                  "name": "rated",
                  "value": ""
                },
                {
                  "name": "position",
                  "value": ""
                },
                {
                  "name": "berserkable",
                  "value": ""
                },
                {
                  "name": "streakable",
                  "value": ""
                },
                {
                  "name": "hasChat",
                  "value": ""
                },
                {
                  "name": "description",
                  "value": ""
                },
                {
                  "name": "password",
                  "value": ""
                },
                {
                  "name": "conditions.minRating.rating",
                  "value": ""
                },
                {
                  "name": "conditions.maxRating.rating",
                  "value": ""
                },
                {
                  "name": "conditions.nbRatedGame.nb",
                  "value": ""
                },
                {
                  "name": "conditions.allowList",
                  "value": ""
                },
                {
                  "name": "conditions.bots",
                  "value": ""
                },
                {
                  "name": "conditions.accountAge",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Update an Arena tournament.\nBe mindful not to make important changes to ongoing tournaments.\nCan be used to update a team battle.\nAdditional restrictions:\n  - clockTime + clockIncrement > 0\n  - 15s and 0+1 variant tournaments cannot be rated\n  - Clock time in comparison to tournament length must be reasonable: 3 <= (minutes * 60) / (96 * clockTime + 48 * clockIncrement + 15) <= 150\n"
        },
        {
          "info": {
            "name": "Join an Arena tournament",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/tournament/:id/join",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The tournament ID."
              }
            ],
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "password",
                  "value": ""
                },
                {
                  "name": "team",
                  "value": ""
                },
                {
                  "name": "pairMeAsap",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Join an Arena tournament, possibly with a password and/or a team.\nAlso unpauses if you had previously [paused](#tag/arena-tournaments/POST/api/tournament/{id}/withdraw) the tournament.\n"
        },
        {
          "info": {
            "name": "Pause or leave an Arena tournament",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/tournament/:id/withdraw",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The tournament ID."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Leave a future Arena tournament, or take a break on an ongoing Arena tournament.\nIt's possible to join again later. Points and streaks are preserved.\n"
        },
        {
          "info": {
            "name": "Terminate an Arena tournament",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/tournament/:id/terminate",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The tournament ID."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Terminate an Arena tournament\n"
        },
        {
          "info": {
            "name": "Update a team battle",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/tournament/team-battle/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The tournament ID"
              }
            ],
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "teams",
                  "value": ""
                },
                {
                  "name": "nbLeaders",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Set the teams and number of leaders of a team battle.\nTo update the other attributes of a team battle, use the [tournament update endpoint](#tag/arena-tournaments/POST/api/tournament/{id}).\n"
        },
        {
          "info": {
            "name": "Export games of an Arena tournament",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/tournament/:id/games",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The tournament ID."
              },
              {
                "name": "player",
                "value": "",
                "type": "query",
                "description": "Only games of a particular player. Leave empty to fetch games of all players."
              },
              {
                "name": "moves",
                "value": "",
                "type": "query",
                "description": "Include the PGN moves."
              },
              {
                "name": "pgnInJson",
                "value": "",
                "type": "query",
                "description": "Include the full PGN within the JSON response, in a `pgn` field."
              },
              {
                "name": "tags",
                "value": "",
                "type": "query",
                "description": "Include the PGN tags."
              },
              {
                "name": "clocks",
                "value": "",
                "type": "query",
                "description": "Include clock status when available.\nEither as PGN comments: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`\nOr in a `clocks` JSON field, as centisecond integers, depending on the response type.\n"
              },
              {
                "name": "evals",
                "value": "",
                "type": "query",
                "description": "Include analysis evaluations and comments, when available.\nEither as PGN comments: `12. Bxf6 { [%eval 0.23] } a3 { [%eval -1.09] }`\nOr in an `analysis` JSON field, depending on the response type.\n"
              },
              {
                "name": "accuracy",
                "value": "",
                "type": "query",
                "description": "Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available. Only available in JSON.\n"
              },
              {
                "name": "opening",
                "value": "",
                "type": "query",
                "description": "Include the opening name.\nExample: `[Opening \"King's Gambit Accepted, King's Knight Gambit\"]`\n"
              },
              {
                "name": "division",
                "value": "",
                "type": "query",
                "description": "Plies which mark the beginning of the middlegame and endgame.\nOnly available in JSON\n"
              }
            ]
          },
          "docs": "Download games of a tournament in PGN or [ndjson](#description/streaming-with-nd-json) format.\nGames are sorted by reverse chronological order (most recent first).\nThe game stream is throttled, depending on who is making the request:\n  - Anonymous request: 20 games per second\n  - [OAuth2 authenticated](#description/authentication) request: 30 games per second\n"
        },
        {
          "info": {
            "name": "Get results of an Arena tournament",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/tournament/:id/results",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The tournament ID."
              },
              {
                "name": "nb",
                "value": "",
                "type": "query",
                "description": "Max number of players to fetch"
              },
              {
                "name": "sheet",
                "value": "",
                "type": "query",
                "description": "Add a `sheet` field to the player document.\nIt's an expensive server computation that slows down the stream.\n"
              }
            ]
          },
          "docs": "Players of an Arena tournament, with their score and performance, sorted by rank (best first).\n**Players are streamed as [ndjson](#description/streaming-with-nd-json)**, i.e. one JSON object per line.\nIf called on an ongoing tournament, results can be inconsistent\ndue to ranking changes while the players are being streamed.\nUse on finished tournaments for guaranteed consistency.\n"
        },
        {
          "info": {
            "name": "Get team standing of a team battle",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/tournament/:id/teams",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The tournament ID."
              }
            ]
          },
          "docs": "Teams of a team battle tournament, with top players, sorted by rank (best first).\n"
        },
        {
          "info": {
            "name": "Get tournaments created by a user",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/user/:username/tournament/created",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path",
                "description": "The user whose created tournaments to fetch"
              },
              {
                "name": "nb",
                "value": "",
                "type": "query",
                "description": "Max number of tournaments to fetch"
              },
              {
                "name": "status",
                "value": "",
                "type": "query",
                "description": "Include tournaments in the given status: \"Created\" (10), \"Started\" (20), \"Finished\" (30)\nYou can add this parameter more than once to include tournaments in different statuses.\nExample: `?status=10&status=20`\n"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Get all tournaments created by a given user.\nTournaments are sorted by reverse chronological order of start date (last starting first).\nTournaments are streamed as [ndjson](#description/streaming-with-nd-json).\nThe stream is throttled, depending on who is making the request:\n  - Anonymous request: 20 tournaments per second\n  - [OAuth2 authenticated](#description/authentication) request: 30 tournaments per second\n  - Authenticated, downloading your own tournaments: 50 tournaments per second\n"
        },
        {
          "info": {
            "name": "Get tournaments played by a user",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/user/:username/tournament/played",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path",
                "description": "The user whose played tournaments to fetch"
              },
              {
                "name": "nb",
                "value": "",
                "type": "query",
                "description": "Max number of tournaments to fetch"
              },
              {
                "name": "performance",
                "value": "",
                "type": "query",
                "description": "Include the player performance rating in the response, at some cost for the server.\n"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Get all tournaments played by a given user.\nTournaments are sorted by reverse chronological order of start date (last played first).\nTournaments are streamed as [ndjson](#description/streaming-with-nd-json).\nThe stream is throttled, depending on who is making the request:\n  - Anonymous request: 20 tournaments per second\n  - [OAuth2 authenticated](#description/authentication) request: 30 tournaments per second\n  - Authenticated, downloading your own tournaments: 50 tournaments per second\n"
        }
      ]
    },
    {
      "info": {
        "name": "Tournaments (Swiss)",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Create a new Swiss tournament",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/swiss/new/:teamId",
            "params": [
              {
                "name": "teamId",
                "value": "",
                "type": "path",
                "description": "ID of the team"
              }
            ],
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "name",
                  "value": ""
                },
                {
                  "name": "clock.limit",
                  "value": ""
                },
                {
                  "name": "clock.increment",
                  "value": ""
                },
                {
                  "name": "nbRounds",
                  "value": ""
                },
                {
                  "name": "startsAt",
                  "value": ""
                },
                {
                  "name": "roundInterval",
                  "value": ""
                },
                {
                  "name": "variant",
                  "value": ""
                },
                {
                  "name": "position",
                  "value": ""
                },
                {
                  "name": "description",
                  "value": ""
                },
                {
                  "name": "rated",
                  "value": ""
                },
                {
                  "name": "password",
                  "value": ""
                },
                {
                  "name": "forbiddenPairings",
                  "value": ""
                },
                {
                  "name": "manualPairings",
                  "value": ""
                },
                {
                  "name": "chatFor",
                  "value": ""
                },
                {
                  "name": "conditions.minRating.rating",
                  "value": ""
                },
                {
                  "name": "conditions.maxRating.rating",
                  "value": ""
                },
                {
                  "name": "conditions.nbRatedGame.nb",
                  "value": ""
                },
                {
                  "name": "conditions.playYourGames",
                  "value": ""
                },
                {
                  "name": "conditions.allowList",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Create a Swiss tournament for your team.\nThis endpoint mirrors the Swiss tournament form from your team pagee.\nYou can create up to 12 tournaments per day.\nAdditional restrictions:\n  - clock.limit + clock.increment > 0\n  - 15s and 0+1 variant tournaments cannot be rated\n"
        },
        {
          "info": {
            "name": "Get info about a Swiss tournament",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/swiss/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The Swiss tournament ID."
              }
            ]
          },
          "docs": "Get detailed info about a Swiss tournament.\n"
        },
        {
          "info": {
            "name": "Update a Swiss tournament",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/swiss/:id/edit",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The tournament ID."
              }
            ],
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "name",
                  "value": ""
                },
                {
                  "name": "clock.limit",
                  "value": ""
                },
                {
                  "name": "clock.increment",
                  "value": ""
                },
                {
                  "name": "nbRounds",
                  "value": ""
                },
                {
                  "name": "startsAt",
                  "value": ""
                },
                {
                  "name": "roundInterval",
                  "value": ""
                },
                {
                  "name": "variant",
                  "value": ""
                },
                {
                  "name": "position",
                  "value": ""
                },
                {
                  "name": "description",
                  "value": ""
                },
                {
                  "name": "rated",
                  "value": ""
                },
                {
                  "name": "password",
                  "value": ""
                },
                {
                  "name": "forbiddenPairings",
                  "value": ""
                },
                {
                  "name": "manualPairings",
                  "value": ""
                },
                {
                  "name": "chatFor",
                  "value": ""
                },
                {
                  "name": "conditions.minRating.rating",
                  "value": ""
                },
                {
                  "name": "conditions.maxRating.rating",
                  "value": ""
                },
                {
                  "name": "conditions.nbRatedGame.nb",
                  "value": ""
                },
                {
                  "name": "conditions.playYourGames",
                  "value": ""
                },
                {
                  "name": "conditions.allowList",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Update a Swiss tournament.\nBe mindful not to make important changes to ongoing tournaments.\nAdditional restrictions:\n  - clock.limit + clock.increment > 0\n  - 15s and 0+1 variant tournaments cannot be rated\n"
        },
        {
          "info": {
            "name": "Manually schedule the next round",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/swiss/:id/schedule-next-round",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The tournament ID."
              }
            ],
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "date",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Manually schedule the next round date and time of a Swiss tournament.\nThis sets the `roundInterval` field to `99999999`, i.e. manual scheduling.\nAll further rounds will need to be manually scheduled, unless the `roundInterval` field is changed back to automatic scheduling.\n"
        },
        {
          "info": {
            "name": "Join a Swiss tournament",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/swiss/:id/join",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The tournament ID."
              }
            ],
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "password",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Join a Swiss tournament, possibly with a password.\n"
        },
        {
          "info": {
            "name": "Pause or leave a swiss tournament",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/swiss/:id/withdraw",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The tournament ID."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Leave a future Swiss tournament, or take a break on an ongoing Swiss tournament.\nIt's possible to join again later. Points are preserved.\n"
        },
        {
          "info": {
            "name": "Terminate a Swiss tournament",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/swiss/:id/terminate",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The Swiss tournament ID."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Terminate a Swiss tournament\n"
        },
        {
          "info": {
            "name": "Export TRF of a Swiss tournament",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/swiss/:id.trf",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The tournament ID."
              }
            ]
          },
          "docs": "Download a tournament in the Tournament Report File format, the FIDE standard.\nDocumentation: <https://www.fide.com/FIDE/handbook/C04Annex2_TRF16.pdf>\nExample: <https://lichess.org/swiss/j8rtJ5GL.trf>\n"
        },
        {
          "info": {
            "name": "Export games of a Swiss tournament",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/swiss/:id/games",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The tournament ID."
              },
              {
                "name": "player",
                "value": "",
                "type": "query",
                "description": "Only the games played by a given player"
              },
              {
                "name": "moves",
                "value": "",
                "type": "query",
                "description": "Include the PGN moves."
              },
              {
                "name": "pgnInJson",
                "value": "",
                "type": "query",
                "description": "Include the full PGN within the JSON response, in a `pgn` field."
              },
              {
                "name": "tags",
                "value": "",
                "type": "query",
                "description": "Include the PGN tags."
              },
              {
                "name": "clocks",
                "value": "",
                "type": "query",
                "description": "Include clock status when available.\nEither as PGN comments: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`\nOr in a `clocks` JSON field, as centisecond integers, depending on the response type.\n"
              },
              {
                "name": "evals",
                "value": "",
                "type": "query",
                "description": "Include analysis evaluations and comments, when available.\nEither as PGN comments: `12. Bxf6 { [%eval 0.23] } a3 { [%eval -1.09] }`\nOr in an `analysis` JSON field, depending on the response type.\n"
              },
              {
                "name": "accuracy",
                "value": "",
                "type": "query",
                "description": "Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available. Only available in JSON.\n"
              },
              {
                "name": "opening",
                "value": "",
                "type": "query",
                "description": "Include the opening name.\nExample: `[Opening \"King's Gambit Accepted, King's Knight Gambit\"]`\n"
              },
              {
                "name": "division",
                "value": "",
                "type": "query",
                "description": "Plies which mark the beginning of the middlegame and endgame.\nOnly available in JSON\n"
              }
            ]
          },
          "docs": "Download games of a swiss tournament in PGN or [ndjson](#description/streaming-with-nd-json) format.\nGames are sorted by chronological order.\nThe game stream is throttled, depending on who is making the request:\n  - Anonymous request: 20 games per second\n  - [OAuth2 authenticated](#description/authentication) request: 30 games per second\n"
        },
        {
          "info": {
            "name": "Get results of a swiss tournament",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/swiss/:id/results",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path",
                "description": "The tournament ID."
              },
              {
                "name": "nb",
                "value": "",
                "type": "query",
                "description": "Max number of players to fetch"
              }
            ]
          },
          "docs": "Players of a swiss tournament, with their score and performance, sorted by rank (best first).\nPlayers are streamed as [ndjson](#description/streaming-with-nd-json).\nIf called on an ongoing tournament, results can be inconsistent\ndue to ranking changes while the players are being streamed.\nUse on finished tournaments for guaranteed consistency.\n"
        }
      ]
    },
    {
      "info": {
        "name": "Teams",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get team swiss tournaments",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/team/:teamId/swiss",
            "params": [
              {
                "name": "teamId",
                "value": "coders",
                "type": "path"
              },
              {
                "name": "max",
                "value": "",
                "type": "query",
                "description": "How many tournaments to download."
              },
              {
                "name": "status",
                "value": "",
                "type": "query",
                "description": "[Filter] Only swiss tournaments in this current state.\n"
              },
              {
                "name": "createdBy",
                "value": "",
                "type": "query",
                "description": "[Filter] Only swiss tournaments created by a given user.\n"
              },
              {
                "name": "name",
                "value": "",
                "type": "query",
                "description": "[Filter] Only swiss tournaments with a given name.\n"
              }
            ]
          },
          "docs": "Get all swiss tournaments of a team.\nTournaments are sorted by reverse chronological order of start date (last starting first).\nTournaments are streamed as [ndjson](#description/streaming-with-nd-json).\n"
        },
        {
          "info": {
            "name": "Get a single team",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/team/:teamId",
            "params": [
              {
                "name": "teamId",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Public info about a team. Includes the list of publicly visible leaders."
        },
        {
          "info": {
            "name": "Get popular teams",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/team/all",
            "params": [
              {
                "name": "page",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "Paginator of the most popular teams.\n"
        },
        {
          "info": {
            "name": "Teams of a player",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/team/of/:username",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "All the teams a player is a member of.\nTeams that hide their player list are only included if you also belong to the team.\n"
        },
        {
          "info": {
            "name": "Search teams",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/team/search",
            "params": [
              {
                "name": "text",
                "value": "",
                "type": "query"
              },
              {
                "name": "page",
                "value": "",
                "type": "query"
              }
            ]
          },
          "docs": "Paginator of team search results for a keyword.\n"
        },
        {
          "info": {
            "name": "Get members of a team",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/team/:teamId/users",
            "params": [
              {
                "name": "teamId",
                "value": "",
                "type": "path"
              },
              {
                "name": "full",
                "value": "",
                "type": "query",
                "description": "Full user documents with performance ratings.\nThis limits the response to 1,000 users.\n"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Members are sorted by reverse chronological order of joining the team (most recent first).\nOAuth is only required if the list of members is private.\nUp to 5,000 users are streamed as [ndjson](#description/streaming-with-nd-json).\n"
        },
        {
          "info": {
            "name": "Get team Arena tournaments",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/team/:teamId/arena",
            "params": [
              {
                "name": "teamId",
                "value": "",
                "type": "path",
                "description": "ID of the team"
              },
              {
                "name": "max",
                "value": "",
                "type": "query",
                "description": "How many tournaments to download."
              },
              {
                "name": "status",
                "value": "",
                "type": "query",
                "description": "[Filter] Only arena tournaments in this current state.\n"
              },
              {
                "name": "createdBy",
                "value": "",
                "type": "query",
                "description": "[Filter] Only arena tournaments created by a given user.\n"
              },
              {
                "name": "name",
                "value": "",
                "type": "query",
                "description": "[Filter] Only arena tournaments with a given name.\n"
              }
            ]
          },
          "docs": "Get all Arena tournaments relevant to a team.\nTournaments are sorted by reverse chronological order of start date (last starting first).\nTournaments are streamed as [ndjson](#description/streaming-with-nd-json).\n"
        },
        {
          "info": {
            "name": "Join a team",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/team/:teamId/join",
            "params": [
              {
                "name": "teamId",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "message",
                  "value": ""
                },
                {
                  "name": "password",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Join a team.\nIf the team requires a password but the `password` field is incorrect,\nthen the call fails with `403 Forbidden`.\nSimilarly, if the team join policy requires a confirmation but the\n`message` parameter is not given, then the call fails with\n`403 Forbidden`.\n"
        },
        {
          "info": {
            "name": "Leave a team",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/team/:teamId/quit",
            "params": [
              {
                "name": "teamId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Leave a team.\n- <https://lichess.org/team>\n"
        },
        {
          "info": {
            "name": "Get join requests",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/team/:teamId/requests",
            "params": [
              {
                "name": "teamId",
                "value": "",
                "type": "path"
              },
              {
                "name": "declined",
                "value": "",
                "type": "query",
                "description": "Get the declined join requests"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Get pending join requests of your team"
        },
        {
          "info": {
            "name": "Accept join request",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/team/:teamId/request/:userId/accept",
            "params": [
              {
                "name": "teamId",
                "value": "",
                "type": "path"
              },
              {
                "name": "userId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Accept someone's request to join your team"
        },
        {
          "info": {
            "name": "Decline join request",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/team/:teamId/request/:userId/decline",
            "params": [
              {
                "name": "teamId",
                "value": "",
                "type": "path"
              },
              {
                "name": "userId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Decline someone's request to join your team"
        },
        {
          "info": {
            "name": "Kick a user from your team",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/team/:teamId/kick/:userId",
            "params": [
              {
                "name": "teamId",
                "value": "",
                "type": "path"
              },
              {
                "name": "userId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Kick a member out of one of your teams.\n- <https://lichess.org/team>\n"
        },
        {
          "info": {
            "name": "Message all members",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/team/:teamId/pm-all",
            "params": [
              {
                "name": "teamId",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "message",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Send a private message to all members of a team.\nYou must be a team leader with the \"Messages\" permission.\n"
        }
      ]
    },
    {
      "info": {
        "name": "Studies",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Export one study chapter",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/study/:studyId/:chapterId.pgn",
            "params": [
              {
                "name": "studyId",
                "value": "",
                "type": "path",
                "description": "The study ID"
              },
              {
                "name": "chapterId",
                "value": "",
                "type": "path",
                "description": "The chapter ID"
              },
              {
                "name": "clocks",
                "value": "",
                "type": "query",
                "description": "Include clock comments in the PGN moves, when available.\nExample: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`\n"
              },
              {
                "name": "comments",
                "value": "",
                "type": "query",
                "description": "Include analysis and annotator comments in the PGN moves, when available.\nExample: `12. Bxf6 { [%eval 0.23] } a3 { White is in a pickle. }`\n"
              },
              {
                "name": "variations",
                "value": "",
                "type": "query",
                "description": "Include non-mainline moves, when available.\nExample: `4. d4 Bb4+ (4... Nc6 5. Nf3 Bb4+ 6. Bd2 (6. Nbd2 O-O 7. O-O) 6... Bd6) 5. Nd2`\n"
              },
              {
                "name": "orientation",
                "value": "",
                "type": "query",
                "description": "Add a `Orientation` PGN tag with the chapter predefined orientation.\nExample: `[Orientation \"white\"]`\n"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Download one study chapter in PGN format.\nIf authenticated, then all public, unlisted, and private study chapters are read.\nIf not, only public (non-unlisted) study chapters are read.\n"
        },
        {
          "info": {
            "name": "Export all chapters",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/study/:studyId.pgn",
            "params": [
              {
                "name": "studyId",
                "value": "",
                "type": "path",
                "description": "The study ID"
              },
              {
                "name": "clocks",
                "value": "",
                "type": "query",
                "description": "Include clock comments in the PGN moves, when available.\nExample: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`\n"
              },
              {
                "name": "comments",
                "value": "",
                "type": "query",
                "description": "Include analysis and annotator comments in the PGN moves, when available.\nExample: `12. Bxf6 { [%eval 0.23] } a3 { White is in a pickle. }`\n"
              },
              {
                "name": "variations",
                "value": "",
                "type": "query",
                "description": "Include non-mainline moves, when available.\nExample: `4. d4 Bb4+ (4... Nc6 5. Nf3 Bb4+ 6. Bd2 (6. Nbd2 O-O 7. O-O) 6... Bd6) 5. Nd2`\n"
              },
              {
                "name": "orientation",
                "value": "",
                "type": "query",
                "description": "Add a `Orientation` PGN tag with the chapter predefined orientation.\nExample: `[Orientation \"white\"]`\n"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Download all chapters of a study in PGN format.\nIf authenticated, then all public, unlisted, and private study chapters are read.\nIf not, only public (non-unlisted) study chapters are read.\n"
        },
        {
          "info": {
            "name": "Study metadata",
            "type": "http"
          },
          "http": {
            "method": "HEAD",
            "url": "https://lichess.org/api/study/:studyId.pgn",
            "params": [
              {
                "name": "studyId",
                "value": "",
                "type": "path",
                "description": "The study ID"
              }
            ]
          },
          "docs": "Only get the study headers, including `Last-Modified`.\n"
        },
        {
          "info": {
            "name": "Create a new Study",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/study",
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "name",
                  "value": ""
                },
                {
                  "name": "visibility",
                  "value": ""
                },
                {
                  "name": "computer",
                  "value": ""
                },
                {
                  "name": "explorer",
                  "value": ""
                },
                {
                  "name": "cloneable",
                  "value": ""
                },
                {
                  "name": "shareable",
                  "value": ""
                },
                {
                  "name": "chat",
                  "value": ""
                },
                {
                  "name": "sticky",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Create a [study](https://lichess.org/study), and a new empty chapter within it.\nYou can make up to 30 new studies per day.\n"
        },
        {
          "info": {
            "name": "Import PGN into a study",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/study/:studyId/import-pgn",
            "params": [
              {
                "name": "studyId",
                "value": "",
                "type": "path",
                "description": "ID of the study"
              }
            ],
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "pgn",
                  "value": ""
                },
                {
                  "name": "name",
                  "value": ""
                },
                {
                  "name": "orientation",
                  "value": ""
                },
                {
                  "name": "variant",
                  "value": ""
                },
                {
                  "name": "mode",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Imports arbitrary PGN into an existing [study](https://lichess.org/study). Creates a new chapter in the study.\nIf the PGN contains multiple games (separated by 2 or more newlines)\nthen multiple chapters will be created within the study.\nNote that a study can contain at most 64 chapters.\n"
        },
        {
          "info": {
            "name": "Update PGN tags of a study chapter",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/study/:studyId/:chapterId/tags",
            "params": [
              {
                "name": "studyId",
                "value": "",
                "type": "path",
                "description": "The study ID"
              },
              {
                "name": "chapterId",
                "value": "",
                "type": "path",
                "description": "The chapter ID"
              }
            ],
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "pgn",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Add, update and delete the PGN tags of a study.\nBy providing a list of PGN tags in the usual PGN format, you can:\n- Add new tags if the chapter doesn't have them yet\n- Update existing chapter tags\n- Delete existing chapter tags, by providing a tag with an empty value.\n\nThe chapter keeps the tags that you don't provide.\n"
        },
        {
          "info": {
            "name": "Update the moves of a study chapter",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/study/:studyId/:chapterId/moves",
            "params": [
              {
                "name": "studyId",
                "value": "",
                "type": "path",
                "description": "The study ID"
              },
              {
                "name": "chapterId",
                "value": "",
                "type": "path",
                "description": "The chapter ID"
              }
            ],
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "pgn",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Replaces the moves tree of a study chapter.\nNo tags will be modified.\n"
        },
        {
          "info": {
            "name": "Export all studies of a user",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/study/by/:username/export.pgn",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path",
                "description": "The user whose studies we export"
              },
              {
                "name": "clocks",
                "value": "",
                "type": "query",
                "description": "Include clock comments in the PGN moves, when available.\nExample: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`\n"
              },
              {
                "name": "comments",
                "value": "",
                "type": "query",
                "description": "Include analysis and annotator comments in the PGN moves, when available.\nExample: `12. Bxf6 { [%eval 0.23] } a3 { White is in a pickle. }`\n"
              },
              {
                "name": "variations",
                "value": "",
                "type": "query",
                "description": "Include non-mainline moves, when available.\nExample: `4. d4 Bb4+ (4... Nc6 5. Nf3 Bb4+ 6. Bd2 (6. Nbd2 O-O 7. O-O) 6... Bd6) 5. Nd2`\n"
              },
              {
                "name": "orientation",
                "value": "",
                "type": "query",
                "description": "Add a `Orientation` PGN tag with the chapter predefined orientation.\nExample: `[Orientation \"white\"]`\n"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Download all chapters of all studies of a user in PGN format.\nIf authenticated, then all public, unlisted, and private studies are included.\nIf not, only public (non-unlisted) studies are included.\n"
        },
        {
          "info": {
            "name": "List studies of a user",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/study/by/:username",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path",
                "description": "The user whose studies we list"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Get metadata (name and dates) of all studies of a user.\nIf authenticated, then all public, unlisted, and private studies are included.\nIf not, only public (non-unlisted) studies are included.\nStudies are streamed as [ndjson](#description/streaming-with-nd-json).\n"
        },
        {
          "info": {
            "name": "Delete a study chapter",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://lichess.org/api/study/:studyId/:chapterId",
            "params": [
              {
                "name": "studyId",
                "value": "",
                "type": "path",
                "description": "The study ID"
              },
              {
                "name": "chapterId",
                "value": "",
                "type": "path",
                "description": "The chapter ID"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Delete a chapter of a study you own. This is definitive.\nA study must have at least one chapter; so if you delete the last chapter,\nan empty one will be automatically created to replace it.\n"
        }
      ]
    },
    {
      "info": {
        "name": "Broadcasts",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get official broadcasts",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/broadcast",
            "params": [
              {
                "name": "nb",
                "value": "",
                "type": "query",
                "description": "Max number of broadcasts to fetch"
              },
              {
                "name": "html",
                "value": "true",
                "type": "query",
                "description": "Convert the \"description\" field from markdown to HTML"
              },
              {
                "name": "live",
                "value": "true",
                "type": "query",
                "description": "[Filter] only broadcasts where a round is ongoing, i.e. started and not finished"
              }
            ]
          },
          "docs": "Returns active (a round is scheduled or ongoing) official broadcasts sorted by tier. \nAfter that, returns finished broadcasts sorted by most recent sync time.\nBroadcasts are streamed as [ndjson](#description/streaming-with-nd-json).\n"
        },
        {
          "info": {
            "name": "Get paginated top broadcast previews",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/broadcast/top",
            "params": [
              {
                "name": "page",
                "value": "",
                "type": "query",
                "description": "Which page to fetch. Only page 1 has \"active\" broadcasts."
              },
              {
                "name": "html",
                "value": "true",
                "type": "query",
                "description": "Convert the \"description\" field from markdown to HTML"
              }
            ]
          },
          "docs": "The same data, in the same order, as can be seen on [https://lichess.org/broadcast](/broadcast).\n"
        },
        {
          "info": {
            "name": "Get broadcasts created by a user",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/broadcast/by/:username",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path"
              },
              {
                "name": "page",
                "value": "",
                "type": "query"
              },
              {
                "name": "html",
                "value": "true",
                "type": "query",
                "description": "Convert the \"description\" field from markdown to HTML"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Get all incoming, ongoing, and finished official broadcasts.\nThe broadcasts are sorted by created date, most recent first.\n\nIf you are authenticated as the user whose broadcasts you are requesting, you will also see your private and unlisted broadcasts.\n"
        },
        {
          "info": {
            "name": "Search broadcasts",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/broadcast/search",
            "params": [
              {
                "name": "page",
                "value": "",
                "type": "query",
                "description": "Which page to fetch."
              },
              {
                "name": "q",
                "value": "",
                "type": "query",
                "description": "Search term"
              }
            ]
          },
          "docs": "Search across recent official broadcasts.\n"
        },
        {
          "info": {
            "name": "Create a broadcast tournament",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/broadcast/new",
            "body": {
              "type": "form-urlencoded",
              "data": []
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Create a new broadcast tournament to relay external games.\nThis endpoint accepts the same form data as the [web form](https://lichess.org/broadcast/new).\n"
        },
        {
          "info": {
            "name": "Get a broadcast tournament",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/broadcast/:broadcastTournamentId",
            "params": [
              {
                "name": "broadcastTournamentId",
                "value": "",
                "type": "path",
                "description": "The broadcast tournament ID"
              }
            ]
          },
          "docs": "Get information about a broadcast tournament.\n"
        },
        {
          "info": {
            "name": "Get players of a broadcast",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/broadcast/:broadcastTournamentId/players",
            "params": [
              {
                "name": "broadcastTournamentId",
                "value": "",
                "type": "path",
                "description": "The broadcast tournament ID"
              }
            ]
          },
          "docs": "Get the list of players of a broadcast tournament, if available.\n"
        },
        {
          "info": {
            "name": "Get a player of a broadcast",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/broadcast/:broadcastTournamentId/players/:playerId",
            "params": [
              {
                "name": "broadcastTournamentId",
                "value": "",
                "type": "path",
                "description": "The broadcast tournament ID"
              },
              {
                "name": "playerId",
                "value": "",
                "type": "path",
                "description": "The unique player ID within the broadcast. This is usually their fideId. \nIf the player does not have a fideId, it is their name. Consult the [list of players for the broadcast](#tag/broadcasts/GET/broadcast/{broadcastTournamentId}/players) for which ID to use.\n"
              }
            ]
          },
          "docs": "Get the details of a specific player and their games from a broadcast tournament.\n"
        },
        {
          "info": {
            "name": "Get the team leaderboard of a broadcast",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/broadcast/:broadcastTournamentId/teams/standings",
            "params": [
              {
                "name": "broadcastTournamentId",
                "value": "",
                "type": "path",
                "description": "The broadcast tournament ID"
              }
            ]
          },
          "docs": "Get the team leaderboard of a broadcast tournament, if available.\n"
        },
        {
          "info": {
            "name": "Update your broadcast tournament",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/broadcast/:broadcastTournamentId/edit",
            "params": [
              {
                "name": "broadcastTournamentId",
                "value": "",
                "type": "path",
                "description": "The broadcast ID"
              }
            ],
            "body": {
              "type": "form-urlencoded",
              "data": []
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Update information about a broadcast tournament that you created.\nThis endpoint accepts the same form data as the web form.\nAll fields must be populated with data. Missing fields will override the broadcast with empty data.\n"
        },
        {
          "info": {
            "name": "Create a broadcast round",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/broadcast/:broadcastTournamentId/new",
            "params": [
              {
                "name": "broadcastTournamentId",
                "value": "",
                "type": "path",
                "description": "The broadcast tournament ID"
              }
            ],
            "body": {
              "type": "form-urlencoded",
              "data": []
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Create a new broadcast round to relay external games.\nThis endpoint accepts the same form data as the web form.\n\nChoose one between `syncUrl`, `syncUrls`, `syncIds` and `syncUsers`, if it is missing, the broadcast needs to be fed by [pushing PGN to it](#tag/broadcasts/POST/api/broadcast/round/{broadcastRoundId}/push)\n"
        },
        {
          "info": {
            "name": "Get a broadcast round",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/broadcast/:broadcastTournamentSlug/:broadcastRoundSlug/:broadcastRoundId",
            "params": [
              {
                "name": "broadcastTournamentSlug",
                "value": "",
                "type": "path",
                "description": "The broadcast tournament slug. Only used for SEO, the slug can be safely replaced by `-`. Only the `broadcastRoundId` is actually used."
              },
              {
                "name": "broadcastRoundSlug",
                "value": "",
                "type": "path",
                "description": "The broadcast round slug. Only used for SEO, the slug can be safely replaced by `-`. Only the `broadcastRoundId` is actually used."
              },
              {
                "name": "broadcastRoundId",
                "value": "",
                "type": "path",
                "description": "The broadcast Round ID"
              }
            ]
          },
          "docs": "Get information about a broadcast round.\n"
        },
        {
          "info": {
            "name": "Update a broadcast round",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/broadcast/round/:broadcastRoundId/edit",
            "params": [
              {
                "name": "broadcastRoundId",
                "value": "",
                "type": "path",
                "description": "The broadcast round ID"
              },
              {
                "name": "patch",
                "value": "true",
                "type": "query",
                "description": "Only update the provided fields, leaving others unchanged"
              }
            ],
            "body": {
              "type": "form-urlencoded",
              "data": []
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Update information about a broadcast round.\nThis endpoint accepts the same form data as the web form.\nAll fields must be populated with data. Missing fields will override the broadcast with empty data.\nFor instance, if you omit `startDate`, then any pre-existing start date will be removed.\n"
        },
        {
          "info": {
            "name": "Reset a broadcast round",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/broadcast/round/:broadcastRoundId/reset",
            "params": [
              {
                "name": "broadcastRoundId",
                "value": "",
                "type": "path",
                "description": "The broadcast round ID"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Remove any games from the broadcast round and reset it to its initial state.\n"
        },
        {
          "info": {
            "name": "Push PGN to a broadcast round",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/broadcast/round/:broadcastRoundId/push",
            "params": [
              {
                "name": "broadcastRoundId",
                "value": "",
                "type": "path",
                "description": "The broadcast round ID"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Update a broadcast with new PGN.\nOnly for broadcasts without a source URL.\n"
        },
        {
          "info": {
            "name": "Stream an ongoing broadcast round as PGN",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/stream/broadcast/round/:broadcastRoundId.pgn",
            "params": [
              {
                "name": "broadcastRoundId",
                "value": "",
                "type": "path",
                "description": "The broadcast round ID"
              },
              {
                "name": "clocks",
                "value": "",
                "type": "query",
                "description": "Include clock comments in the PGN moves, when available.\nExample: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`\n"
              },
              {
                "name": "comments",
                "value": "",
                "type": "query",
                "description": "Include analysis comments in the PGN moves, when available.\nExample: `12. Bxf6 { [%eval 0.23] }`\n"
              }
            ]
          },
          "docs": "This streaming endpoint first sends all games of a broadcast round in PGN format.\nThen, it waits for new moves to be played. As soon as it happens, the entire PGN of the game is sent to the stream.\nThe stream will also send PGNs when games are added to the round.\nThis is the best way to get updates about an ongoing round. Streaming means no polling,\nand no pollings means no latency, and minimum impact on the server.\n"
        },
        {
          "info": {
            "name": "Export one round as PGN",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/broadcast/round/:broadcastRoundId.pgn",
            "params": [
              {
                "name": "broadcastRoundId",
                "value": "",
                "type": "path",
                "description": "The round ID"
              },
              {
                "name": "clocks",
                "value": "",
                "type": "query",
                "description": "Include clock comments in the PGN moves, when available.\nExample: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`\n"
              },
              {
                "name": "comments",
                "value": "",
                "type": "query",
                "description": "Include analysis comments in the PGN moves, when available.\nExample: `12. Bxf6 { [%eval 0.23] }`\n"
              }
            ]
          },
          "docs": "Download all games of a single round of a broadcast tournament in PGN format.\nYou *could* poll this endpoint to get updates about a tournament, but it would be slow,\nand very inefficient.\nInstead, consider [streaming the tournament](#tag/broadcasts/GET/api/stream/broadcast/round/{broadcastRoundId}.pgn) to get\na new PGN every time a game is updated, in real-time.\n"
        },
        {
          "info": {
            "name": "Export all rounds as PGN",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/broadcast/:broadcastTournamentId.pgn",
            "params": [
              {
                "name": "broadcastTournamentId",
                "value": "",
                "type": "path",
                "description": "The broadcast tournament ID"
              },
              {
                "name": "clocks",
                "value": "",
                "type": "query",
                "description": "Include clock comments in the PGN moves, when available.\nExample: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`\n"
              },
              {
                "name": "comments",
                "value": "",
                "type": "query",
                "description": "Include analysis comments in the PGN moves, when available.\nExample: `12. Bxf6 { [%eval 0.23] }`\n"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Download all games of all rounds of a broadcast in PGN format.\nIf a `study:read` [OAuth token](#tag/OAuth) is provided,\nthe private rounds where the user is a contributor will be available.\nYou may want to [download only the games of a single round](#tag/broadcasts/GET/api/broadcast/round/{broadcastRoundId}.pgn) instead.\n"
        },
        {
          "info": {
            "name": "Get your broadcast rounds",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/broadcast/my-rounds",
            "params": [
              {
                "name": "nb",
                "value": "",
                "type": "query",
                "description": "How many rounds to get"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Stream all broadcast rounds you are a member of.\nAlso includes broadcasts rounds you did not create, but were invited to.\nAlso includes broadcasts rounds where you're a non-writing member. See the `writeable` flag in the response.\nRounds are ordered by rank, which is roughly chronological, most recent first, slightly pondered with popularity.\n"
        }
      ]
    },
    {
      "info": {
        "name": "FIDE",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get a FIDE player",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/fide/player/:playerId",
            "params": [
              {
                "name": "playerId",
                "value": "",
                "type": "path",
                "description": "The FIDE player ID."
              }
            ]
          },
          "docs": "Get information about a FIDE player.\n"
        },
        {
          "info": {
            "name": "Get ratings history of a FIDE player",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/fide/player/:playerId/ratings",
            "params": [
              {
                "name": "playerId",
                "value": "",
                "type": "path",
                "description": "The FIDE player ID."
              }
            ]
          },
          "docs": "Historical standard, rapid and blitz ratings of a FIDE player\n"
        },
        {
          "info": {
            "name": "Search FIDE players",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/fide/player",
            "params": [
              {
                "name": "q",
                "value": "",
                "type": "query",
                "description": "The search query."
              }
            ]
          },
          "docs": "List of FIDE players search results for a query.\n"
        }
      ]
    },
    {
      "info": {
        "name": "Simuls",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get current simuls",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/simul"
          },
          "docs": "Get recently created, started, finished, simuls.\nCreated and finished simul lists are not exhaustives, only those with\nstrong enough host will be listed, the same filter is used to display simuls on https://lichess.org/simul.\nWhen [authenticated with OAuth2](#description/authentication), the pending list will be populated with your created, but unstarted simuls.\n"
        }
      ]
    },
    {
      "info": {
        "name": "Relations",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get users followed by the logged in user",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/rel/following",
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Users are streamed as [ndjson](#description/streaming-with-nd-json).\n"
        },
        {
          "info": {
            "name": "Follow a player",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/rel/follow/:username",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Follow a player, adding them to your list of Lichess friends.\n"
        },
        {
          "info": {
            "name": "Unfollow a player",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/rel/unfollow/:username",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Unfollow a player, removing them from your list of Lichess friends.\n"
        },
        {
          "info": {
            "name": "Block a player",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/rel/block/:username",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Block a player, adding them to your list of blocked Lichess users.\n"
        },
        {
          "info": {
            "name": "Unblock a player",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/rel/unblock/:username",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Unblock a player, removing them from your list of blocked Lichess users.\n"
        }
      ]
    },
    {
      "info": {
        "name": "Board",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Stream incoming events",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/stream/event",
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Stream the events reaching a lichess user in real time as [ndjson](#description/streaming-with-nd-json).\n\nAn empty line is sent every 7 seconds for keep alive purposes.\n\nEach non-empty line is a JSON object containing a `type` field. Possible values are:\n- `gameStart` Start of a game\n- `gameFinish` Completion of a game\n- `challenge` A player sends you a challenge or you challenge someone\n- `challengeCanceled` A player cancels their challenge to you\n- `challengeDeclined` The opponent declines you"
        },
        {
          "info": {
            "name": "Create a seek",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/board/seek",
            "body": {
              "type": "form-urlencoded",
              "data": []
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Create a public seek, to start a game with a random player.\n\n### Real-time seek\n\nSpecify the `time` and `increment` clock values.\nThe response is streamed but doesn't contain any information.\n\n**Keep the connection open to keep the seek active**.\n\nIf the client closes the connection, the seek is canceled. This way, if the client terminates, the user won't be paired in a game they wouldn't play.\nWhen the seek is accepted, or expires, the server closes the connection.\n\n**Make sure to also have an "
        },
        {
          "info": {
            "name": "Stream Board game state",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/board/game/stream/:gameId",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Stream the state of a game being played with the Board API, as [ndjson](#description/streaming-with-nd-json).\n\nUse this endpoint to get updates about the game in real-time, with a single request.\n\nEach line is a JSON object containing a `type` field. Possible values are:\n  - `gameFull` Full game data. All values are immutable, except for the `state` field.\n  - `gameState` Current state of the game. Immutable values not included. Sent when a move is played, a draw is offered, or when the game end"
        },
        {
          "info": {
            "name": "Make a Board move",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/board/game/:gameId/move/:move",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              },
              {
                "name": "move",
                "value": "",
                "type": "path",
                "description": "The move to play, in UCI format"
              },
              {
                "name": "offeringDraw",
                "value": "",
                "type": "query",
                "description": "Whether to offer (or agree to) a draw"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Make a move in a game being played with the Board API.\nThe move can also contain a draw offer/agreement.\n"
        },
        {
          "info": {
            "name": "Fetch the player chat",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/board/game/:gameId/chat",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Get the messages posted in the private game chat, i.e. the chat between the 2 players of the game.\n\nGames can also have a public spectator chat.\n"
        },
        {
          "info": {
            "name": "Write in the chat",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/board/game/:gameId/chat",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "room",
                  "value": ""
                },
                {
                  "name": "text",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Post a message to the player or spectator chat, in a game being played with the Board API.\n"
        },
        {
          "info": {
            "name": "Abort a game",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/board/game/:gameId/abort",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Abort a game being played with the Board API.\n"
        },
        {
          "info": {
            "name": "Resign a game",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/board/game/:gameId/resign",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Resign a game being played with the Board API.\n"
        },
        {
          "info": {
            "name": "Handle draw offers",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/board/game/:gameId/draw/:accept",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              },
              {
                "name": "accept",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Create/accept/decline draw offers.\n- `yes`: Offer a draw, or accept the opponent's draw offer.\n- `no`: Decline a draw offer from the opponent.\n"
        },
        {
          "info": {
            "name": "Handle takeback offers",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/board/game/:gameId/takeback/:accept",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              },
              {
                "name": "accept",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Create/accept/decline takebacks.\n- `yes`: Propose a takeback, or accept the opponent's takeback offer.\n- `no`: Decline a takeback offer from the opponent.\n"
        },
        {
          "info": {
            "name": "Claim victory of a game",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/board/game/:gameId/claim-victory",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Claim victory when the opponent has left the game for a while.\n"
        },
        {
          "info": {
            "name": "Claim draw of a game",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/board/game/:gameId/claim-draw",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Claim draw when the opponent has left the game for a while.\n"
        },
        {
          "info": {
            "name": "Berserk a tournament game",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/board/game/:gameId/berserk",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Go berserk on an arena tournament game. Halves the clock time, grants an extra point upon winning.\nOnly available in arena tournaments that allow berserk, and before each player has made a move.\n"
        }
      ]
    },
    {
      "info": {
        "name": "Bot",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get online bots",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/bot/online",
            "params": [
              {
                "name": "nb",
                "value": "",
                "type": "query",
                "description": "How many bot users to fetch"
              }
            ]
          },
          "docs": "Stream the [online bot users](https://lichess.org/player/bots), as [ndjson](#description/streaming-with-nd-json)."
        },
        {
          "info": {
            "name": "Upgrade to Bot account",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/bot/account/upgrade",
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Upgrade a lichess player account into a Bot account. Only Bot accounts can use the Bot API.\nThe account **cannot have played any game** before becoming a Bot account. The upgrade is **irreversible**. The account will only be able to play as a Bot.\nTo upgrade an account to Bot, use the [official lichess-bot client](https://github.com/lichess-bot-devs/lichess-bot), or follow these steps:\n- Create an [API access token](https://lichess.org/account/oauth/token/create?scopes[]=bot:play) with \"Play bot"
        },
        {
          "info": {
            "name": "Stream Bot game state",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/bot/game/stream/:gameId",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Stream the state of a game being played with the Bot API, as [ndjson](#description/streaming-with-nd-json).\nUse this endpoint to get updates about the game in real-time, with a single request.\nEach line is a JSON object containing a `type` field. Possible values are:\n- `gameFull` Full game data. All values are immutable, except for the `state` field.\n- `gameState` Current state of the game. Immutable values not included.\n- `chatLine` Chat message sent by a user (or the bot itself) in the `room` "
        },
        {
          "info": {
            "name": "Make a Bot move",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/bot/game/:gameId/move/:move",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              },
              {
                "name": "move",
                "value": "",
                "type": "path",
                "description": "The move to play, in UCI format"
              },
              {
                "name": "offeringDraw",
                "value": "",
                "type": "query",
                "description": "Whether to offer (or agree to) a draw"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Make a move in a game being played with the Bot API.\nThe move can also contain a draw offer/agreement.\n"
        },
        {
          "info": {
            "name": "Fetch the game chat",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/bot/game/:gameId/chat",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Get the messages posted in the game chat\n"
        },
        {
          "info": {
            "name": "Write in the chat",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/bot/game/:gameId/chat",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "room",
                  "value": ""
                },
                {
                  "name": "text",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Post a message to the player or spectator chat, in a game being played with the Bot API.\n"
        },
        {
          "info": {
            "name": "Abort a game",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/bot/game/:gameId/abort",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Abort a game being played with the Bot API.\n"
        },
        {
          "info": {
            "name": "Resign a game",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/bot/game/:gameId/resign",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Resign a game being played with the Bot API.\n"
        },
        {
          "info": {
            "name": "Handle draw offers",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/bot/game/:gameId/draw/:accept",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              },
              {
                "name": "accept",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Create/accept/decline draw offers with the Bot API.\n- `yes`: Offer a draw, or accept the opponent's draw offer.\n- `no`: Decline a draw offer from the opponent.\n"
        },
        {
          "info": {
            "name": "Handle takeback offers",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/bot/game/:gameId/takeback/:accept",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              },
              {
                "name": "accept",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Create/accept/decline takebacks with the Bot API.\n- `yes`: Propose a takeback, or accept the opponent's takeback offer.\n- `no`: Decline a takeback offer from the opponent.\n"
        },
        {
          "info": {
            "name": "Claim victory of a game",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/bot/game/:gameId/claim-victory",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Claim victory when the opponent has left the game for a while.\n"
        },
        {
          "info": {
            "name": "Claim draw of a game",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/bot/game/:gameId/claim-draw",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Claim draw when the opponent has left the game for a while.\n"
        }
      ]
    },
    {
      "info": {
        "name": "Challenges",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List your challenges",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/challenge",
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Get a list of challenges created by or targeted at you.\n"
        },
        {
          "info": {
            "name": "Create a challenge",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/challenge/:username",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "form-urlencoded",
              "data": []
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Challenge someone to play. The targeted player can choose to accept or decline.\nIf the challenge is accepted, you will be notified on the [event stream](#tag/board/GET/api/board/game/stream/{gameId})\nthat a new game has started. The game ID will be the same as the challenge ID.\nChallenges for realtime games (not correspondence) expire after 20s if not accepted.\nTo prevent that, use the `keepAliveStream` flag described below.\n"
        },
        {
          "info": {
            "name": "Show one challenge",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/challenge/:challengeId/show",
            "params": [
              {
                "name": "challengeId",
                "value": "",
                "type": "path",
                "description": "The challenge ID"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Get details about a challenge, even if it has been recently accepted, canceled or declined.\n"
        },
        {
          "info": {
            "name": "Accept a challenge",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/challenge/:challengeId/accept",
            "params": [
              {
                "name": "challengeId",
                "value": "",
                "type": "path"
              },
              {
                "name": "color",
                "value": "",
                "type": "query",
                "description": "Accept challenge as this color (only valid if this is an [open challenge](#challenge/open))"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Accept an incoming challenge.\nYou should receive a `gameStart` event on the [incoming events stream](#tag/board/GET/api/board/game/stream/{gameId}).\n"
        },
        {
          "info": {
            "name": "Decline a challenge",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/challenge/:challengeId/decline",
            "params": [
              {
                "name": "challengeId",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "reason",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Decline an incoming challenge.\n"
        },
        {
          "info": {
            "name": "Cancel a challenge",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/challenge/:challengeId/cancel",
            "params": [
              {
                "name": "challengeId",
                "value": "",
                "type": "path"
              },
              {
                "name": "opponentToken",
                "value": "",
                "type": "query",
                "description": "Optional `challenge:write` token of the opponent. If set, the game can be canceled even if both players have moved."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Cancel a challenge you sent, or aborts the game if the challenge was accepted, but the game was not yet played.\nNote that the ID of a game is the same as the ID of the challenge that created it.\nWorks for user challenges and open challenges alike.\n"
        },
        {
          "info": {
            "name": "Challenge the AI",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/challenge/ai",
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "level",
                  "value": ""
                },
                {
                  "name": "clock.limit",
                  "value": ""
                },
                {
                  "name": "clock.increment",
                  "value": ""
                },
                {
                  "name": "days",
                  "value": ""
                },
                {
                  "name": "color",
                  "value": ""
                },
                {
                  "name": "variant",
                  "value": ""
                },
                {
                  "name": "fen",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Start a game with Lichess AI.\nYou will be notified on the [event stream](#tag/board/GET/api/board/game/stream/{gameId}) that a new game has started.\n"
        },
        {
          "info": {
            "name": "Open-ended challenge",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/challenge/open",
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "rated",
                  "value": ""
                },
                {
                  "name": "clock.limit",
                  "value": ""
                },
                {
                  "name": "clock.increment",
                  "value": ""
                },
                {
                  "name": "days",
                  "value": ""
                },
                {
                  "name": "variant",
                  "value": ""
                },
                {
                  "name": "fen",
                  "value": ""
                },
                {
                  "name": "name",
                  "value": ""
                },
                {
                  "name": "rules",
                  "value": ""
                },
                {
                  "name": "users",
                  "value": ""
                },
                {
                  "name": "expiresAt",
                  "value": ""
                }
              ]
            }
          },
          "docs": "Create a challenge that any 2 players can join.\nShare the URL of the challenge. the first 2 players to click it will be paired for a game.\nThe response body also contains `whiteUrl` and `blackUrl`.\nYou can control which color each player gets by giving them these URLs,\ninstead of the main challenge URL.\nOpen challenges expire after 24h.\nIf the challenge creation is [authenticated with OAuth2](#description/authentication),\nthen you can use the [challenge cancel endpoint](#tag/challenges/POST/api/"
        },
        {
          "info": {
            "name": "Start clocks of a game",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/challenge/:gameId/start-clocks",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              },
              {
                "name": "token1",
                "value": "",
                "type": "query",
                "description": "OAuth token of a player"
              },
              {
                "name": "token2",
                "value": "",
                "type": "query",
                "description": "OAuth token of the other player. Omit for AI games that have only one player."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Start the clocks of a game immediately, even if a player has not yet made a move.\nRequires the OAuth tokens of both players with `challenge:write` scope.\nIf the clocks have already started, the call will have no effect.\n\nFor AI games with only one player, omit the `token2` parameter.\n"
        },
        {
          "info": {
            "name": "Add time to the opponent clock",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/round/:gameId/add-time/:seconds",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              },
              {
                "name": "seconds",
                "value": "",
                "type": "path",
                "description": "How many seconds to give"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Add seconds to the opponent's clock. Can be used to create games with time odds.\n"
        },
        {
          "info": {
            "name": "Admin challenge tokens",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/token/admin-challenge",
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "users",
                  "value": ""
                },
                {
                  "name": "description",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "**This endpoint can only be used by Lichess administrators. It will not work if you do not have the appropriate permissions.** Tournament organizers should instead use [OAuth](#tag/OAuth) to obtain `challenge:write` tokens from users in order to perform bulk pairing.*\nCreate and obtain `challenge:write` tokens for multiple users.\nIf a similar token already exists for a user, it is reused. This endpoint is idempotent.\n"
        }
      ]
    },
    {
      "info": {
        "name": "Bulk pairings",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "View your bulk pairings",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/bulk-pairing",
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Get a list of bulk pairings you created.\n"
        },
        {
          "info": {
            "name": "Create a bulk pairing",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/bulk-pairing",
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "players",
                  "value": ""
                },
                {
                  "name": "clock.limit",
                  "value": ""
                },
                {
                  "name": "clock.increment",
                  "value": ""
                },
                {
                  "name": "days",
                  "value": ""
                },
                {
                  "name": "pairAt",
                  "value": ""
                },
                {
                  "name": "startClocksAt",
                  "value": ""
                },
                {
                  "name": "rated",
                  "value": ""
                },
                {
                  "name": "variant",
                  "value": ""
                },
                {
                  "name": "fen",
                  "value": ""
                },
                {
                  "name": "message",
                  "value": ""
                },
                {
                  "name": "rules",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Schedule many games at once, up to 24h in advance.\nOAuth tokens are required for all paired players, with the `challenge:write` scope.\nYou can schedule up to 500 games every 10 minutes. [Contact us](mailto:contact@lichess.org) if you need higher limits.\nIf games have a real-time clock, each player must have only one pairing.\nFor correspondence games, players can have multiple pairings within the same bulk.\n\n**The entire bulk is rejected if:**\n  - a token is missing\n  - a token is present more th"
        },
        {
          "info": {
            "name": "Manually start clocks",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/bulk-pairing/:id/start-clocks",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Immediately start all clocks of the games of a bulk pairing.\nThis overrides the `startClocksAt` value of an existing bulk pairing.\nIf the games have not yet been created (`bulk.pairAt` is in the future), then this does nothing.\nIf the clocks have already started (`bulk.startClocksAt` is in the past), then this does nothing.\n"
        },
        {
          "info": {
            "name": "Show a bulk pairing",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/bulk-pairing/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Get a single bulk pairing by its ID.\n"
        },
        {
          "info": {
            "name": "Cancel a bulk pairing",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://lichess.org/api/bulk-pairing/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Cancel and delete a bulk pairing that is scheduled in the future.\nIf the games have already been created, then this does nothing.\nCanceling a bulk pairing does not refund the rate limit cost of that bulk pairing.\n"
        },
        {
          "info": {
            "name": "Export games of a bulk pairing",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/bulk-pairing/:id/games",
            "headers": [
              {
                "name": "Accept",
                "value": ""
              }
            ],
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              },
              {
                "name": "moves",
                "value": "",
                "type": "query",
                "description": "Include the PGN moves."
              },
              {
                "name": "pgnInJson",
                "value": "",
                "type": "query",
                "description": "Include the full PGN within the JSON response, in a `pgn` field."
              },
              {
                "name": "tags",
                "value": "",
                "type": "query",
                "description": "Include the PGN tags."
              },
              {
                "name": "clocks",
                "value": "",
                "type": "query",
                "description": "Include clock status when available.\nEither as PGN comments: `2. exd5 { [%clk 1:01:27] } e5 { [%clk 1:01:28] }`\nOr in a `clocks` JSON field, as centisecond integers, depending on the response type.\n"
              },
              {
                "name": "evals",
                "value": "",
                "type": "query",
                "description": "Include analysis evaluations and comments, when available.\nEither as PGN comments: `12. Bxf6 { [%eval 0.23] } a3 { [%eval -1.09] }`\nOr in an `analysis` JSON field, depending on the response type.\n"
              },
              {
                "name": "accuracy",
                "value": "",
                "type": "query",
                "description": "Include [accuracy percent](https://lichess.org/page/accuracy) of each player, when available. Only available in JSON.\n"
              },
              {
                "name": "opening",
                "value": "",
                "type": "query",
                "description": "Include the opening name.\nExample: `[Opening \"King's Gambit Accepted, King's Knight Gambit\"]`\n"
              },
              {
                "name": "division",
                "value": "",
                "type": "query",
                "description": "Plies which mark the beginning of the middlegame and endgame.\nOnly available in JSON\n"
              },
              {
                "name": "literate",
                "value": "",
                "type": "query",
                "description": "Insert textual annotations in the PGN about the opening, analysis variations, mistakes, and game termination.\nExample: `5... g4? { (-0.98 → 0.60) Mistake. Best move was h6. } (5... h6 6. d4 Ne7 7. g3 d5 8. exd5 fxg3 9. hxg3 c6 10. dxc6)`\n"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Download games of a bulk in PGN or [ndjson](#description/streaming-with-nd-json) format, depending on the request `Accept` header.\n"
        }
      ]
    },
    {
      "info": {
        "name": "Messaging",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Send a private message",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/inbox/:username",
            "params": [
              {
                "name": "username",
                "value": "",
                "type": "path"
              }
            ],
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "text",
                  "value": ""
                }
              ]
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Send a private message to another player.\n"
        }
      ]
    },
    {
      "info": {
        "name": "Analysis",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Get cloud evaluation of a position.",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/cloud-eval",
            "params": [
              {
                "name": "fen",
                "value": "r1bqkbnr/pppp1ppp/2n5/1B2p3/4P3/5N2/PPPP1PPP/RNBQK2R b KQkq - 3 3",
                "type": "query",
                "description": "X-FEN of the position"
              },
              {
                "name": "multiPv",
                "value": "",
                "type": "query",
                "description": "Number of variations"
              },
              {
                "name": "variant",
                "value": "",
                "type": "query",
                "description": "Variant"
              }
            ]
          },
          "docs": "Get the cached evaluation of a position, if available.\nOpening positions have more chances of being available. There are about 320 million positions in the database.\nUp to 5 variations may be available. Variants are supported.\nUse this endpoint to fetch a few positions here and there.\nIf you want to download a lot of positions, [get the full list](https://database.lichess.org/#evals) from our exported database.\n"
        }
      ]
    },
    {
      "info": {
        "name": "External engine",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List external engines",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/external-engine",
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Lists all external engines that have been registered for the user,\nand the credentials required to use them.\n"
        },
        {
          "info": {
            "name": "Create external engine",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/external-engine",
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Registers a new external engine for the user. It can then be selected\nand used on the analysis board.\nAfter registering, the provider should start waiting for analyis requests.\n"
        },
        {
          "info": {
            "name": "Get external engine",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/api/external-engine/:id",
            "params": [
              {
                "name": "id",
                "value": "eei_aTKImBJOnv6j",
                "type": "path",
                "description": "The external engine id."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Get properties and credentials of an external engine.\n"
        },
        {
          "info": {
            "name": "Update external engine",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://lichess.org/api/external-engine/:id",
            "params": [
              {
                "name": "id",
                "value": "eei_aTKImBJOnv6j",
                "type": "path",
                "description": "The external engine id."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            },
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Updates the properties of an external engine.\n"
        },
        {
          "info": {
            "name": "Delete external engine",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://lichess.org/api/external-engine/:id",
            "params": [
              {
                "name": "id",
                "value": "eei_aTKImBJOnv6j",
                "type": "path",
                "description": "The external engine id."
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Unregisters an external engine.\n"
        },
        {
          "info": {
            "name": "Analyse with external engine",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/external-engine/:id/analyse",
            "params": [
              {
                "name": "id",
                "value": "eei_aTKImBJOnv6j",
                "type": "path",
                "description": "The external engine id."
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "**Endpoint: `https://engine.lichess.ovh/api/external-engine/{id}/analyse`**\nRequest analysis from an external engine.\nResponse content is streamed as [newline delimited JSON](#description/streaming-with-nd-json).\nThe properties are based on the [UCI specification](https://backscattering.de/chess/uci/#engine).\nAnalysis stops when the client goes away, the requested limit\nis reached, or the provider goes away.\n"
        },
        {
          "info": {
            "name": "Acquire analysis request",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/external-engine/work",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "**Endpoint: `https://engine.lichess.ovh/api/external-engine/work`**\nWait for an analysis requests to any of the external engines that\nhave been registered with the given `secret`.\nUses long polling.\nAfter acquiring a request, the provider should immediately\n[start streaming the results](#tag/external-engine/POST/api/external-engine/work/{id}).\n"
        },
        {
          "info": {
            "name": "Answer analysis request",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/external-engine/work/:id",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "**Endpoint: `https://engine.lichess.ovh/api/external-engine/work/{id}`**\nSubmit a stream of analysis as [UCI output](https://backscattering.de/chess/uci/#engine-info).\n* The engine should always be in `UCI_Chess960` mode.\n* `UCI_AnalyseMode` enabled if available.\n* It produces `info` with at least:\n  - `depth`\n  - `multipv` (between 1 and 5)\n  - `score`\n  - `nodes`\n  - `time`\n  - `pv`\nThe server may close the connection at any time, indicating that\nthe requester has gone away and analysis should"
        }
      ]
    },
    {
      "info": {
        "name": "OAuth",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Request authorization code",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/oauth",
            "params": [
              {
                "name": "response_type",
                "value": "",
                "type": "query",
                "description": "Must be `code`."
              },
              {
                "name": "client_id",
                "value": "example.com",
                "type": "query",
                "description": "Arbitrary identifier that uniquely identifies your application."
              },
              {
                "name": "redirect_uri",
                "value": "",
                "type": "query",
                "description": "The absolute URL that the user should be redirected to with the authorization result."
              },
              {
                "name": "code_challenge_method",
                "value": "",
                "type": "query",
                "description": "Must be `S256`."
              },
              {
                "name": "code_challenge",
                "value": "",
                "type": "query",
                "description": "Compute `BASE64URL(SHA256(code_verifier))`."
              },
              {
                "name": "scope",
                "value": "",
                "type": "query",
                "description": "Space separated list of requested OAuth scopes, if any."
              },
              {
                "name": "username",
                "value": "",
                "type": "query",
                "description": "Hint that you want the user to log in with a specific Lichess username."
              },
              {
                "name": "state",
                "value": "",
                "type": "query",
                "description": "Arbitrary state that will be returned verbatim with the authorization result."
              }
            ]
          },
          "docs": "OAuth2 authorization endpoint.\nStart the OAuth2 Authorization Code Flow with PKCE by securely\ngenerating two random strings unique to each authorization\nrequest:\n\n* `code_verifier`\n* `state`\n\nStore these in session storage. Make sure not to reveal `code_verifier`\nto eavesdroppers. Do not show it in URLs, do not abuse `state` to store\nit, do not send it over insecure connections. However it is fine if\nthe user themselves can extract `code_verifier`, which will always be\npossible for fully client-"
        },
        {
          "info": {
            "name": "Obtain access token",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/token",
            "body": {
              "type": "form-urlencoded",
              "data": [
                {
                  "name": "grant_type",
                  "value": ""
                },
                {
                  "name": "code",
                  "value": ""
                },
                {
                  "name": "code_verifier",
                  "value": ""
                },
                {
                  "name": "redirect_uri",
                  "value": ""
                },
                {
                  "name": "client_id",
                  "value": ""
                }
              ]
            }
          },
          "docs": "OAuth2 token endpoint. Exchanges an authorization code for an access token.\n"
        },
        {
          "info": {
            "name": "Revoke access token",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://lichess.org/api/token",
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "Revokes the access token sent as Bearer for this request."
        },
        {
          "info": {
            "name": "Test multiple OAuth tokens",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://lichess.org/api/token/test"
          },
          "docs": "For up to 1000 OAuth tokens,\nreturns their associated user ID and scopes,\nor `null` if the token is invalid.\nThe method is `POST` so a longer list of tokens can be sent in the request body.\n"
        }
      ]
    },
    {
      "info": {
        "name": "Opening Explorer",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Masters database",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/masters",
            "params": [
              {
                "name": "fen",
                "value": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
                "type": "query",
                "description": "X-FEN of the root position"
              },
              {
                "name": "play",
                "value": "d2d4,d7d5,c2c4,c7c6,c4d5",
                "type": "query",
                "description": "Comma separated sequence of legal moves in UCI notation.\nPlay additional moves starting from `fen`.\nRequired to find an opening name, if `fen` is not an exact match\nfor a named position.\n"
              },
              {
                "name": "since",
                "value": "",
                "type": "query",
                "description": "Include only games from this year or later"
              },
              {
                "name": "until",
                "value": "",
                "type": "query",
                "description": "Include only games from this year or earlier"
              },
              {
                "name": "moves",
                "value": "",
                "type": "query",
                "description": "Number of most common moves to display"
              },
              {
                "name": "topGames",
                "value": "",
                "type": "query",
                "description": "Number of top games to display"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "**Endpoint: <https://explorer.lichess.org/masters>**\n\nExample: `curl https://explorer.lichess.org/masters?play=d2d4,d7d5,c2c4,c7c6,c4d5`\n"
        },
        {
          "info": {
            "name": "Lichess games",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/lichess",
            "params": [
              {
                "name": "variant",
                "value": "",
                "type": "query",
                "description": "Variant"
              },
              {
                "name": "fen",
                "value": "rnbqkbnr/ppp1pppp/8/3pP3/8/8/PPPP1PPP/RNBQKBNR b KQkq - 0 2",
                "type": "query",
                "description": "X-FEN or EPD of the root position"
              },
              {
                "name": "play",
                "value": "d2d4,d7d5,c2c4,c7c6,c4d5",
                "type": "query",
                "description": "Comma separated sequence of legal moves in UCI notation.\nPlay additional moves starting from `fen`.\nRequired to find an opening name, if `fen` is not an exact match\nfor a named position.\n"
              },
              {
                "name": "speeds",
                "value": "",
                "type": "query",
                "description": "Comma separated list of game speeds to filter by"
              },
              {
                "name": "ratings",
                "value": "",
                "type": "query",
                "description": "Comma separated list of ratings groups to filter by.\nEach group ranges from its value to the next higher\ngroup in the enum (`0` from 0 to 999, `1000` from 1000 to 1199,\n..., `2500` from 2500 to any rating above).\n"
              },
              {
                "name": "since",
                "value": "",
                "type": "query",
                "description": "Include only games from this month or later"
              },
              {
                "name": "until",
                "value": "",
                "type": "query",
                "description": "Include only games from this month or earlier"
              },
              {
                "name": "moves",
                "value": "",
                "type": "query",
                "description": "Number of most common moves to display"
              },
              {
                "name": "topGames",
                "value": "",
                "type": "query",
                "description": "Maximum number of top games to display.\n\nDue to the way banned users are handled internally, the response may\ncontain fewer games than expected.\n"
              },
              {
                "name": "recentGames",
                "value": "",
                "type": "query",
                "description": "Maximum number of recent games to display.\n\nDue to the way banned users are handled internally, the response may\ncontain fewer games than expected.\n"
              },
              {
                "name": "history",
                "value": "",
                "type": "query",
                "description": "Optionally retrieve history"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "**Endpoint: <https://explorer.lichess.org/lichess>**\n\nAggregated rated games from all Lichess players.\n\nExample: `curl https://explorer.lichess.org/lichess?variant=standard&speeds=blitz,rapid,classical&ratings=2200,2500&fen=rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR%20w%20KQkq%20-%200%201`\n"
        },
        {
          "info": {
            "name": "Player games",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/player",
            "params": [
              {
                "name": "player",
                "value": "revoof",
                "type": "query",
                "description": "Username or ID of the player"
              },
              {
                "name": "color",
                "value": "white",
                "type": "query",
                "description": "Look for games with *player* on the given side"
              },
              {
                "name": "variant",
                "value": "",
                "type": "query",
                "description": "Variant"
              },
              {
                "name": "fen",
                "value": "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1",
                "type": "query",
                "description": "X-FEN of the root position"
              },
              {
                "name": "play",
                "value": "d2d4,d7d5",
                "type": "query",
                "description": "Comma separated sequence of legal moves in UCI notation.\nPlay additional moves starting from `fen`.\nRequired to find an opening name, if `fen` is not an exact match\nfor a named position.\n"
              },
              {
                "name": "speeds",
                "value": "",
                "type": "query",
                "description": "Comma separated list of game speeds to look for"
              },
              {
                "name": "modes",
                "value": "",
                "type": "query",
                "description": "Comma separated list of modes"
              },
              {
                "name": "since",
                "value": "",
                "type": "query",
                "description": "Include only games from this month or later"
              },
              {
                "name": "until",
                "value": "",
                "type": "query",
                "description": "Include only games from this month or earlier"
              },
              {
                "name": "moves",
                "value": "",
                "type": "query",
                "description": "Number of most common moves to display"
              },
              {
                "name": "recentGames",
                "value": "",
                "type": "query",
                "description": "Number of recent games to display"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "**Endpoint: <https://explorer.lichess.org/player>**\n\nGames of a Lichess player.\n\nResponds with a stream of [newline delimited JSON](#description/streaming-with-nd-json). Will start indexing\non demand, immediately respond with the current results, and stream\nmore updates until indexing is complete. The stream is throttled\nand deduplicated. Empty lines may be sent to avoid timeouts.\n\nWill index new games at most once per minute, and revisit previously\nongoing games at most once every day.\n\nExample"
        },
        {
          "info": {
            "name": "OTB master game",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/masters/pgn/:gameId",
            "params": [
              {
                "name": "gameId",
                "value": "",
                "type": "path"
              }
            ],
            "auth": {
              "type": "oauth2",
              "flow": "authorization_code",
              "authorizationUrl": "https://lichess.org/oauth",
              "accessTokenUrl": "https://lichess.org/api/token",
              "credentials": {
                "clientId": "{{clientId}}",
                "clientSecret": "{{clientSecret}}"
              }
            }
          },
          "docs": "**Endpoint: `https://explorer.lichess.org/masters/pgn/{gameId}`**\n\nExample: `curl https://explorer.lichess.org/masters/pgn/aAbqI4ey`\n"
        }
      ]
    },
    {
      "info": {
        "name": "Tablebase",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "Tablebase lookup",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/standard",
            "params": [
              {
                "name": "fen",
                "value": "",
                "type": "query",
                "description": "X-FEN of the position. Underscores allowed."
              },
              {
                "name": "dtc",
                "value": "",
                "type": "query",
                "description": "When to query the tablebase for `dtc` values. The default is\n`auxiliary`, i.e., only when the position is not covered by one of the\nother tablebases.\n"
              }
            ]
          },
          "docs": "**Endpoint: <https://tablebase.lichess.org>**\n\nExample: `curl http://tablebase.lichess.org/standard?fen=4k3/6KP/8/8/8/8/7p/8_w_-_-_0_1`\n"
        },
        {
          "info": {
            "name": "Tablebase lookup for Atomic chess",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/atomic",
            "params": [
              {
                "name": "fen",
                "value": "",
                "type": "query",
                "description": "X-FEN of the position. Underscores allowed."
              }
            ]
          },
          "docs": "**Endpoint: <https://tablebase.lichess.org>**\n"
        },
        {
          "info": {
            "name": "Tablebase lookup for Antichess",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://lichess.org/antichess",
            "params": [
              {
                "name": "fen",
                "value": "",
                "type": "query",
                "description": "X-FEN of the position. Underscores allowed."
              }
            ]
          },
          "docs": "**Endpoint: <https://tablebase.lichess.org>**\n"
        }
      ]
    }
  ],
  "bundled": true
}