The lobby exposes two list endpoints and one player-table lookup.Documentation 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.
GET /api/tables returns all waiting public tables with no filtering. GET /api/lobby/tables targets the in-app lobby browser and supports optional query filters for seat availability and name search. Both list endpoints return the same response shape — an array of enriched table objects under the tables key. GET /api/player/table is a lightweight lookup that tells the caller which table (if any) they are currently seated at or observing.
All three endpoints require a valid session. Pass x-session-id and x-player-id in every request header.
GET /api/tables
Returns all public tables whose status iswaiting (game not yet started). No query parameters are accepted — use GET /api/lobby/tables for filtered browsing.
Required headers
| Header | Description |
|---|---|
x-session-id | Session token from login |
x-player-id | Authenticated player’s UUID |
Success. Returns the full table list.
Missing or invalid session. Body:
{ "error": "..." }.GET /api/lobby/tables
The public lobby browser. Only returns tables withvisibility: "public". Supports optional query parameters to filter the result set; filters compose — both can be used at the same time.
Required headers
| Header | Description |
|---|---|
x-session-id | Session token from login |
x-player-id | Authenticated player’s UUID |
When set to
"true", only tables with at least one open seat are returned. Omit or pass any other value to include full tables.Case-insensitive substring match against the table name. Tables with
name: null are excluded when a non-empty search term is provided.GET /api/tables — { tables: [...] } with the same per-table fields. The canJoin field is computed relative to the authenticated player’s friendship with each host.
Example — filter by seat availability and name
| Status | Meaning |
|---|---|
200 | Body: { tables: [...] } — filtered list of public waiting tables |
401 | Missing or invalid session |
GET /api/lobby/tables computes canJoin relative to the authenticated player: for friends-only join-policy tables, the flag is true only when the requester is a friend of the host and a seat is available. GET /api/tables does not receive the requester identity and always sets canJoin: false for friends-only tables.GET /api/player/table
Returns thetableId of the table the authenticated player is currently seated at or observing. Returns null if the player is not at any table. Tables whose game phase is game_over are excluded.
Required headers
| Header | Description |
|---|---|
x-session-id | Session token from login |
x-player-id | Authenticated player’s UUID |
Missing or invalid session. Body:
{ "error": "..." }.