Document apiReferenceDocument index
index.insert
Insert a new index block at a target location.
mutates documentdry runnon-idempotent
doc.index.insert(…)Expected result
Returns an IndexMutationResult indicating success with the index address or a failure.
Inputs
atdocumentStart | documentEnd | before | afterrequireddocumentStart
kind"documentStart"requireddocumentEnd
kind"documentEnd"requiredbefore
kind"before"requiredtargetBlockNodeAddressrequiredFields
kind"block"requirednodeType"paragraph" | "heading" | "listItem" | "table" | "tableRow" | "tableCell" | "tableOfContents" | "image" | "sdt"requirednodeIdstringrequiredstoryStoryLocatorStory 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"requiredsectionSectionAddressrequiredheaderFooterKind"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"requiredtextboxIdstringrequiredafter
kind"after"requiredtargetBlockNodeAddressrequiredFields
kind"block"requirednodeType"paragraph" | "heading" | "listItem" | "table" | "tableRow" | "tableCell" | "tableOfContents" | "image" | "sdt"requirednodeIdstringrequiredstoryStoryLocatorStory 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"requiredsectionSectionAddressrequiredheaderFooterKind"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"requiredtextboxIdstringrequired1 additional input field
configobjectFields
headingSeparatorstringentryPageSeparatorstringpageRangeSeparatorstringsequenceIdstringcolumnsintegerentryTypeFilterstringpageRangeBookmarkstringletterRangeobjectFields
fromstringrequiredtostringrequiredrunInbooleanaccentedSortingbooleanResult
Output fields
true
successtruerequiredindexobjectrequiredFields
kind"block"requirednodeType"index"requirednodeIdstringrequiredfalse
successfalserequiredfailureobjectrequiredFields
codestringrequiredmessagestringrequireddetailsunknownFailures
Pre-apply throws
TARGET_NOT_FOUNDINVALID_TARGETINVALID_INPUT
1 more codes
CAPABILITY_UNAVAILABLE
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