update_page
Update a Markdown page. EXACTLY ONE body mode, and edits is the one to reach for: each edit replaces an oldText that must appear exactly once in the page, so a change to one paragraph never sends — or silently reverts — the rest of the…
Instructions
Update a Markdown page. EXACTLY ONE body mode, and edits is the one to reach for: each edit replaces an oldText that must appear exactly once in the page, so a change to one paragraph never sends — or silently reverts — the rest of the document. If somebody else edits the page first, YOUR edits are re-applied on top of THEIR text, and the call is refused outright if they changed the very span you are editing. The other mode is baseRevision plus body, which replaces the whole document and needs the revision get_page reported. Changing only metadata (title, folderId, lang) needs neither. Returns the page's new revision and its URL in the app, which only members of this workspace can open. To let somebody outside the workspace read it, a person in the workspace opens the page in DiagramZu and uses its Share button, which mints a public read-only link.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Page UUID | |
| body | No | A complete replacement body (≤100,000 chars). Needs `baseRevision`. Prefer `edits` unless you are genuinely rewriting the whole document. | |
| lang | No | Change the page's language tag — en, ja, zh-TW, pt-BR. Letters and hyphens only. | |
| edits | No | Targeted replacements, applied in order. Each `oldText` must match exactly once in the page as it then stands — zero or several matches refuses the whole call and writes nothing, naming the edit that failed. Do not pass `baseRevision` with this: the server's revision is read and re-read for you. | |
| space | No | Which workspace to act in: its id, its slug, or its exact name (case-insensitive). Omit to use this token's default workspace. Call list_spaces to see what this token can reach. A name that matches more than one workspace is refused — pass the id or slug instead. | |
| title | No | Rename the page (≤200 chars). Ignored while the body carries front-matter `title` or a leading `#` heading — rename by editing the heading instead. | |
| folderId | No | Move the page into this folder (UUID). Use list_folders to look one up. | |
| baseRevision | No | The revision the replacement body is based on, from get_page. Required with `body`, forbidden with `edits`. If the page moved on since, the write is refused rather than applied on top. | |
| versionLabel | No | Optional label for that snapshot (max 80 chars). | |
| createVersion | No | If true, take a named snapshot of the page as it is now BEFORE applying the change, so a human can get the previous text back. Use it when you are rewriting substantially. |