Challenges

Create a challenge

Changed on

Challenge someone to play. The targeted player can choose to accept or decline. If the challenge is accepted, you will be notified on the event stream that a new game has started. The game ID will be the same as the challenge ID. Challenges for realtime games (not correspondence) expire after 20s if not accepted. To prevent that, use the keepAliveStream flag described below.

post/api/challenge/{username}

Request

  • Base URL
    https://lichess.org
  • URL
    https://lichess.org/api/challenge/{username}
  • Auth
    OAuth 2
    Authorization code: https://lichess.org/oauth
    Token URL: https://lichess.org/api/token scopes: challenge:write, bot:play, board:play

Path parameters

usernamestring required
Example:LeelaChess

Request body application/x-www-form-urlencoded

OR
OR

Example request

{
  "clock.limit": 300,
  "clock.increment": 1
}

Response

The challenge was successfully created.

idstring required
urlstring uri required
status'created' | 'offline' | 'canceled' | 'declined' | 'accepted' required
ratedboolean required
speed'ultraBullet' | 'bullet' | 'blitz' | 'rapid' | 'classical' | 'correspondence' required
color'white' | 'black' | 'random' required
finalColor'white' | 'black'
direction'in' | 'out'
initialFenstring
rematchOfstring

Changes

    • info

      the response property // became required for the status

    • info

      the response property // became required for the status

    • info

      the response property // became required for the status