> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superdoc.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# lists.applyPreset

> Apply a built-in list formatting preset to the target list.

## Summary

Apply a built-in list formatting preset to the target list.

* Operation ID: `lists.applyPreset`
* API member path: `editor.doc.lists.applyPreset(...)`
* 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 the preset.

## Input fields

| Field | Type | Required | Description |
| - | - | - | - |
| `levels` | integer\[] | no | |
| `preset` | enum | yes | `"decimal"`, `"decimalParenthesis"`, `"lowerLetter"`, `"upperLetter"`, `"lowerRoman"`, `"upperRoman"`, `"disc"`, `"circle"`, `"square"`, `"dash"` |
| `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 |

### Example request

```json theme={null}
{
  "levels": [
    1
  ],
  "preset": "decimal",
  "target": {
    "kind": "block",
    "nodeId": "node-def456",
    "nodeType": "listItem",
    "story": {
      "kind": "story",
      "storyType": "body"
    }
  }
}
```

## 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

```json theme={null}
{
  "item": {
    "kind": "block",
    "nodeId": "node-def456",
    "nodeType": "listItem",
    "story": {
      "kind": "story",
      "storyType": "body"
    }
  },
  "success": true
}
```

## Pre-apply throws

* `TARGET_NOT_FOUND`
* `CAPABILITY_UNAVAILABLE`
* `INVALID_TARGET`
* `INVALID_INPUT`

## Non-applied failure codes

* `NO_OP`
* `INVALID_TARGET`
* `LEVEL_OUT_OF_RANGE`
* `INVALID_INPUT`

## Raw schemas

> [accordion] Raw input schema
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "levels": {
>       "items": {
>         "maximum": 8,
>         "minimum": 0,
>         "type": "integer"
>       },
>       "type": "array"
>     },
>     "preset": {
>       "enum": [
>         "decimal",
>         "decimalParenthesis",
>         "lowerLetter",
>         "upperLetter",
>         "lowerRoman",
>         "upperRoman",
>         "disc",
>         "circle",
>         "square",
>         "dash"
>       ]
>     },
>     "target": {
>       "$ref": "#/$defs/ListItemAddress"
>     }
>   },
>   "required": [
>     "target",
>     "preset"
>   ],
>   "type": "object"
> }
> ```

> [accordion] Raw output schema
>
> ```json theme={null}
> {
>   "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"
>     }
>   ]
> }
> ```

> [accordion] Raw success schema
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "item": {
>       "$ref": "#/$defs/ListItemAddress"
>     },
>     "success": {
>       "const": true
>     }
>   },
>   "required": [
>     "success",
>     "item"
>   ],
>   "type": "object"
> }
> ```

> [accordion] Raw failure schema
>
> ```json theme={null}
> {
>   "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"
> }
> ```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.