Alpha: Document API is currently alpha and subject to breaking changes.
Summary
List top-level blocks in document order with IDs, types, and text previews. Supports pagination via offset/limit and optional nodeType filtering.- Operation ID:
blocks.list - API member path:
editor.doc.blocks.list(...) - Mutates document:
no - Idempotency:
idempotent - Supports tracked mode:
no - Supports dry run:
no - Deterministic target resolution:
yes
Expected result
Returns a BlocksListResult with total block count, an ordered array of block entries (ordinal, nodeId, nodeType, textPreview, isEmpty), and the current document revision.Input fields
| Field | Type | Required | Description |
|---|---|---|---|
limit | number | no | |
nodeTypes | enum[] | no | |
offset | number | no |
Example request
Output fields
| Field | Type | Required | Description |
|---|---|---|---|
blocks | object[] | yes | |
revision | string | yes | |
total | number | yes |
Example response
Pre-apply throws
INVALID_INPUT
Non-applied failure codes
- None
Raw schemas
Raw input schema
Raw input schema
Raw output schema
Raw output schema

