---
title: "Read page data settings and usage"
method: GET
path: "/api/{ns}/{id}/state"
tags: ["Page data"]
---

# Read page data settings and usage

`GET /api/{ns}/{id}/state`

## Request

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

Settings in effect, each list with its entry count and size, quota tier and usage. A publication that has not turned page data on answers declared:false with the default settings. notices: state-needs-subdomain while the page is on a brewpage.app/... address (give it its own address: PATCH /api/{type}/{ns}/{id}/hosting), state-needs-html while the page is not HTML.

## Path parameters

- `ns` string, required
- `id` string, required

## Headers

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

## Response `200`

Settings and usage

- StateConfigResponse
  - `declared` boolean, required: True when page data is turned on for this publication
  - `config` StateSettings, required: Settings in effect, every key spelled out (defaults when not turned on); a valid PATCH body as is
    - `collections` object, required: Declared lists by name
    - `captcha` 'auto' | 'always', required: Human check for new visitors who save: auto or always
    - `maxDocBytes` integer, required: Largest entry in bytes
    - `maxDocsPerVisitor` integer, required: Entries one visitor may keep on this publication
    - `maxBytesPerVisitor` integer, required: Bytes one visitor may keep on this publication
    - `accountOffer` boolean: false: visitors see no offer to sign in to BrewPage on this page; absent = the offer shows
  - `collections` StateCollectionUsage[], required: Every declared list and every other list holding entries or files, by name
    - `name` string, required
    - `declared` boolean, required: False for a list the page saves into without declaring it; such a list is private
    - `mode` 'private' | 'shared', required
    - `write` 'visitors' | 'author' | 'accounts', required
    - `docs` integer, required: Entries in this list
    - `bytes` integer, required: Bytes of this list's entries
    - `files` integer, required: Visitor files in this list
    - `fileBytes` integer, required: Bytes of this list's visitor files
  - `usage` StateAmount, required: Entries, files and their bytes stored on this publication
    - `docs` integer, required: Entries
    - `bytes` integer, required: Bytes of entries
    - `files` integer, required: Visitor files
    - `fileBytes` integer, required: Bytes of visitor files
  - `tier` 'anonymous' | 'account', required: Quota tier: account (publication of an active profile) or anonymous
  - `caps` StateAmount, required: Quota of this tier: at most this many entries, entry bytes, files and file bytes
    - `docs` integer, required: Entries
    - `bytes` integer, required: Bytes of entries
    - `files` integer, required: Visitor files
    - `fileBytes` integer, required: Bytes of visitor files
  - `alert` boolean, required: True at 80% or more of the entry, entry size, file or file size quota
  - `notices` PublishNotice[], required: Advisories about the request or the settings; empty when none
    - `code` string, required: Kebab-case, e.g. ttl-clamped, namespace-defaulted, secret-detected, visibility-not-listable, extend-needs-profile, rotate-still-listed, private-domain-detached, badge-hide-needs-profile, owner-token-new (save the new ownerToken, reuse it), credential-published (token or manage link in public content: remove it, reset it), archive-unverified (archive: check contents before opening).
    - `message` string, required
  - `pageDataHint` 'form' | 'local' | 'game' | 'relay': Page data would help this page or site: form (answers not saved), local (saves only in the visitor's browser), game (saved progress) or relay (sends input to an outside service); absent while page data is on or nothing suggests it

## Other responses

- `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
- `503`: STATE_UNAVAILABLE: page data is switched off for now; wait Retry-After

## Changes

- **2026-12-01** `4f27cbc70df3`: 1 warning
  - added the new `relay` enum value to the `pageDataHint` response property for the response status `200`
- **2026-11-28** `317aa79e07ee`: 2 warning, 2 info
  - added the new `accounts` enum value to the `collections/items/write` response property for the response status `200`
  - added the new `accounts` enum value to the `config/collections/additionalProperties/write` response property for the response status `200`
  - added the optional property `config/accountOffer` to the response with the `200` status
  - added the optional property `pageDataHint` to the response with the `200` status
- **2026-11-21** `19a6c5561e70`: 3 info
  - 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`: 7 info
  - added the required property `caps/fileBytes` to the response with the `200` status
  - added the required property `caps/files` to the response with the `200` status
  - added the required property `collections/items/fileBytes` to the response with the `200` status
  - added the required property `collections/items/files` to the response with the `200` status
  - …3 more
- **2026-11-11** `957711dab4b5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/brewpage/apis/brewpage-api/changes/api/:ns/:id/state/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)
