Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
action | enum | Yes | The operation to perform |
documentId | UUID | Yes | Document UUID |
branchName | string | Conditional | Branch name — required for write operations |
sectionId | UUID | Conditional | Section UUID — required for update, delete, add_reference |
name | string | Conditional | Section name (H2 heading) — required for create |
content | block[] | Conditional | Content blocks — required for create and update |
sections | object[] | Conditional | Array of section specs — required for batch_create |
sectionOrder | UUID[] | Conditional | Ordered array of section IDs — required for reorder |
newName | string | No | Updated section name for update |
newContent | block[] | No | Updated content for update (replaces current content) |
position | integer | No | Position index for create (default: append at end) |
expectedContentHash | string | No | Optimistic lock — include contentHash from read to detect concurrent edits |
commitMessage | string | No | Commit message (auto-generated if omitted) |
defaultPermission | edit | read | none | null | No | Section team permission override |
aiAccess | edit | read | none | null | No | Section AI permission override |
targetDocumentId | UUID | Conditional | For add_reference — target document |
targetSectionId | UUID | null | No | For add_reference — target section (null = link to document) |
displayTitle | string | null | No | For add_reference — override link display text |
referenceId | UUID | Conditional | For remove_reference — reference UUID |
Actions
| Action | Required params | Notes |
|---|---|---|
create | documentId, branchName, name, content | Appends unless position specified |
batch_create | documentId, branchName, sections | Atomic; preferred for multiple sections |
update | documentId, branchName, sectionId, newContent | newName | Replaces content |
delete | documentId, branchName, sectionId | — |
reorder | documentId, branchName, sectionOrder | Full ordered list of all section IDs |
add_reference | documentId, branchName, sectionId, targetDocumentId | — |
remove_reference | documentId, branchName, referenceId | — |
Document Structure
Each section has aname that is automatically rendered as an H2 heading in the UI. Do not start content with a duplicate heading.
Content Blocks
type: "storage".
Batch Create
When adding more than one section, usebatch_create — it’s atomic, guarantees order, and avoids duplicates from parallel agents.
Permissions (Feature Branches Only)
Section-level permissions can only be set on non-default branches:null = inherit from document. See Permissions for the full model.
Comments
Preserving existing comments: When editing sections, keep<moxn:comment id="uuid">text</moxn:comment> tags intact.
Creating new comments:
Related
read— read section content and getcontentHashdocuments— create documents and branchesupload_url— upload files for use in storage content blocks