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

# Scores

> Query attention scores and time-series history.

## Get current score

```bash theme={null}
GET /v1/sessions/:id/score
```

**Response**

```json theme={null}
{
  "sessionId": "sess_8xK2mP9q",
  "score": 94,
  "updatedAt": "2026-04-28T14:46:21Z"
}
```

## Score history

```bash theme={null}
GET /v1/sessions/:id/scores
```

Returns the score at each point in the session, useful for charting attention over time.

**Response**

```json theme={null}
{
  "sessionId": "sess_8xK2mP9q",
  "history": [
    { "score": 88, "timestamp": "2026-04-28T14:32:08Z" },
    { "score": 76, "timestamp": "2026-04-28T14:33:10Z" },
    { "score": 94, "timestamp": "2026-04-28T14:34:05Z" }
  ]
}
```

## Aggregate scores

```bash theme={null}
GET /v1/scores
```

**Query parameters**

| Param     | Type   | Description                |
| --------- | ------ | -------------------------- |
| `groupBy` | string | `page`, `cohort`, `userId` |
| `metric`  | string | `avg`, `p50`, `p95`        |
| `window`  | string | `1h`, `24h`, `7d`, `30d`   |

**Response**

```json theme={null}
{
  "groups": [
    { "key": "/dashboard", "avg": 81, "p50": 84, "sessions": 412 },
    { "key": "/onboarding", "avg": 62, "p50": 65, "sessions": 98 }
  ]
}
```
