Summary
Advanced alias for lists.applyStyle. Apply a captured ListTemplate to the target list (abstract-scoped, no clone-on-write).- Operation ID:
lists.applyTemplate - API member path:
editor.doc.lists.applyTemplate(...) - Mutates document:
yes - Idempotency:
conditional - Supports tracked mode:
no - Supports dry run:
yes - Deterministic target resolution:
yes
Expected result
Returns a ListsMutateItemResult receipt; reports NO_OP if all levels already match.Input fields
| Field | Type | Required | Description |
|---|---|---|---|
levels | integer[] | no | |
target | ListItemAddress | yes | ListItemAddress |
target.kind | "block" | yes | Constant: "block" |
target.nodeId | string | yes | |
target.nodeType | "listItem" | yes | Constant: "listItem" |
target.story | StoryLocator | no | StoryLocator |
template | object | yes | |
template.levels | object[] | yes | |
template.version | 1 | yes | Constant: 1 |
Example request
{
"levels": [
1
],
"target": {
"kind": "block",
"nodeId": "node-def456",
"nodeType": "listItem",
"story": {
"kind": "story",
"storyType": "body"
}
},
"template": {
"levels": [
{
"level": 1,
"lvlText": "example",
"numFmt": "example"
}
],
"version": 1
}
}
Output fields
Variant 1 (success=true)
| Field | Type | Required | Description |
|---|---|---|---|
item | ListItemAddress | yes | ListItemAddress |
item.kind | "block" | yes | Constant: "block" |
item.nodeId | string | yes | |
item.nodeType | "listItem" | yes | Constant: "listItem" |
item.story | StoryLocator | no | StoryLocator |
success | true | yes | Constant: true |
Variant 2 (success=false)
| Field | Type | Required | Description |
|---|---|---|---|
failure | object | yes | |
failure.code | enum | yes | "NO_OP", "INVALID_TARGET", "LEVEL_OUT_OF_RANGE", "INVALID_INPUT" |
failure.details | any | no | |
failure.message | string | yes | |
success | false | yes | Constant: false |
Example response
{
"item": {
"kind": "block",
"nodeId": "node-def456",
"nodeType": "listItem",
"story": {
"kind": "story",
"storyType": "body"
}
},
"success": true
}
Pre-apply throws
TARGET_NOT_FOUNDCAPABILITY_UNAVAILABLEINVALID_TARGETINVALID_INPUT
Non-applied failure codes
NO_OPINVALID_TARGETLEVEL_OUT_OF_RANGEINVALID_INPUT
Raw schemas
Raw input schema
Raw input schema
{
"additionalProperties": false,
"properties": {
"levels": {
"items": {
"maximum": 8,
"minimum": 0,
"type": "integer"
},
"type": "array"
},
"target": {
"$ref": "#/$defs/ListItemAddress"
},
"template": {
"additionalProperties": false,
"properties": {
"levels": {
"items": {
"additionalProperties": false,
"properties": {
"alignment": {
"enum": [
"left",
"center",
"right"
]
},
"indents": {
"additionalProperties": false,
"properties": {
"firstLine": {
"type": "integer"
},
"hanging": {
"type": "integer"
},
"left": {
"type": "integer"
}
},
"type": "object"
},
"level": {
"maximum": 8,
"minimum": 0,
"type": "integer"
},
"lvlText": {
"type": "string"
},
"markerFont": {
"type": "string"
},
"numFmt": {
"type": "string"
},
"pictureBulletId": {
"type": "integer"
},
"start": {
"type": "integer"
},
"trailingCharacter": {
"enum": [
"tab",
"space",
"nothing"
]
}
},
"required": [
"level"
],
"type": "object"
},
"type": "array"
},
"version": {
"const": 1
}
},
"required": [
"version",
"levels"
],
"type": "object"
}
},
"required": [
"target",
"template"
],
"type": "object"
}
Raw output schema
Raw output schema
{
"oneOf": [
{
"additionalProperties": false,
"properties": {
"item": {
"$ref": "#/$defs/ListItemAddress"
},
"success": {
"const": true
}
},
"required": [
"success",
"item"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"failure": {
"additionalProperties": false,
"properties": {
"code": {
"enum": [
"NO_OP",
"INVALID_TARGET",
"LEVEL_OUT_OF_RANGE",
"INVALID_INPUT"
]
},
"details": {},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"success": {
"const": false
}
},
"required": [
"success",
"failure"
],
"type": "object"
}
]
}
Raw success schema
Raw success schema
{
"additionalProperties": false,
"properties": {
"item": {
"$ref": "#/$defs/ListItemAddress"
},
"success": {
"const": true
}
},
"required": [
"success",
"item"
],
"type": "object"
}
Raw failure schema
Raw failure schema
{
"additionalProperties": false,
"properties": {
"failure": {
"additionalProperties": false,
"properties": {
"code": {
"enum": [
"NO_OP",
"INVALID_TARGET",
"LEVEL_OUT_OF_RANGE",
"INVALID_INPUT"
]
},
"details": {},
"message": {
"type": "string"
}
},
"required": [
"code",
"message"
],
"type": "object"
},
"success": {
"const": false
}
},
"required": [
"success",
"failure"
],
"type": "object"
}

