Alpha: Document API is currently alpha and subject to breaking changes.
Summary
Delete an entire block node (paragraph, heading, list item, table, image, or sdt) deterministically.- Operation ID:
blocks.delete - API member path:
editor.doc.blocks.delete(...) - Mutates document:
yes - Idempotency:
conditional - Supports tracked mode:
no - Supports dry run:
yes - Deterministic target resolution:
yes
Expected result
Returns a BlocksDeleteResult receipt confirming the block was removed, including a deletedBlock summary with ordinal, nodeType, and textPreview.Input fields
| Field | Type | Required | Description |
|---|---|---|---|
target | DeletableBlockNodeAddress | yes | DeletableBlockNodeAddress |
target.kind | "block" | yes | Constant: "block" |
target.nodeId | string | yes | |
target.nodeType | enum | yes | "paragraph", "heading", "listItem", "table", "sdt" |
Example request
Output fields
| Field | Type | Required | Description | |
|---|---|---|---|---|
deleted | DeletableBlockNodeAddress | yes | DeletableBlockNodeAddress | |
deleted.kind | "block" | yes | Constant: "block" | |
deleted.nodeId | string | yes | ||
deleted.nodeType | enum | yes | "paragraph", "heading", "listItem", "table", "sdt" | |
deletedBlock | object | no | ||
deletedBlock.nodeId | string | no | ||
deletedBlock.nodeType | string | no | ||
deletedBlock.ordinal | number | no | ||
deletedBlock.textPreview | string \ | null | no | One of: string, null |
success | true | yes | Constant: true |
Example response
Pre-apply throws
TARGET_NOT_FOUNDAMBIGUOUS_TARGETCAPABILITY_UNAVAILABLEINVALID_TARGETINVALID_INPUTINTERNAL_ERROR
Non-applied failure codes
- None
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

