Tic-Tac-Toe Play
The /tic-tac-toe/:game endpoint plays a move in an existing game using a REST method.
patchhttps://api.moxon.dev /v5/tic-tac-toe/:game
Try itpatch/v5/tic-tac-toe/:game
curl -X PATCH \ "https://api.moxon.dev/v5/tic-tac-toe/VWXYZ" \ -H "Content-Type: application/json" \ -d '{}'Send the request to see the response here.
gamestringrequiredThe game identifier (URL parameter)
usernamestringrequiredThe username making the move
movestringrequiredThe move played (e.g.,
1-1,2-2,3-3)sessionstringrequiredThe user's session identifier
Good to know
The game parameter is part of the URL path. The other 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
If parameters are missing or invalid, the API will return an error:
- 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
- post/v5/tic-tac-toe - Main game endpoint for making moves
- delete/v5/tic-tac-toe/:game - Forfeit a game
- post/v5/tic-tac-toe/fetch - Retrieve current game information
- post/v5/tic-tac-toe/list - List all public games
Last updated on May 25, 2026