Actions

Call the updateDocument MCP tool

Edit an existing document's title and/or content, replacing whichever field you pass, and/or publish it. If the document is public (is_public: true), an edit changes its LIVE page immediately: anyone with the /p/ link sees the new content right away. Separately, and regardless of is_public, any lead-magnet link createLeadMagnetCampaign already delivered to a lead (a private per-lead link) also shows the new content the next time that lead opens it, since that page reads the document's current content at open time rather than a frozen copy. Caution: if the document is open in the Reachium editor right now, the user must reload that tab before typing or their autosave overwrites this edit; the response warnings say when it was saved recently. If anyone is CURRENTLY in a live Collaborate room on this document, a title/content_markdown/edits write is refused outright (reason open_in_collaboration), naming who is in the room, rather than risking a silent overwrite by the room's next autosave; ask them to close it or wait for the room to go idle, then retry. If the collaboration check itself cannot be confirmed (a Liveblocks outage), the write proceeds and the response carries a collab_check_failed warning instead. Refuses documents that are restricted to admin editing (a Reachium-internal template a workspace cannot edit here) and documents outside this workspace. Provide at least one of title, content_markdown (up to 60000 characters), edits, or publish:true. Two ways to change the body: content_markdown REPLACES it entirely (embeds/tables the markdown cannot express are lost); edits applies PARTIAL changes to the current body (replace/insert/delete a section by heading, replace exact text in one line, insert/replace/remove images), leaving everything else, including tables and embeds, untouched. Prefer edits for revisions: call getDocuments with document_id first, then target sections by heading or section_index. publish:true makes the document a public /p/ page: pass it alone to publish an already-written document with no other change, or pass it together with title/content_markdown/edits to apply that edit first and publish the result in the same call, so the live page never shows stale content. unpublish:true takes a published /p/ page offline again: the document is kept as a private draft and its slug is retained, so a later publish:true restores the exact same URL. It is standalone (no title/content/edits in the same call) and mutually exclusive with publish:true. archive:true retires a document without deleting it (the escape valve for docs that campaigns already delivered, which can never be deleted): it moves to the Archived folder and drops out of default getDocuments listings, single-call, no confirm needed, fully reversed by archive:false. Archiving does NOT unpublish - a still-published doc keeps its live /p/ page and the response warns about it. Standalone like unpublish. publish:true and unpublish:true are both two-step, same shape as createDocument's: the FIRST call (no confirm_token) returns a preview naming the document and its public URL and creates/changes nothing; call again with the identical arguments plus confirm_token to actually execute. A plain edit (publish and unpublish unset or false) stays single-call, no confirm_token needed, byte-for-byte the same as before publish:true existed on this tool.

Called through the Actions bridge: the response is that tool's own result, wrapped as { data: <tool result> } under HTTP 200. Billing, daily-cap, and confirm-step outcomes are embedded INSIDE data, never remapped to an HTTP status (see the templated /api/v1/actions/{toolName} operation above for the full protocol, and x-mcp-actions for this tool's machine-readable scope/cap/confirm_behavior fields). Authentication, request-shape, and optional idempotency-protocol failures still use their documented non-200 statuses.

post/api/v1/actions/updateDocument

Request

  • Base URL: https://app.reachium.io
  • URL: https://app.reachium.io/api/v1/actions/updateDocument
  • Auth: HTTP bearer

Headers

Idempotency-Keystring

Optional caller-generated key (8-200 characters: letters, digits, dot, underscore, colon, or hyphen). A final tool result is replayed for the same key and body. An ambiguous result remains 409 under that key; reconcile external state before using a new key. Reuse with a different body returns 422.

Request body

document_idstring uuid required

The document to update (from getDocuments or a createDocument result).

titlestring

New title (titleFirstLine truncates to 120 chars regardless, so this is the true bound). Omit to leave unchanged.

content_markdownstring

New full document body in markdown; REPLACES the existing content entirely (not a patch). Omit to leave unchanged. Supported: headings (# through ######), paragraphs, bullet and numbered lists (a blank line between numbered items keeps counting), pipe tables (| a | b | header, | --- | --- | separator, then rows; | for a literal pipe in a cell), bold, italic, text links, inline code, fenced ``` code blocks, > blockquotes, --- horizontal rules, - [ ] / - [x] checklists, and images on their own line as caption (an https URL; inline images inside a sentence are not converted). Highlights and colors: ==text== is a yellow highlight, ==<color>:text== a colored highlight, @@<color>:text@@ colored text, with <color> one of gray, brown, red, orange, yellow, green, blue, purple, pink OR a custom #RRGGBB hex (exactly 6 hex digits, e.g. ==#D1FAE5:win== or @@#B91C1C:warning@@; anything else renders as literal text). Marks must hug their text (==key point==, never == key point ==), and may wrap bold or italic (==key== is bold AND highlighted). Layout: end a paragraph, heading, or list line with a space plus {center}, {right}, or {justify} to align it; images take caption{width=420} (pixels, 50-1200) and/or an alignment token like {width=420 left} (images default to centered). Pull getPlaybook("content", "document-styling") BEFORE styling a document: the discipline (what to highlight, which colors mean what, the readable palette, when to center or size) lives there. NOT supported (renders broken or missing, use plain formatting instead): nested or indented list levels (they all flatten to one level), setext headings (a title on its own line followed by a row of ==== or ----), bold nested inside italic or italic nested inside bold (the ** or * marks stay visible instead of rendering), and per-character font sizes (use heading levels for size hierarchy).

publishboolean

true to make the document a public /p/ page, which is two-step: the first call previews and returns a confirm_token, and nothing changes or publishes until you send it back. Pass alone to publish with no other change, or together with title/content_markdown/edits to edit then publish in one flow. Omit or pass false for a plain, single-call edit.

unpublishboolean

true to take a published /p/ page offline: the document is kept as a private draft and its slug is retained, so publishing again later restores the same URL. Two-step like publish (preview, then confirm_token). Standalone: pass it with no title/content_markdown/edits, and never together with publish. Already-sent lead-magnet delivery links are unaffected.

archiveboolean

true to archive (retire) the document: it moves to the Archived folder and drops out of default getDocuments listings; false to unarchive. Single-call, no confirm_token, reversible. Does NOT unpublish a published doc (pair with unpublish:true for that). Standalone: no other fields in the same call.

slugstring

Custom URL slug for the public /p/ page; only valid together with publish:true. Lowercased and hyphenated automatically, capped at 50 characters on a word boundary. For SEO: 3-6 words, the primary keyword FIRST, no filler words or dates (good: "linkedin-outreach-playbook"; bad: "my-2026-guide-v2-final"). Refused if another document already owns it (never silently suffixed). Omit to auto-generate from the title. On an ALREADY-public document a new slug moves the page: the old URL stops resolving immediately.

folderstring

Move the document into a folder, by folder id or (case-insensitive) name (getDocuments lists them under folders); pass 'root' to move it back to the root. Single-call, combinable with title/content_markdown/edits, refused on an archived document (unarchive first) and not allowed in the same call as archive.

confirm_tokenstring

From the preview response of a publish:true or unpublish:true call; resend with the same arguments to execute. Never needed for a plain edit.

Response

The result of calling this tool.

dataunknown required
errorunknown required

Changes

No recorded changes to this operation across all 2 revisions of this API.