lists.create
Create a new list from one or more paragraphs. Supports optional preset or style for new sequences. When sequence.mode is "continuePrevious", preset and style are not allowed: the new items inherit formatting from the previous sequence.
doc.lists.create(…)Expected result
Returns a ListsCreateResult with the new listId and the first item address.
Inputs
mode"empty" | "fromParagraphs"requiredRequired. 'fromParagraphs' converts existing paragraphs into list items: each paragraph becomes one item, so create one paragraph per item first. 'empty' creates a new empty list at 'at'.
atBlockAddressconditionally requiredRequired when mode is 'empty'. The paragraph to create the list at. Format: {kind:'block', nodeType:'paragraph', nodeId:'<id>'}.
Fields
kind"block"requirednodeType"paragraph"requirednodeIdstringrequiredtargetBlockAddressOrRangeconditionally requiredRequired when mode is 'fromParagraphs'. Each call converts ONE paragraph into a list item. To make a list with N items, create N separate paragraphs first, then call superdoc_list create for EACH one. Format: {kind:'block', nodeType:'paragraph', nodeId:'<id>'}.
kind
kind"block"requirednodeType"paragraph"requirednodeIdstringrequiredfrom
fromBlockAddressrequiredFields
kind"block"requirednodeType"paragraph"requirednodeIdstringrequiredtoBlockAddressrequiredFields
kind"block"requirednodeType"paragraph"requirednodeIdstringrequired5 additional input fields
kind"ordered" | "bullet"List type: 'bullet' for bullet points, 'ordered' for numbered lists.
levelintegerList nesting level (0-8). 0 is the top level.
preset"decimal" | "decimalParenthesis" | "lowerLetter" | "lowerLetterParenthesis" | "upperLetter" | "upperLetterParenthesis" | "lowerRoman" | "upperRoman" | "disc" | "circle" | "square" | "dash"Predefined list style preset. Overrides 'kind' with a specific numbering or bullet format.
styleobjectFields
version1requiredlevelsobject[]requiredsequencenew | continuePreviousnew
mode"new"requiredstartAtintegercontinuePrevious
mode"continuePrevious"requiredResult
Output fields
true
successtruerequiredlistIdstringrequireditemListItemAddressrequiredFields
kind"block"requirednodeType"listItem"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"requiredtextboxIdstringrequiredfalse
successfalserequiredfailureobjectrequiredFields
code"INVALID_TARGET" | "LEVEL_OUT_OF_RANGE" | "INVALID_INPUT" | "NO_COMPATIBLE_PREVIOUS"requiredmessagestringrequireddetailsunknownFailures
Pre-apply throws
TARGET_NOT_FOUNDCAPABILITY_UNAVAILABLEINVALID_TARGET
1 more codes
INVALID_INPUT
Non-applied receipt codes
INVALID_TARGETLEVEL_OUT_OF_RANGEINVALID_INPUT
1 more codes
NO_COMPATIBLE_PREVIOUS
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