POST
/pages/createCreate a new page
Creates a page in a space. Supply spaceId and, when providing content, set format to json, markdown, or html to specify how that content is interpreted. Use parentPageId to create the page as a sub-page; omit it to create a root-level page.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Page details. The spaceId field is required; other fields are optional.
contentunknownoptional
Page body content. The expected type depends on `format`: `json` expects a ProseMirror document object, `markdown` expects a Markdown string, `html` expects an HTML string.
formatstringoptional
Format of the `content` field. Required when `content` is provided. `json`: ProseMirror document JSON object. `markdown`: Markdown text, converted to ProseMirror JSON on save. `html`: HTML text, converted to ProseMirror JSON on save.
iconstringoptional
Emoji or icon string displayed alongside the page title.
parentPageIdstringoptional
ID of the parent page. If provided, creates the page as a child (sub-page). If omitted, creates a root-level page in the space.
spaceIdstringrequired
ID of the space to create the page in.
titlestringoptional
Page title. Can be empty.
200Returns the created page.
dataobjectoptional
statusintegeroptional
successbooleanoptional
400Returned when the specified parent page is not found or the request fails validation.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional
403Returned when the authenticated user is not permitted to create a page in the space.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional
Error handling
The spaceId field is required. A 400 is returned when the specified parentPageId does not identify an existing parent page or the content and format values are invalid. A 403 is returned when the authenticated user is not permitted to create a page in the space.