Skip to content
moxon home

Tic-Tac-Toe Forfeit

The /tic-tac-toe/:game endpoint forfeits (abandons) a game.

deletehttps://api.moxon.dev/v5/tic-tac-toe/:game
Try itdelete/v5/tic-tac-toe/:game

Parameters

  • gamestringrequired

    The game identifier (URL parameter)

  • usernamestringrequired

    The username forfeiting

  • sessionstringrequired

    The 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.

Response Fields

  • messagestring

    Confirmation of the forfeit

  • winnerstring

    Username of the winner (opponent)

  • loserstring

    Username of the player who forfeit

Code Examples

Error Handling

If parameters are missing or invalid, the API will return an error:

  • 400Session ID mismatchSession doesn't match the player