Webhooks — chess
Chess-specific webhook events fired during live sessions, in addition to the standard events.
Events
| Event | When it fires |
|---|---|
chess.check | A king is placed in check |
chess.promotion | A pawn reaches the back rank and is promoted |
chess.castle | A castling move is executed |
chess.afk_warning | Active player has been idle for 60 s — 30 s left before forfeit |
chess.afk_timeout | Active player did not move within 90 s and forfeited |
chess.check
| Field | Type | Description |
|---|---|---|
attackingPlayerId | string | Player ID who delivered the check |
move | string | UCI move that caused the check, e.g. "f3g5+" |
{ "event": "chess.check", "data": { "attackingPlayerId": "user_123", "move": "f3g5+" } }chess.promotion
| Field | Type | Description |
|---|---|---|
playerId | string | "q" | "r" | "b" | "n" |
from | string | Origin square, e.g. "e7" |
to | string | Destination square, e.g. "e8" |
promotedTo | string | "q" (queen) | "r" (rook) | "b" (bishop) | "n" (knight) |
{ "event": "chess.promotion", "data": { "playerId": "user_123", "from": "e7", "to": "e8", "promotedTo": "q" } }chess.castle
| Field | Type | Description |
|---|---|---|
playerId | string | Player who castled |
side | string | "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.
| Field | Type | Description |
|---|---|---|
playerId | string | Player ID who is AFK |
secondsRemaining | number | Seconds 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".
| Field | Type | Description |
|---|---|---|
forfeitedPlayerId | string | Player ID who was forfeited |
winnerId | string | Player 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