> ## 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 page by slug

> Read a Page by the slug in its URL, including a slug it had before a rename.

The read half of the by-slug handle. Resolves the Page that holds this slug now, or the Page that held it before a rename, so a job that only knows its slug can check what is live. The response carries the Page's current slug.

## Authorization

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

## Path parameters

<ParamField path="slug" type="string" required>
  1 to 63 lowercase letters, digits and dashes. Anything else is `422 VALIDATION_FAILED`.
</ParamField>

## Query parameters

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

## Response

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

<ResponseField name="page" type="object">
  The Page, with `content` when you asked for it. Same fields as [Get a page](/api-reference/pages/get-page).
</ResponseField>

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

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

  const { page } = await res.json()
  ```

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

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

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

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "ok": true,
    "page": {
      "id": "9b3f11c2-…",
      "slug": "sales-report",
      "title": "Sales report",
      "description": null,
      "visibility": "private",
      "chatbot_id": "c1a2…",
      "conversation_id": null,
      "current_version": 4,
      "version_count": 4,
      "total_bytes": 8192,
      "disabled_reason": null,
      "created_at": "2026-09-21T03:00:00.000Z",
      "updated_at": "2026-09-21T07:00:00.000Z",
      "url": "https://app.my-aichatbot.com/pages/view/acme/sales-report",
      "content": "<!doctype html>…"
    }
  }
  ```

  ```json 404 Not found theme={null}
  {
    "ok": false,
    "error": { "code": "NOT_FOUND", "message": "No page with that slug in this workspace." }
  }
  ```
</ResponseExample>

## Errors

| Status | Code                | Meaning                                                                 |
| ------ | ------------------- | ----------------------------------------------------------------------- |
| `401`  | `INVALID_API_KEY`   | Missing, broken, or revoked.                                            |
| `404`  | `NOT_FOUND`         | No live Page holds or held this slug.                                   |
| `422`  | `VALIDATION_FAILED` | Bad slug.                                                               |
| `429`  | `RATE_LIMITED`      | Over 300 reads per minute for this key. Wait for `retry_after_seconds`. |
