---
title: "Read a page's code"
description: "The current version of a page you can open, or an earlier one by number."
canonical: "https://grid82.com/docs/app-api/my/pages-code-get"
updated: "2026-11-13"
---

# Read a page's code

`GET https://your-suite.grid82.app/your-app/v1/pages/{pageId}/code`

The current version of a page you can open, or an earlier one by number.

> **Note: Generic contract**
>
> Your own version of this operation, with your tables and the fields you can read, is in
> your app's document: `https://{suite}.grid82.app/{app}/v1/openapi.json`, behind your credential.
> [Why each person gets their own](/docs/start/studio-and-runtime#why-an-app-has-an-api-of-its-own).

Null when nothing has been saved yet.

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

## Path parameters

| Name     | Type   | Required | Description |
| -------- | ------ | -------- | ----------- |
| `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://your-suite.grid82.app/your-app/v1/pages/<pageId>/code' \
  --header 'Authorization: Bearer <token>'
```
