Document apiReferenceCross refs
crossRefs.insert
Insert a new cross-reference field at a target location.
mutates documentdry runnon-idempotent
doc.crossRefs.insert(…)Expected result
Returns a CrossRefMutationResult indicating success with the cross-reference address or a failure.
Inputs
atTextTargetrequiredFields
kind"text"requiredsegmentsTextSegment[]requiredstoryStoryLocatorStory 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"requiredtextboxIdstringrequiredtargetbookmark | heading | note | caption | numberedItem | styledParagraphrequiredbookmark
kind"bookmark"requirednamestringrequiredheading
kind"heading"requirednodeIdstringrequirednote
kind"note"requirednoteIdstringrequiredcaption
kind"caption"requirednodeIdstringrequirednumberedItem
kind"numberedItem"requirednodeIdstringrequiredstyledParagraph
kind"styledParagraph"requiredstyleNamestringrequireddirection"before" | "after"display"content" | "pageNumber" | "noteNumber" | "labelAndNumber" | "aboveBelow" | "numberOnly" | "numberFullContext" | "styledContent" | "styledPageNumber"requiredResult
Output fields
true
successtruerequiredcrossRefobjectrequiredFields
kind"inline"requirednodeType"crossRef"requiredanchorInlineAnchorrequiredFields
startPositionrequiredendPositionrequiredfalse
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