Alpha: Document API is currently alpha and subject to breaking changes.
Summary
Set the absolute nesting level (0..8) of a list item.- Operation ID:
lists.setLevel - API member path:
editor.doc.lists.setLevel(...) - 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 already at the target level.Input fields
| Field | Type | Required | Description |
|---|---|---|---|
level | integer | yes | |
target | ListItemAddress | yes | ListItemAddress |
target.kind | "block" | yes | Constant: "block" |
target.nodeId | string | yes | |
target.nodeType | "listItem" | yes | Constant: "listItem" |
Example request
Output fields
Variant 1 (item.kind=“block”)
| Field | Type | Required | Description |
|---|---|---|---|
item | ListItemAddress | yes | ListItemAddress |
item.kind | "block" | yes | Constant: "block" |
item.nodeId | string | yes | |
item.nodeType | "listItem" | yes | Constant: "listItem" |
success | true | yes | Constant: true |
Variant 2 (success=false)
| Field | Type | Required | Description |
|---|---|---|---|
failure | object | yes | |
failure.code | enum | yes | "INVALID_TARGET", "LEVEL_OUT_OF_RANGE", "NO_OP" |
failure.details | any | no | |
failure.message | string | yes | |
success | false | yes | Constant: false |
Example response
Pre-apply throws
TARGET_NOT_FOUNDCAPABILITY_UNAVAILABLEINVALID_TARGET
Non-applied failure codes
INVALID_TARGETLEVEL_OUT_OF_RANGENO_OP
Raw schemas
Raw input schema
Raw input schema
Raw output schema
Raw output schema
Raw success schema
Raw success schema
Raw failure schema
Raw failure schema

