API reference Pages
Create a page
post/v1/pages
Creates a page in a wiki and adds it to the page tree, at the top level or under parent_id. Requires a key with write access and edit permission on the wiki.
Request body
A JSON object, sent with the header Content-Type: application/json.
| Field | Description |
|---|---|
wiki_idstring (uuid)required | The wiki to create the page in. |
titlestringrequired | 1 to 255 characters. |
contentContentNode[]optional | The page body. Omit it to create an empty page. |
parent_idstring (uuid)optional | Place the new page under this page in the page tree. Omit for the top level. |
Responses
- 201
The created page.
Fields of the 201 response of Create a page Field Description objectstringAlways
"page".idstring (uuid)The page ID.
wiki_idstring (uuid)The wiki the page belongs to.
titlestringslugstringThe page part of its SlimWiki URL.
hashstring | nulloptionalA short identifier that stays the same when the page is renamed. It is the last part of the page URL.
archivedbooleancreated_atstring (date-time) | nulloptionalWhen the page was created.
updated_atstring (date-time) | nulloptionalWhen the page was last edited.
contentContentNode[]The page body as a list of content nodes. See the content format guide.
- 400
The request is not valid.
error.detailslists the fields. Error code:invalid_request.Error body fields
Fields of the 400 error body of Create a page Field Description errorobjecterror.codestringA stable, machine-readable error code.
One of
invalid_request,unauthorized,insufficient_scope,forbidden,not_found,conflict,rate_limited,internal_error.error.messagestringA description for people. The wording may change.
error.detailsobject[]optionalFor
invalid_request: the fields that failed validation.error.details[].fieldstringoptionalerror.details[].messagestringoptionalerror.request_idstring | nulloptionalQuote this when contacting support.
- 401
The API key is missing, invalid, revoked or expired. Error code:
unauthorized.Error body fields
Fields of the 401 error body of Create a page Field Description errorobjecterror.codestringA stable, machine-readable error code.
One of
invalid_request,unauthorized,insufficient_scope,forbidden,not_found,conflict,rate_limited,internal_error.error.messagestringA description for people. The wording may change.
error.detailsobject[]optionalFor
invalid_request: the fields that failed validation.error.details[].fieldstringoptionalerror.details[].messagestringoptionalerror.request_idstring | nulloptionalQuote this when contacting support.
- 403
The API key is read-only, or its owner is not allowed to make this change. Error code:
insufficient_scopeorforbidden.Error body fields
Fields of the 403 error body of Create a page Field Description errorobjecterror.codestringA stable, machine-readable error code.
One of
invalid_request,unauthorized,insufficient_scope,forbidden,not_found,conflict,rate_limited,internal_error.error.messagestringA description for people. The wording may change.
error.detailsobject[]optionalFor
invalid_request: the fields that failed validation.error.details[].fieldstringoptionalerror.details[].messagestringoptionalerror.request_idstring | nulloptionalQuote this when contacting support.
- 404
The resource does not exist, or this API key cannot see it. Error code:
not_found.Error body fields
Fields of the 404 error body of Create a page Field Description errorobjecterror.codestringA stable, machine-readable error code.
One of
invalid_request,unauthorized,insufficient_scope,forbidden,not_found,conflict,rate_limited,internal_error.error.messagestringA description for people. The wording may change.
error.detailsobject[]optionalFor
invalid_request: the fields that failed validation.error.details[].fieldstringoptionalerror.details[].messagestringoptionalerror.request_idstring | nulloptionalQuote this when contacting support.
- 429
Rate limit exceeded. See the
Retry-Afterheader. Error code:rate_limited.Error body fields
Fields of the 429 error body of Create a page Field Description errorobjecterror.codestringA stable, machine-readable error code.
One of
invalid_request,unauthorized,insufficient_scope,forbidden,not_found,conflict,rate_limited,internal_error.error.messagestringA description for people. The wording may change.
error.detailsobject[]optionalFor
invalid_request: the fields that failed validation.error.details[].fieldstringoptionalerror.details[].messagestringoptionalerror.request_idstring | nulloptionalQuote this when contacting support.
Any request can also fail with 500 internal_error. See Errors for every code.
The ContentNode object
One block or inline node of page content, for example a paragraph, heading or text run.
| Field | Description |
|---|---|
typestringrequired | The node type, such as |
attrsobjectoptional | Type-specific attributes, such as a heading |
contentContentNode[]optional | Child nodes. |
textstringoptional | The text of a |
marksobject[]optional | Inline formatting on a |
The content format guide shows the common node types with examples.