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

# Get a version

> One kept version of a Page, with its HTML on request.

Read a specific version, for example to diff two runs of a scheduled report, or to fetch the HTML you want to [roll back](/api-reference/pages/rollback-page) to.

## Authorization

<ParamField header="Authorization" type="string" required>
  `Bearer mac_live_…`
</ParamField>

## Path parameters

<ParamField path="page_id" type="string" required>
  The Page's id.
</ParamField>

<ParamField path="version" type="integer" required>
  A positive integer. Anything else is `422 VALIDATION_FAILED`.
</ParamField>

## Query parameters

<ParamField query="include" type="string">
  `content` to include the HTML.
</ParamField>

## Response

<ResponseField name="ok" type="boolean">
  `true` on success.
</ResponseField>

<ResponseField name="version" type="object">
  `version`, `size_bytes`, `created_by_source`, `change_note`, `content_sha256` and `created_at`, as in [List versions](/api-reference/pages/list-page-versions).
</ResponseField>

<ResponseField name="content" type="string">
  The HTML. Only with `include=content`, and at the top level, not inside `version`.
</ResponseField>

<RequestExample>
  ```bash curl theme={null}
  curl "https://app.my-aichatbot.com/api/v1/pages/$PAGE_ID/versions/3?include=content" \
    -H "Authorization: Bearer $MAC_KEY"
  ```

  ```javascript Node.js theme={null}
  const res = await fetch(
    `https://app.my-aichatbot.com/api/v1/pages/${pageId}/versions/3?include=content`,
    { headers: { Authorization: `Bearer ${process.env.MAC_KEY}` } }
  )

  const { version, content } = await res.json()
  ```

  ```python Python theme={null}
  import os, requests

  res = requests.get(
      f"https://app.my-aichatbot.com/api/v1/pages/{page_id}/versions/3",
      headers={"Authorization": f"Bearer {os.environ['MAC_KEY']}"},
      params={"include": "content"},
  )

  content = res.json()["content"]
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "ok": true,
    "version": {
      "version": 3,
      "size_bytes": 2011,
      "created_by_source": "api",
      "change_note": "hourly",
      "content_sha256": "9d1e0f…",
      "created_at": "2026-09-21T06:00:00.000Z"
    },
    "content": "<!doctype html>…"
  }
  ```

  ```json 404 Pruned or never existed theme={null}
  {
    "ok": false,
    "error": { "code": "VERSION_NOT_FOUND", "message": "No such version." }
  }
  ```
</ResponseExample>

## Errors

| Status | Code                | Meaning                                                                 |
| ------ | ------------------- | ----------------------------------------------------------------------- |
| `401`  | `INVALID_API_KEY`   | Missing, broken, or revoked.                                            |
| `404`  | `NOT_FOUND`         | No live Page with that id in this workspace.                            |
| `404`  | `VERSION_NOT_FOUND` | That version was pruned, or never existed.                              |
| `422`  | `VALIDATION_FAILED` | `version` is not a positive integer.                                    |
| `429`  | `RATE_LIMITED`      | Over 300 reads per minute for this key. Wait for `retry_after_seconds`. |
