Blocking prevents the blocked player from sending friend requests or game invitations to you. Any existing accepted friendship or pending friend request between the two players — in either direction — is automatically removed when a block is created. After unblocking, the players must re-add each other as friends; the previous friendship is not restored. All blocking endpoints require theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/Antonelli-Tech-Solutions/spades/llms.txt
Use this file to discover all available pages before exploring further.
x-session-id and x-player-id request headers.
Block a Player
POST /api/players/:playerId/block
Blocks the specified player. If any friendship or pending friend request exists between the two players, it is removed. If the players were friends and either hosted a friends-only table, a TABLE_REMOVED notification is sent to the other player’s personal notification channel for each such table.
UUID of the player to block.
x-session-id, x-player-id
Example request
Blocking is idempotent. If the target player is already blocked, the request succeeds silently with
201 — no error is returned and no side effects are re-applied.- Any accepted friendship between the two players is deleted.
- Any pending friend request in either direction is deleted.
- If either player hosted a friends-only table,
TABLE_REMOVEDis sent to the other player’s personal notification channel for each such table.
| Status | Meaning |
|---|---|
201 | Player blocked. Existing friendship and pending requests removed. |
400 | :playerId is not a valid UUID, or you are attempting to block yourself |
401 | Missing or invalid session |
404 | Target player not found |
Unblock a Player
DELETE /api/players/:playerId/block
Unblocks the specified player. After unblocking, both players can send friend requests to each other again. The previous friendship is not automatically restored — they must re-add each other.
UUID of the player to unblock.
x-session-id, x-player-id
Example request
| Status | Meaning |
|---|---|
200 | Player unblocked successfully |
400 | :playerId is not a valid UUID |
401 | Missing or invalid session |
404 | Block record not found — this player was not blocked |
List Blocked Players
GET /api/players/blocked
Returns all players that the authenticated player has blocked, ordered by most recently blocked first.
Headers: x-session-id, x-player-id
Example request
| Status | Meaning |
|---|---|
200 | Body: { blocked: [{ playerId, username, blockedAt }] } — ordered most recently blocked first |
401 | Missing or invalid session |
Effect on Other Endpoints
When either player has blocked the other, the friend request, accept, and decline endpoints (
POST /api/friends/request, POST /api/friends/accept, POST /api/friends/decline) all return 403. The block check is bidirectional — it applies regardless of which player placed the block.