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

# Health

> Liveness and session status endpoints

## Service health

```
GET /health
```

The one liveness probe for the whole service. **No authentication required** — infra health checks hit it, and it carries no game data.

```json theme={null}
{
  "status": "ok"
}
```

| Field    | Type   | Description                       |
| -------- | ------ | --------------------------------- |
| `status` | string | Always `"ok"` if the server is up |

Everything *about* a session (ids, matchup, score, liveness) is behind authenticated endpoints: live session ids come from the [sessions catalog](/api-reference/catalog), and per-session status from the read below. The sports the feed covers are listed in the [Sports overview](/sports/overview) — they are a property of the product, not of a deployment, so the probe doesn't echo them.

***

## Session health

```
GET /api/health/{session}
```

Session-addressed like the [WebSocket](/api-reference/websocket) and [history](/api-reference/history) reads: the session id alone is the address — no sport prefix, the server resolves the session's sport. The response is **one fixed schema for every sport**: `score` is the only game-state field. Full game state in the sport's own vocabulary (clock, period, inning, …) is carried by the WebSocket and history state snapshots, not by this monitoring read.

### Authentication

Required: Bearer token or `?token=` query parameter — see [Authentication](/authentication). Any valid account passes; there is no role or entitlement check (health is coarse liveness, not the feed itself).

### Error responses

| Status | Condition                                                                        |
| ------ | -------------------------------------------------------------------------------- |
| `401`  | Missing token (`"authentication required"`) or invalid token (`"invalid token"`) |
| `404`  | Invalid session id format (answered before auth), or no such session             |

### Response

```json theme={null}
{
  "status": "ok",
  "matchup": { "a": "Brazil", "b": "Argentina" },
  "phase": "open",
  "sport": "soccer",
  "league": "wc",
  "score": { "a": 1, "b": 0 },
  "scoutDark": false,
  "scoutLastSeenAgeS": 4.2
}
```

| Field               | Type    | Description                                                                                                                                      |
| ------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| `status`            | string  | Always `"ok"` if the server is up                                                                                                                |
| `matchup`           | object  | Display names for the session — `{ a: string, b: string }`                                                                                       |
| `phase`             | string  | Session lifecycle phase — `"open"` (live, accepting presses) or `"closed"` (sealed)                                                              |
| `sport`             | string  | The session's sport slug — lets a caller holding only the session id resolve its sport without a full [`/history`](/api-reference/history) fetch |
| `league`            | string  | The session's league slug (see [league slugs](/api-reference/catalog#league-slugs))                                                              |
| `score`             | object  | Current derived score — `{ a: number, b: number }`                                                                                               |
| `scoutDark`         | boolean | `true` if the scout's heartbeat has not been seen recently                                                                                       |
| `scoutLastSeenAgeS` | number  | Seconds since the server last heard from the scout (a press or a heartbeat). Useful for a "synced N seconds ago" display                         |

<Note>
  `scoutLastSeenAgeS` is a single point-in-time reading. For continuous liveness updates, subscribe to the WebSocket and watch for `scout_status` frames.
</Note>
