Admin page management
Pages are scoped to a team and hub:Sections
Sections are the building blocks inside a page. They can represent text, calls to action, grids, media, search, and other structured page blocks.Draft-tree authoring
The draft tree is the mutable, unpublished state of a page’s node hierarchy. Write it with:If-Match header carries the optimistic-concurrency token (OCC).
Bootstrapping the token: read the page first — the admin read (GET /api/v1/teams/{team_id}/hubs/{hub_id}/pages/{identifier}) returns the current version in both attributes.draft_version and the ETag response header. Echo that value as If-Match on your first write; every subsequent write/publish response hands you the bumped token:
200 with the bumped version echoed in both the ETag response header and attributes.draft_version:
draft_version (or echo the ETag value verbatim) as your If-Match token for the next write or publish call.
Error codes
| Status | Code | Cause |
|---|---|---|
| 428 | precondition_required | If-Match header absent |
| 400 | invalid_if_match | If-Match value is not an integer (weak validators W/"n" are rejected) |
| 409 | stale_draft | A concurrent write bumped the version; re-read and retry |
| 422 | invalid_tree | Tree failed structural validation (node-type rules, 500-node cap) |
| 413 | — | Request body exceeds 1 MB |
| 404 | page_not_found | Page, hub, or team not found or mismatched |
| 401/403 | — | Missing or insufficient credentials |
Publish
Publishing compiles the editable tree into the served page state.draft_version as If-Match (same OCC contract as the tree write). If a concurrent draft write happened after your last read, publish returns 409 — re-read and re-send.
The backend uses optimistic concurrency for publish operations. If a frontend edits pages collaboratively, preserve and send the versioning headers shown in the generated endpoint reference.