# Export A Page

`GET /pages/{pageId}/export/markdown`

Returns one page as markdown. When the page has attachments, the response is a ZIP containing the markdown and attachments.
## Authentication

Use one of the following authentication alternatives:

- **API token** (`bearerToken`) : Send a named API token in the Authorization header. Send it in the `Authorization: Bearer <token>` header.
- **Better Auth browser session** (`browserSession`) : Use the Better Auth session cookie from a signed-in browser session. Send it in the `better-auth.session_token` cookie.
## Token permissions

API tokens must include `pages:read`.
## Parameters

- `pageId` (path, required): The UUID of the page.
## Responses

### 200

The page as markdown, or a ZIP containing markdown and attachments.


### `text/markdown`

```text
"string"
```

### `application/zip`

```text
"string"
```

### 403

The API token is missing a required scope: pages:read.


### `application/json`

```json
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
```
