Pages API
Pages
GET /orgs/{org}/daily/{date}
Your daily note for a day, created on first open.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
date required | path | string | YYYY-MM-DD, or today. |
Responses
200- OK. PageView
application/json
GET /orgs/{org}/pages
Pages you can read, in tree order (space, parent, position).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
space | query | string | Only this space (slug or id). |
parent | query | string | Only children of this page (short ID), or root for top-level pages. |
q | query | string | Title contains. |
trash | query | boolean | Include pages in the trash. |
limit | query | integer (int32) | Page size. |
cursor | query | string | Cursor. |
Responses
200- OK. Paged_PageSummary
application/json
POST /orgs/{org}/pages
Creates a page in space, or under parent (one of them is required). With source and external_id, upserts: 200 with import_action updated or skipped when that page was imported before.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
Request body
application/json, CreatePage.
| Field | Type | Description |
|---|---|---|
external_id | string | null | The page's id in source. |
icon | string | null | Icon. |
import_id | string (uuid) | null | The import batch, undone as a unit. |
markdown | string | null | The text (default: a heading with the title). |
parent | string | null | The parent page (short ID or id). |
source | string | null | Import provenance (§23.2), with external_id: a repeat updates the page if the text changed and otherwise skips it. |
space | string | null | The space (slug or id). Required unless parent is given; defaults to the parent's space. |
template | string | null | A template page to copy. |
title required | string | Title. |
Responses
GET /orgs/{org}/pages/{ref}
A page, as JSON, Markdown or safe HTML.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The page's short ID or UUID. |
format | query | string | json (default), md or html. |
Responses
200- OK. PageView
application/json 404- Not found. ProblemBody
application/json
PUT /orgs/{org}/pages/{ref}
Replaces a page's text. If-Match is a strict precondition; base_revision merges.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The page's short ID or UUID. |
If-Match | header | string | null | The page's strong ETag. If supplied, it must match the current revision; a mismatch returns 409 revision_conflict. |
Request body
application/json, PutPage.
| Field | Type | Description |
|---|---|---|
base_revision | integer (int64) | null | The revision it was based on: an older base is merged three ways. |
markdown required | string | The full new text. |
Responses
200- OK. PageView
application/json 409- Conflict. ProblemBody
application/json
PATCH /orgs/{org}/pages/{ref}
Applies edit operations (append, prepend, insert_under, replace, set_frontmatter).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The page's short ID or UUID. |
If-Match | header | string | null | The page's strong ETag. If supplied, it must match the current revision; a mismatch returns 409 revision_conflict. |
Request body
application/json, PatchPage.
| Field | Type | Description |
|---|---|---|
base_revision | integer (int64) | null | The revision the ops were written against. |
ops required | PageOp[] | The operations, applied in order. |
Responses
200- OK. PageView
application/json 409- Conflict. ProblemBody
application/json
DELETE /orgs/{org}/pages/{ref}
Moves a page and its descendants to the trash.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The page's short ID or UUID. |
Responses
204- No content
GET /orgs/{org}/pages/{ref}/backlinks
Pages and entries linking here (that you can read).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The page's short ID or UUID. |
Responses
200- OK. Paged_Backlink
application/json
POST /orgs/{org}/pages/{ref}/duplicate
Copies a page (its entries get new identities).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The page's short ID or UUID. |
Request body
application/json, DuplicatePage.
| Field | Type | Description |
|---|---|---|
title | string | null | The copy's title (default: <title> (copy)). |
Responses
201- Created. PageView
application/json
POST /orgs/{org}/pages/{ref}/move
Moves a page (between parents and spaces) with its descendants.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The page's short ID or UUID. |
Request body
application/json, MovePage.
| Field | Type | Description |
|---|---|---|
after | string | null | Put it right after this sibling (short ID). |
before | string | null | Put it right before this sibling (short ID). |
parent | string | null | The new parent (short ID), or "" for top level. |
space | string | null | The new space (slug or id). |
Responses
200- OK. PageView
application/json
POST /orgs/{org}/pages/{ref}/publish
Publishes a page read-only at /p/{org}/{slug} (managers).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The page's short ID or UUID. |
Request body
application/json, Publish.
| Field | Type | Description |
|---|---|---|
include_children | boolean | Publish the children too. |
slug | string | null | The public slug (default: the page slug). |
Responses
200- OK. Publication
application/json
POST /orgs/{org}/pages/{ref}/restore
Restores a page from the trash.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The page's short ID or UUID. |
Responses
200- OK. PageView
application/json
GET /orgs/{org}/pages/{ref}/restrictions
A page's restrictions (its managers).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The page's short ID or UUID. |
Responses
200- OK. Restrictions
application/json
PUT /orgs/{org}/pages/{ref}/restrictions
Restricts a page and its descendants to these subjects (a human manager). Restrictions only narrow: role = min(space role, restriction role).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The page's short ID or UUID. |
Request body
application/json, Restrictions.
| Field | Type | Description |
|---|---|---|
restricted | boolean | Whether the page is restricted. |
restrictions required | Restriction[] | Who may see it. |
Responses
200- OK. Restrictions
application/json
DELETE /orgs/{org}/pages/{ref}/restrictions
Lifts a page's restrictions (a human manager).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The page's short ID or UUID. |
Responses
204- No content
POST /orgs/{org}/pages/{ref}/share-links
Creates a view (or comment) link for people without accounts (managers).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The page's short ID or UUID. |
Request body
application/json, CreateShareLink.
| Field | Type | Description |
|---|---|---|
expires_in_days | integer (int64) | null | Days until it expires (default 30). |
role | string | null | viewer or commenter. |
Responses
201- Created. ShareLink
application/json
GET /orgs/{org}/pages/{ref}/versions
A page's versions, newest first.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The page's short ID or UUID. |
Responses
200- OK. Paged_PageVersion
application/json
GET /orgs/{org}/pages/{ref}/versions/{rev}
One version's text.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The page. |
rev required | path | integer (int64) | The revision. |
Responses
200- OK. PageVersion
application/json
POST /orgs/{org}/pages/{ref}/versions/{rev}/restore
Restores a version (as a new revision).
Parameters
| Name | In | Type | Description |
|---|---|---|---|
org required | path | string | The org slug. |
ref required | path | string | The page. |
rev required | path | integer (int64) | The revision. |
Responses
200- OK. PageView
application/json