Alpha: Document API is currently alpha and subject to breaking changes.
Summary
Create a section break at the target location with optional initial section properties.- Operation ID:
create.sectionBreak - API member path:
editor.doc.create.sectionBreak(...) - Mutates document:
yes - Idempotency:
non-idempotent - Supports tracked mode:
no - Supports dry run:
yes - Deterministic target resolution:
yes
Expected result
Returns a CreateSectionBreakResult with the new section break position and section address.Input fields
| Field | Type | Required | Description | |||
|---|---|---|---|---|---|---|
at | object(kind=“documentStart”) \ | object(kind=“documentEnd”) \ | object(kind=“before”) \ | object(kind=“after”) | no | One of: object(kind=“documentStart”), object(kind=“documentEnd”), object(kind=“before”), object(kind=“after”) |
breakType | enum | no | "continuous", "nextPage", "evenPage", "oddPage" | |||
headerFooterMargins | object | no | ||||
headerFooterMargins.footer | number | no | ||||
headerFooterMargins.header | number | no | ||||
pageMargins | object | no | ||||
pageMargins.bottom | number | no | ||||
pageMargins.gutter | number | no | ||||
pageMargins.left | number | no | ||||
pageMargins.right | number | no | ||||
pageMargins.top | number | no |
Example request
Output fields
Variant 1 (section.kind=“section”)
| Field | Type | Required | Description |
|---|---|---|---|
breakParagraph | BlockNodeAddress | no | BlockNodeAddress |
breakParagraph.kind | "block" | no | Constant: "block" |
breakParagraph.nodeId | string | no | |
breakParagraph.nodeType | enum | no | "paragraph", "heading", "listItem", "table", "tableRow", "tableCell", "tableOfContents", "image", "sdt" |
section | SectionAddress | yes | SectionAddress |
section.kind | "section" | yes | Constant: "section" |
section.sectionId | string | yes | |
success | true | yes | Constant: true |
Variant 2 (success=false)
| Field | Type | Required | Description |
|---|---|---|---|
failure | object | yes | |
failure.code | enum | yes | "INVALID_TARGET", "CAPABILITY_UNAVAILABLE" |
failure.details | any | no | |
failure.message | string | yes | |
success | false | yes | Constant: false |
Example response
Pre-apply throws
TARGET_NOT_FOUNDINVALID_TARGETAMBIGUOUS_TARGETINVALID_INPUTCAPABILITY_UNAVAILABLEINTERNAL_ERROR
Non-applied failure codes
INVALID_TARGETCAPABILITY_UNAVAILABLE
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

