API Documentation

Chess Pastebin features an API endpoint so that other software out there could add games to the website. The get an API account please send an email to toomasr@gmail.com and you will receive an API key.

Adding games

The only endpoint is for adding new games to the system. On success the game is added and the ID for the game is returned. This endpoint is mainly for chess software out there that would like to support uploading games to a system where end users can share the games with their friends for a quick viewing.

To make debugging easier feel free to visit the API Sandbox page with a pre-filled form to play around with the API.

Endpoint Information

URL https://www.chesspastebin.com/api/add/
Method POST
Returns Prints out the ID (integer). You can view the game at https://www.chesspastebin.com/view/ID

Endpoint Parameters

apikey Your API key Required
pgn The PGN of the game Required
name Name of the uploader Optional. Defaults to Noname. Shown on the actual game page.
sandbox true | false Optional. Defaults to false. In case of true will not add the post but will do the regular validation of the request. On success will print out 42 as the ID.

Happy hacking!