---
title: "Read a page's code"
description: "The current version unless `version` names an earlier one."
canonical: "https://grid82.com/docs/builder-api/pages/code-get"
updated: "2026-11-13"
---

# Read a page's code

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

The current version unless `version` names an earlier one.

Null when nothing has been saved yet.

Requires the `pages:read` scope. Operation `pages.code.get`. MCP tool `pages_code_get`. CLI: `grid82 pages code get` (`npx grid82`).

## Path parameters

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

## Query parameters

| Name      | Type    | Required | Description |
| --------- | ------- | -------- | ----------- |
| `version` | integer | no       |             |

**Authorizations**

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

## Response

**200**: Success

- `data` (`object | null`, required)
- `data.version` (`integer`, required)
- `data.author` (`string`, required)
- `data.note` (`string,null`, required)
- `data.at` (`string`, required)
- `data.source` (`string`, required)

```json
{
  "data": {
    "version": 123,
    "author": "<string>",
    "note": null,
    "at": "<string>",
    "source": "<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 GET \
  --url 'https://studio.grid82.app/v1/apps/<appId>/pages/<pageId>/code' \
  --header 'Authorization: Bearer <token>'
```
