Summary
Merge two adjacent paragraphs in the same story. The first paragraph keeps its pPr; the second paragraph is removed. Rejects when either paragraph carries a w:sectPr or when their numbering definitions differ. Available on v2-backed sessions only; v1-backed sessions currently returnCAPABILITY_UNAVAILABLE.
- Operation ID:
blocks.merge - API member path:
editor.doc.blocks.merge(...) - Mutates document:
yes - Idempotency:
non-idempotent - Supports tracked mode:
yes - Supports dry run:
no - Deterministic target resolution:
yes
Expected result
Returns a BlocksMergeResult; on success carries the removed paragraph address plus affectedStories, textRangeShifts, and a txId.Input fields
| Field | Type | Required | Description |
|---|---|---|---|
first | BlockNodeAddress | yes | BlockNodeAddress |
first.kind | "block" | yes | Constant: "block" |
first.nodeId | string | yes | |
first.nodeType | enum | yes | "paragraph", "heading", "listItem", "table", "tableRow", "tableCell", "tableOfContents", "image", "sdt" |
first.story | StoryLocator | no | StoryLocator |
second | BlockNodeAddress | yes | BlockNodeAddress |
second.kind | "block" | yes | Constant: "block" |
second.nodeId | string | yes | |
second.nodeType | enum | yes | "paragraph", "heading", "listItem", "table", "tableRow", "tableCell", "tableOfContents", "image", "sdt" |
second.story | StoryLocator | no | StoryLocator |
Example request
Output fields
| Field | Type | Required | Description |
|---|---|---|---|
affectedStories | StoryLocator[] | no | |
remappedRefs | AffectedRefRemapping[] | no | |
removed | BlockNodeAddress | yes | BlockNodeAddress |
removed.kind | "block" | yes | Constant: "block" |
removed.nodeId | string | yes | |
removed.nodeType | enum | yes | "paragraph", "heading", "listItem", "table", "tableRow", "tableCell", "tableOfContents", "image", "sdt" |
removed.story | StoryLocator | no | StoryLocator |
success | true | yes | Constant: true |
textRangeShifts | TextRangeShift[] | no | |
txId | string | no |
Example response
Pre-apply throws
TARGET_NOT_FOUNDCAPABILITY_UNAVAILABLEINVALID_TARGETINVALID_INPUT
Non-applied failure codes
INVALID_TARGETTARGET_NOT_FOUNDCAPABILITY_UNAVAILABLEINVALID_CONTEXTINVALID_INPUT
Raw schemas
Raw input schema
Raw input schema
Raw output schema
Raw output schema
Raw success schema
Raw success schema
Raw failure schema
Raw failure schema

