---
title: "Rename a page, change its mode, or change who sees it"
description: "Any of name, mode, tableId and visibleTo."
canonical: "https://grid82.com/docs/builder-api/pages/update"
updated: "2026-11-13"
---

# Rename a page, change its mode, or change who sees it

`PATCH https://studio.grid82.app/v1/apps/{appId}/pages/{pageId}`

Any of name, mode, tableId and visibleTo.

A page has one mode for everyone: it cannot be locked for one role and a Template for another.

Requires the `pages:write` scope. Operation `pages.update`. MCP tool `pages_update`. CLI: `grid82 pages update` (`npx grid82`).

## Path parameters

| Name     | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `appId`  | string | yes      |             |
| `pageId` | string | yes      |             |

## Headers

| Name              | Type   | Required | Description                                                                                                                                                                                                                                                        |
| ----------------- | ------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `Idempotency-Key` | string | no       | Any unique string. Sending the same key with the same request again returns the first response (marked `Idempotency-Replayed: true`) instead of running it twice. Reusing it for a different request is refused with 409. Kept for 24 hours. Up to 255 characters. |

## Request body

| Field       | Type                    | Required | Description          |
| ----------- | ----------------------- | -------- | -------------------- |
| `name`      | string                  | no       | Up to 60 characters. |
| `kind`      | "declarative" or "code" | no       |                      |
| `mode`      | "locked" or "template"  | no       |                      |
| `tableId`   | string                  | no       | Up to 64 characters. |
| `visibleTo` | "\*" or string\[]       | no       |                      |

**Authorizations**

- `Authorization` (bearer, in header, required)

## Response

**200**: Success

- `data` (`object`, required)
- `data.id` (`string`, required, length: `1–64 chars`)
- `data.name` (`string`, required, length: `1–120 chars`)
- `data.kind` (`enum<string>`, required, one of: `declarative, code`)
- `data.mode` (`enum<string>`, required, one of: `locked, template, canvas`)
- `data.owner` (`enum<string>`, required, one of: `admin, user`)
- `data.ownerUserId` (`string`, length: `≤ 64 chars`)
- `data.tableId` (`string`, pattern: `^[a-z][a-z0-9_]{0,62}$`)
- `data.forkedFrom` (`string`, length: `≤ 64 chars`)
- `data.visibleTo` (`string | string[]`, required, default: `*`)
- `data.reads` (`object`)
- `data.reads.tables` (`string[]`, required, default: `[]`)
- `data.reads.fields` (`string[]`, required, default: `[]`)
- `data.reads.views` (`string[]`, required, default: `[]`)
- `data.bundleHash` (`string`, length: `≤ 128 chars`)
- `data.publishedVersion` (`integer`, range: `≥ 1`)
- `data.theme` (`object`)
- `data.theme.accent` (`string`, pattern: `^(?:#[0-9a-fA-F]{3,8}|oklch\([0-9.%\s/]{1,60}\))$`)
- `data.theme.radius` (`number`, range: `0–24`)
- `data.document` (`object`)
- `data.version` (`integer`, required, default: `1`, range: `≥ 1`)
- `data.updatedAt` (`string`, required)

```json
{
  "data": {
    "id": "<string>",
    "name": "<string>",
    "kind": "declarative",
    "mode": "locked",
    "owner": "admin",
    "ownerUserId": "<string>",
    "tableId": "<string>",
    "forkedFrom": "<string>",
    "visibleTo": "*",
    "reads": {
      "tables": [],
      "fields": [],
      "views": []
    },
    "bundleHash": "<string>",
    "publishedVersion": 123,
    "theme": {
      "accent": "<string>",
      "radius": 123.45
    },
    "document": null,
    "version": 1,
    "updatedAt": "<string>"
  }
}
```

**4XX**: Refused

- `error` (`object`, required)
- `error.code` (`enum<string>`, required, one of: `not_found, forbidden, unauthenticated, validation_failed, conflict, rate_limited, payment_required, not_implemented, internal`)
- `error.message` (`string`, required)
- `error.details` (`Record<string, unknown>`)

```json
{
  "error": {
    "code": "not_found",
    "message": "<string>",
    "details": {}
  }
}
```

**Example request**

```bash
curl --request PATCH \
  --url 'https://studio.grid82.app/v1/apps/<appId>/pages/<pageId>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "kind": "declarative",
  "mode": "locked",
  "tableId": "<string>",
  "visibleTo": "<string>"
}'
```
