SpecifyDocs

project_page_update

tools/call

Rename a Docs page, move it, replace its text with plain text or Markdown (bodyFormat), or archive or restore it. Move with parentId (null for the project root) and position (0 is first; left out, the page goes last). Replacing the text needs bodyBase, the document epoch and version from project_page_get: if someone changed the text since, the call answers DOCUMENT_CONFLICT and changes nothing, so read the page again and retry. Replacing the text of a page a person has edited in the Specify editor answers SCHEMA_CONVERSION_UNSUPPORTED after the base check and changes nothing; a person can make the change in the editor. archived true takes the page and the pages inside it out of Docs, keeping their text and history; archived false brings it back with them (a page archived with the one above it comes back with that one, PAGE_ARCHIVED_WITH_PARENT). An archived page refuses other changes until restored. Markdown holds headings # to ###, paragraphs, bullet, numbered and checkbox (- [ ]) lists, > quotes, fenced code blocks with a language, --- rules, tables, links (https, http or mailto), **bold**, *italic*, ~~strikethrough~~ and `inline code`, plus the :::specify-callout and :::specify-toggle blocks the editor's Markdown export writes. HTML, images and other media, other links (javascript:, vbscript: or data: in any letter case, after a space or written with entities or percent escapes, and in a :::specify-node block's JSON too), #### or deeper headings, reference-style links and footnotes (write each link inline), links or formatting around `inline code` or a mention, table rows with more cells than the header row, and NUL characters or unpaired surrogates, escaped inside a :::specify-node block's JSON included, are refused with what was found, and nothing is written.

Scopes

read:projectswrite:projects

Replacing the text also takes the document checks of documents_execute on the page's project.

Inputs

pageIdstringRequired
Page ID (id from project_page_list or project_page_create)
titlestring
New title, at most 180 characters
parentIdstring | null
Page to move it under, in the same project, or null for the project root
positioninteger
Place among its new siblings
bodystring
The page text in bodyFormat, at most 100,000 characters, with no NUL or unpaired surrogate. It becomes the document the editor shows, as if a person pasted it
bodyFormat"text" | "markdown"
text (default): each line becomes a paragraph, written as is. markdown: read as the editor reads a Markdown paste
bodyBaseobject
document.epoch and document.version from project_page_get
archivedboolean
true archives the page with the pages inside it; false restores it
idempotencyKeystringRequired
Retry key you choose. The same call sent again with the same key within 24 hours writes nothing twice: if an answer is lost or unclear, send the same call with the same key. Use a new key for a new change

Returns

The page as it is now and its document version. A call returns content[0].text with the JSON result and structuredContent.result with the same value.

Listed when

The connection has read:projects.