blocks.list
List top-level blocks in document order with IDs, types, text previews, and optional full text when includeText:true. Supports pagination via offset/limit after optional nodeTypes, nodeIds, and literal textSearch filtering, single-story scoping via `in: StoryLocator`, and final/original/redline projection of numbering metadata without changing block membership.
doc.blocks.list(…)Expected result
Returns a BlocksListResult with total block count, an ordered array of block entries, the effective numbering reviewMode, and the current document revision.
Inputs
nodeIdsstring[]Top-level block identities to match before pagination.
textSearchobjectFields
termsstring[]requiredmatch"all" | "any"caseSensitivebooleaninStoryLocatorStory scope. Defaults to document body when omitted. Use {kind:'story', storyType:'body'} for body, or other storyType values for headers, footers, footnotes, endnotes.
body
kind"story"requiredstoryType"body"requiredheaderFooterSlot
kind"story"requiredstoryType"headerFooterSlot"requiredsectionSectionAddressrequiredFields
kind"section"requiredsectionIdstringrequiredheaderFooterKind"header" | "footer"requiredvariant"default" | "first" | "even"requiredresolution"effective" | "explicit"onWrite"materializeIfInherited" | "editResolvedPart" | "error"headerFooterPart
kind"story"requiredstoryType"headerFooterPart"requiredrefIdstringrequiredfootnote
kind"story"requiredstoryType"footnote"requirednoteIdstringrequiredendnote
kind"story"requiredstoryType"endnote"requirednoteIdstringrequiredtextbox
kind"story"requiredstoryType"textbox"requiredtextboxIdstringrequiredoffsetnumberNumber of blocks to skip. Default: 0.
limitnumberMaximum blocks to return. Omit for all blocks.
nodeTypes"paragraph" | "heading" | "listItem" | "table" | "tableRow" | "tableCell" | "tableOfContents" | "image" | "sdt"[]Filter by block types (e.g. ['paragraph', 'heading']). Omit for all types.
includeTextbooleanWhen true, includes the full flattened block text in each block entry.
reviewModeSDProjectionReviewModeResult
Output fields
totalnumberrequiredblocksobject[]requiredrevisionstringrequiredreviewModeSDProjectionReviewModerequiredFailures
Pre-apply throws
INVALID_INPUTSTORY_NOT_FOUNDSTORY_MISMATCH
3 more codes
STORY_NOT_SUPPORTEDCROSS_STORY_PLANMATERIALIZATION_FAILED
Raw schemas
Open the generated JSON artifact for the exact input, output, success, and failure schemas represented by this contract version.
View raw JSON schemas