🎮 Beta Gamer

Webhooks — chess

Chess-specific webhook events fired during live sessions, in addition to the standard events.

Events

EventWhen it fires
chess.checkA king is placed in check
chess.promotionA pawn reaches the back rank and is promoted
chess.castleA castling move is executed
chess.afk_warningActive player has been idle for 60 s — 30 s left before forfeit
chess.afk_timeoutActive player did not move within 90 s and forfeited

chess.check

FieldTypeDescription
attackingPlayerIdstringPlayer ID who delivered the check
movestringUCI move that caused the check, e.g. "f3g5+"
{ "event": "chess.check", "data": { "attackingPlayerId": "user_123", "move": "f3g5+" } }

chess.promotion

FieldTypeDescription
playerIdstring"q" | "r" | "b" | "n"
fromstringOrigin square, e.g. "e7"
tostringDestination square, e.g. "e8"
promotedTostring"q" (queen) | "r" (rook) | "b" (bishop) | "n" (knight)
{ "event": "chess.promotion", "data": { "playerId": "user_123", "from": "e7", "to": "e8", "promotedTo": "q" } }

chess.castle

FieldTypeDescription
playerIdstringPlayer who castled
sidestring"kingside" | "queenside"
{ "event": "chess.castle", "data": { "playerId": "user_123", "side": "kingside" } }

chess.afk_warning

Fired 60 seconds after the last move when the active player has not acted. The player has 30 seconds remaining before automatic forfeit. Only fires when afkTimeoutEnabled is true.

FieldTypeDescription
playerIdstringPlayer ID who is AFK
secondsRemainingnumberSeconds until automatic forfeit (always 30)
{ "event": "chess.afk_warning", "data": { "playerId": "user_123", "secondsRemaining": 30 } }

chess.afk_timeout

Fired when the 90-second AFK limit is reached. The game ends immediately — a game.ended event follows with reason: "afk_timeout".

FieldTypeDescription
forfeitedPlayerIdstringPlayer ID who was forfeited
winnerIdstringPlayer ID who wins by default
{ "event": "chess.afk_timeout", "data": { "forfeitedPlayerId": "user_123", "winnerId": "user_456" } }
Beta Gamer GaaS API — questions? support@beta-gamer.com