Tic-Tac-Toe Play
The /tic-tac-toe/play endpoint plays a move in a game. If the game identifier does not exist, the game is created.
Changed in 6.0.0
This endpoint moved from PATCH to POST, and its identifier left the URL: game is now sent in the JSON body. PATCH and DELETE no longer exist anywhere in the API.
curl -X POST \ "https://api.moxon.dev/v6/tic-tac-toe/play" \ -H "Content-Type: application/json" \ -d '{}'Send the request to see the response here.
gamestringrequiredThe game identifier. If the game does not exist, it is created
usernamestringrequiredThe username making the move
movestringrequiredThe move played in
row-columnformat (e.g.,1-1,2-2,3-3), see Move FormatsessionstringrequiredThe user's session identifier
Good to know
All parameters are sent as a JSON body with Content-Type: application/json.
messagestringStatus 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
While the game goes on, the response only contains message (Move sent successfully). The winner, loser and tie fields are only present when the move ends the game.
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 - 400
Please provide a valid session ID (&session={ID})Thesessionparameter is missing - 400
Please provide a game ID (&game={ID})Thegameparameter is missing - 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
- Online Tic-Tac-Toe - How a game works and migrating from v4 and v5
- post/v6/tic-tac-toe/forfeit - Forfeit a game
- post/v6/tic-tac-toe/fetch - Retrieve current game information
- post/v6/tic-tac-toe/list - List all public games
Last updated on October 17, 2026