Online Tic-Tac-Toe
The /tic-tac-toe endpoint allows playing and storing an online Tic-Tac-Toe game. Games are stored for 1 hour and support both public and private modes.
curl -X POST \ "https://api.moxon.dev/v4/tic-tac-toe" \ -H "Content-Type: application/json" \ -d '{}'Send the request to see the response here.
usernamestringrequiredThe username making the move
movestringrequiredThe move played in
row-columnformat (e.g.,1-1,2-2,3-3)sessionstringrequiredThe user's session identifier
gamestringrequiredThe game identifier for connection. If the game does not exist, it will be created
The board is a 3x3 grid with positions numbered as follows:
1-1 | 1-2 | 1-3
----|-----|----
2-1 | 2-2 | 2-3
----|-----|----
3-1 | 3-2 | 3-3messagestringStatus message about the move
winnerstring|nullUsername of the winner (if game is over)
loserstring|nullUsername of the loser (if game is over)
tiebooleanWhether the game ended in a tie
- 429
Global rate limit exceeded.Global API rate limit reached - 429
You have exceeded the limit of X requests per hour.Hourly IP/token limit reached - 400
Rate limit exceeded. Try again in X seconds.Per-user short-window limit - 400
Invalid move. Please provide a valid move (e.g., 1-1, 2-2, 3-3).Invalid move format - 400
Game is full, you can only watch.Game already has two players - 400
Please wait for the other player to make a move.Not your turn - 400
Move already made. Please choose a different move.Cell already occupied - 400
Session ID mismatchSession doesn't match the player
If parameters are missing or invalid, the API will return an error:
- 400
Please provide a username (?username={username})Theusernameparameter is missing - 400
Please provide a valid move (&move={move})Themoveparameter is missing or invalid - 400
Please provide a valid session ID (&session={ID})Thesessionparameter is missing or invalid - 400
Please provide a valid game ID (&game={ID})Thegameparameter is missing or invalid
When a game is over, the request will return the winner and loser names, as well as whether there is a tie.
- post/v4/tic-tac-toe/fetch - Retrieve current game information
- post/v4/tic-tac-toe/list - List all public games
- patch/v4/tic-tac-toe/:game - Play a move
- delete/v4/tic-tac-toe/:game - Forfeit a game
Last updated on April 21, 2026