Nimbu Developer Docs
ReferencePages

Fetch a page draft

GET
/pages/{page_id}/draft

Page drafts. All /draft* routes return 403 {message: "Page drafts are not enabled"} when env PAGE_DRAFTS_DISABLED is truthy. Redirect pages → 422 {code: not_draftable, message: "Redirect pages cannot have drafts"}.

Draftable fields

Exactly these are accepted: title, seo_title, seo_description, seo_keywords, og_image, og_image_content_type, og_image_width, og_image_height, og_image_size, og_image_version, og_image_checksum, page_items, translations, fixed_locale, locales.

Request items is stored as page_items. slug and fullpath are not draftable.

Operations

  • GET — the draft, or 404
  • POST / PUT / PATCH — save. items merge like PUT. Unknown {id} creates a draft-only unpublished page (reserved_fullpath, parent_id, position, template_id). 422 concurrent_modification on lock timeout
  • DELETE — 204

Query parameters (GET)

  • compact=1 — drop per-item created_at/updated_at/type and the translations entry for the served locale. Item slugs, ids and positions stay: draft items are arrays, not slug-keyed maps.
  • content_locale — read the draft in that locale (must be a site locale, else 422). The draft snapshot stores its base fields in the site's default locale; the requested locale's translations entry is overlaid on read, falling back to the default locale per field.
  • fields is not supported here and is ignored; the draft snapshot is returned whole

Authorization

AuthorizationBearer <token>

Personal access token tied to a user account. Requires the X-Nimbu-Site header to scope requests.

In: header

X-Nimbu-Site<token>

Identifier of the site context when authenticating with a personal access token.

In: header

Path Parameters

page_id*string

Live page id/fullpath, or a draft-only future_page_id

Query Parameters

compact?boolean

When true, drop redundant metadata: per-editable created_at/updated_at, the slug that is already the items key, type, the translations entry for the served locale, and file metadata beyond url/filename/width/height. Ids and positions stay.

content_locale?string

Locale to read translated content in. Must be one of the site locales (default = site default).

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/pages/string/draft"
{
  "id": "66f1a2b3c4d5e6f7a8b9c0e0",
  "page_id": "66f1a2b3c4d5e6f7a8b9c0d0",
  "future_page_id": null,
  "reserved_fullpath": null,
  "content": {
    "title": "Draft Title"
  },
  "updated_at": "2026-09-10T19:00:00Z"
}
{
  "message": "Page drafts are not enabled"
}
{
  "message": "Not found"
}