> ## Documentation Index
> Fetch the complete documentation index at: https://hedgeem-api.qeetoto.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List active tables

> Returns all currently active tables with per-table player counts and game
state. "Active" means the table's session row in `game_table_state` was
updated within the last 30 minutes.

**Public endpoint** — no authentication required. Used by the lobby to
populate the Live Tables section and the Players Online hero stat.

If Supabase is unavailable the endpoint returns an empty list with
`HTTP 200` — callers should treat an empty list as a graceful degradation,
not an error.

**Lobby behaviour:** the lobby polls this endpoint every 30 seconds and
re-renders the Live Tables grid. Join links deep-link to
`hedgeem-v6.qeetoto.com?tableId={tableId}`.




## OpenAPI

````yaml /openapi.yaml get /api/tables
openapi: 3.0.0
info:
  title: Texas Hedge'Em API
  version: 0.4.0
  description: >
    REST API for Texas Hedge'Em v5 — a player-vs-house poker odds game.


    Players place bets on the odds of multiple simultaneous poker hands

    at three betting stages: **Hole**, **Flop**, and **Turn**.

    The River card determines the winning hand and pays out winners.


    **Base URL:** `https://hedgeem-server.qeetoto.com`


    **Authentication:** All endpoints except `/api/health` and `GET /api/tables`

    require a Supabase JWT passed as a Bearer token in the `Authorization`
    header.

    See [Authentication](/authentication) for details.


    **Two-balance wallet model:** Every player has two separate balances:

    `accountBalance` (funds in their lobby wallet) and `seatBalance` (chips on
    the

    felt at a specific table). Sit deducts from account; Leave credits seat back
    to

    account; Top-up transfers account → seat during a session.
  contact:
    url: https://github.com/texashedgeem/hedgeem-v5
  license:
    name: MIT
servers:
  - url: https://hedgeem-server.qeetoto.com
    description: Production (Vercel)
  - url: http://localhost:3000
    description: Local development
security:
  - bearerAuth: []
paths:
  /api/tables:
    get:
      tags:
        - Tables
      summary: List active tables
      description: >
        Returns all currently active tables with per-table player counts and
        game

        state. "Active" means the table's session row in `game_table_state` was

        updated within the last 30 minutes.


        **Public endpoint** — no authentication required. Used by the lobby to

        populate the Live Tables section and the Players Online hero stat.


        If Supabase is unavailable the endpoint returns an empty list with

        `HTTP 200` — callers should treat an empty list as a graceful
        degradation,

        not an error.


        **Lobby behaviour:** the lobby polls this endpoint every 30 seconds and

        re-renders the Live Tables grid. Join links deep-link to

        `hedgeem-v6.qeetoto.com?tableId={tableId}`.
      operationId: listTables
      responses:
        '200':
          description: List of active tables
          content:
            application/json:
              schema:
                type: object
                required:
                  - tables
                  - totalActivePlayers
                properties:
                  tables:
                    type: array
                    items:
                      type: object
                      required:
                        - tableId
                        - playerCount
                        - gameState
                      properties:
                        tableId:
                          type: integer
                          description: Unique table identifier from `game_table_state`
                          example: 42
                        playerCount:
                          type: integer
                          description: Number of active players at this table
                          example: 2
                        gameState:
                          type: string
                          description: Current game state string (e.g. BETTING, DEALING)
                          example: BETTING
                  totalActivePlayers:
                    type: integer
                    description: Sum of playerCount across all active tables
                    example: 7
              example:
                tables:
                  - tableId: 42
                    playerCount: 2
                    gameState: BETTING
                  - tableId: 17
                    playerCount: 1
                    gameState: WAITING
                totalActivePlayers: 3
      security: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Supabase Auth JWT. Obtain via Supabase Auth sign-in.

````