---
title: "Download a page data file"
method: GET
path: "/api/{ns}/{id}/state/{col}/_files/{fileId}"
tags: ["Page data"]
---

# Download a page data file

`GET /api/{ns}/{id}/state/{col}/_files/{fileId}`

## Request

- Base URL: `https://brewpage.app`
- URL: `https://brewpage.app/api/{ns}/{id}/state/{col}/_files/{fileId}`
- Auth: one of:
  - API key in header `X-Owner-Token`
  - API key in header `X-Manage-Key`

The bytes of one visitor file as an attachment, Content-Type = its stored type. The file was sent by a visitor: treat it as untrusted.

## Path parameters

- `ns` string, required
- `id` string, required
- `col` string, required
- `fileId` string, required

## Headers

- `X-Owner-Token` unknown
- `X-Manage-Key` unknown

## Response `200`

The file as an attachment

## Other responses

- `400`: STATE_INVALID: the list name has a mistake
- `403`: Owner token revoked or expired; or OWNER_AUTHORIZATION_FAILED: a public publication you do not own
- `404`: PUBLICATION_UNAVAILABLE: no such HTML page or site, not yours, hidden or expired; or STATE_NOT_FOUND: no such file in this list
- `503`: STATE_UNAVAILABLE: page data or its files are switched off for now; wait Retry-After

## Changes

- **2026-11-21** `19a6c5561e70`: 4 info
  - added the optional property `level` to the response with the `400` status
  - added the optional property `level` to the response with the `403` status
  - added the optional property `level` to the response with the `404` status
  - added the optional property `level` to the response with the `503` status
- **2026-11-16** `31cd78c9ccd6`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/brewpage/apis/brewpage-api/changes/api/:ns/:id/state/:col/_files/:fileId/get.md)

---

[API](https://skmtc.dev/brewpage/apis/brewpage-api.md) - [All operations](https://skmtc.dev/brewpage/apis/brewpage-api/llms.txt) - [OpenAPI document](https://skmtc.dev/brewpage/apis/brewpage-api/revisions/78d2720a18a9?raw)
