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

# Update page details

> Rename a Page, change its slug or visibility, or set its description. Content stays as it is.

Change a Page's details without adding a version. Needs a key with **Pages write** turned on, and the Page must belong to the key's bot. To change the HTML, use [Publish a new version](/api-reference/pages/put-page-content).

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

## Body

Send at least one field. Fields you leave out are left alone.

<ParamField body="title" type="string">
  1 to 150 characters.
</ParamField>

<ParamField body="description" type="string | null">
  Up to 300 characters. `null` clears it.
</ParamField>

<ParamField body="slug" type="string">
  A new URL name. The old slug keeps working as a redirect to the new one, and stays reserved for this Page.
</ParamField>

<ParamField body="visibility" type="string">
  `private` or `public`. Takes effect on the next request to the Page.
</ParamField>

## Response

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

<ResponseField name="page" type="object">
  The updated Page. Same fields as [Get a page](/api-reference/pages/get-page).
</ResponseField>

<RequestExample>
  ```bash curl theme={null}
  curl -X PATCH "https://app.my-aichatbot.com/api/v1/pages/$PAGE_ID" \
    -H "Authorization: Bearer $MAC_KEY" \
    -H "Content-Type: application/json" \
    -d '{ "visibility": "public", "slug": "sales-report-2026" }'
  ```

  ```javascript Node.js theme={null}
  await fetch(`https://app.my-aichatbot.com/api/v1/pages/${pageId}`, {
    method: 'PATCH',
    headers: {
      Authorization: `Bearer ${process.env.MAC_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ visibility: 'public', slug: 'sales-report-2026' })
  })
  ```

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

  requests.patch(
      f"https://app.my-aichatbot.com/api/v1/pages/{page_id}",
      headers={"Authorization": f"Bearer {os.environ['MAC_KEY']}"},
      json={"visibility": "public", "slug": "sales-report-2026"},
  )
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "ok": true,
    "page": {
      "id": "9b3f11c2-…",
      "slug": "sales-report-2026",
      "title": "Sales report",
      "visibility": "public",
      "current_version": 4,
      "url": "https://acme.my-aichatbot-space.com/sales-report-2026"
    }
  }
  ```

  ```json 409 Slug taken theme={null}
  {
    "ok": false,
    "error": { "code": "SLUG_TAKEN", "message": "That slug is invalid or already in use in this workspace." }
  }
  ```
</ResponseExample>

Sending the values the Page already has is a no-op: nothing is written and `updated_at` does not move.

## Errors

| Status | Code                   | Meaning                                                                  |
| ------ | ---------------------- | ------------------------------------------------------------------------ |
| `401`  | `INVALID_API_KEY`      | Missing, broken, or revoked.                                             |
| `403`  | `PAGES_WRITE_DISABLED` | Turn on **Pages write** for this key.                                    |
| `403`  | `FORBIDDEN_CHATBOT`    | The Page belongs to another bot.                                         |
| `404`  | `NOT_FOUND`            | No live Page with that id in this workspace.                             |
| `409`  | `SLUG_TAKEN`           | The new slug is in use, retired, or not valid.                           |
| `422`  | `VALIDATION_FAILED`    | Empty body or a bad field.                                               |
| `429`  | `RATE_LIMITED`         | Over 120 writes per minute for this key. Wait for `retry_after_seconds`. |
| `500`  | `PERSIST_FAILED`       | We could not store the change. Safe to retry.                            |
