POST
/pages/updateUpdate a page
Updates a page's content, title, icon, or location. Supply pageId and the fields to change; use format to specify how content is encoded and operation to control how it is applied.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
Page fields to update. Supply pageId and include only the fields you want to change.
contentunknownoptional
New content to apply. The expected type depends on `format`: `json` expects a ProseMirror document object, `markdown` expects a Markdown string, `html` expects an HTML string. How the content is applied depends on `operation`.
formatstringoptional
Format of the `content` field. Required when `content` is provided. `json`: ProseMirror document JSON. `markdown`: Markdown text. `html`: HTML text. The response content will also be in this format.
iconstringoptional
New page icon (emoji or icon string).
operationstringoptional
How to apply the new content to the existing page. `replace` (default): removes all existing content and inserts the new content. `append`: inserts the new content at the end of the existing document. `prepend`: inserts the new content at the beginning of the existing document.
pageIdstringrequired
ID of the page to update.
parentPageIdstringoptional
Move the page under this parent.
spaceIdstringoptional
Move the page to this space.
titlestringoptional
New page title.
200Returns the updated page, including its creator, last updater, contributors, and space.
dataobjectoptional
Page with conditionally included nested objects
statusintegeroptional
successbooleanoptional
400Returned when the content format is invalid.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional
403Returned when the request is forbidden.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional
404Returned when the page is not found.
errorstringoptional
Reason phrase, for example `Bad Request`.
messagestringoptional
statusCodeintegeroptional
Error handling
A 400 is returned for an invalid content format, a 403 when the authenticated user is not allowed to update the page, and a 404 when the page is not found. pageId is required; when you provide content, format must be json, markdown, or html, and operation must be append, prepend, or replace.