> For the complete documentation index, see [llms.txt](https://docs.monolithforensics.com/monolith/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.monolithforensics.com/monolith/monolith-api/notes-api/get-note-versions.md).

# Get Note Versions

Every time a note's body is created, replaced, or appended to, Monolith records a version snapshot. This endpoint retrieves a note's version history — useful for audit trails and for recovering earlier content.

```http
GET /v1/notes/{uuid}/versions
```

## Path parameters

| Parameter | Description                              |
| --------- | ---------------------------------------- |
| `uuid`    | UUID of the note whose versions to list. |

## Query parameters

All optional.

| Parameter         | Type    | Default | Description                                                                                                       |
| ----------------- | ------- | ------- | ----------------------------------------------------------------------------------------------------------------- |
| `version_uuid`    | string  | —       | Return a single version by its UUID.                                                                              |
| `include_content` | boolean | `false` | Include each version's HTML body (`note_data`).                                                                   |
| `search`          | string  | —       | Full-text search within version text. Matching versions include a `snippets` array of excerpts around each match. |
| `sort_by`         | string  | —       | `created_on`.                                                                                                     |
| `sort_dir`        | string  | `asc`   | `asc` or `desc`.                                                                                                  |
| `page`            | number  | `1`     | Page number (1-based).                                                                                            |
| `page_size`       | number  | `3000`  | Results per page, max `3000`.                                                                                     |

## Response — `200 OK`

```json
{
  "data": [
    {
      "uuid": "a3bb189e-8bf9-3888-9912-ace4e6543002",
      "note_uuid": "0f8fad5b-d9cb-469f-a165-70867728950e",
      "created_on": "2026-08-03T14:32:11.482Z",
      "note_data": "<p>Imaging started at 13:05 UTC.</p><p><strong>14:32 UTC</strong> — Imaging completed.</p>",
      "created_by": {
        "user_id": 12,
        "email": "api-user@example.com",
        "first_name": "API",
        "last_name": "User",
        "full_name": "API User",
        "title": "Integration"
      },
      "linked_case": {
        "case_id": 42,
        "uuid": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
        "case_number": "2026-0042",
        "case_name": "Acme Corp Investigation"
      }
    }
  ],
  "page": 1,
  "next_page": null,
  "page_size": 3000,
  "total": 3
}
```

* `note_data` is only present when `include_content=true`.
* `snippets` is only present on `search` queries.

## Examples

### List a note's version history (newest first)

```python
response = session.get(
    f"{BASE_URL}/notes/0f8fad5b-d9cb-469f-a165-70867728950e/versions",
    params={"sort_by": "created_on", "sort_dir": "desc"},
)
for version in response.json()["data"]:
    author = version["created_by"]["full_name"] if version["created_by"] else "unknown"
    print(f"{version['created_on']}  {version['uuid']}  by {author}")
```

### Recover an earlier version's content

```python
note_uuid = "0f8fad5b-d9cb-469f-a165-70867728950e"

# Fetch a specific version with its body
version = session.get(f"{BASE_URL}/notes/{note_uuid}/versions", params={
    "version_uuid": "a3bb189e-8bf9-3888-9912-ace4e6543002",
    "include_content": "true",
}).json()["data"][0]

# Restore it by writing the old body back to the note
# (this itself records a new version, so nothing is lost)
session.patch(f"{BASE_URL}/notes/{note_uuid}", json={
    "note_data": version["note_data"],
}).raise_for_status()
```

### Find which version introduced a phrase

```python
response = session.get(f"{BASE_URL}/notes/{note_uuid}/versions", params={
    "search": "write blocker",
    "sort_dir": "asc",
})
versions = response.json()["data"]
if versions:
    first = versions[0]
    print(f"First mentioned {first['created_on']} in version {first['uuid']}")
    for snippet in first.get("snippets", []):
        print(f"  ...{snippet}...")
```

## Errors

| Status | Body                                                       | Cause                        |
| ------ | ---------------------------------------------------------- | ---------------------------- |
| `400`  | `{"message": "Invalid query parameters", "errors": [...]}` | Bad parameter type or value. |
| `401`  | `Unauthorized`                                             | Missing or invalid API key.  |
