> ## 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.

# List versions

> A Page's kept versions, newest first.

The version history that is still kept: every write adds one, and the oldest are pruned once you pass your plan's limit. The current version is never pruned.

## 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>

## Query parameters

<ParamField query="limit" type="number" default="20">
  Between 1 and 100.
</ParamField>

<ParamField query="cursor" type="number">
  The `next_cursor` from the previous response. Returns versions below it.
</ParamField>

## Response

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

<ResponseField name="versions" type="array">
  Newest first.

  <Expandable title="properties">
    <ResponseField name="version" type="integer">
      The version number. Numbers only go up and are never reused.
    </ResponseField>

    <ResponseField name="size_bytes" type="integer">
      Size of the HTML.
    </ResponseField>

    <ResponseField name="created_by_source" type="string">
      `api` for this API, `agent` for a `page` block in a message, `user` for the app.
    </ResponseField>

    <ResponseField name="change_note" type="string | null">
      The note sent with the write, if any.
    </ResponseField>

    <ResponseField name="content_sha256" type="string">
      SHA-256 of the HTML.
    </ResponseField>

    <ResponseField name="created_at" type="string">
      ISO 8601, UTC.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="next_cursor" type="integer | null">
  Pass it back as `cursor` for older versions. `null` when there are no more.
</ResponseField>

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

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

  const { versions } = 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",
      headers={"Authorization": f"Bearer {os.environ['MAC_KEY']}"},
  )

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

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "ok": true,
    "versions": [
      {
        "version": 4,
        "size_bytes": 2048,
        "created_by_source": "api",
        "change_note": "hourly",
        "content_sha256": "3a7bd3e2…",
        "created_at": "2026-09-21T07:00:00.000Z"
      },
      {
        "version": 3,
        "size_bytes": 2011,
        "created_by_source": "api",
        "change_note": "hourly",
        "content_sha256": "9d1e0f…",
        "created_at": "2026-09-21T06:00:00.000Z"
      }
    ],
    "next_cursor": null
  }
  ```
</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.                            |
| `429`  | `RATE_LIMITED`    | Over 300 reads per minute for this key. Wait for `retry_after_seconds`. |
