> ## Documentation Index
> Fetch the complete documentation index at: https://superdoc-nick-sd-2070-add-content-controls-namespace-to-doc.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# format.paragraph.setOutlineLevel

> Set the paragraph outline level (0–9) or null to clear.

> Alpha: Document API is currently alpha and subject to breaking changes.

## Summary

Set the paragraph outline level (0–9) or null to clear.

* Operation ID: `format.paragraph.setOutlineLevel`
* API member path: `editor.doc.format.paragraph.setOutlineLevel(...)`
* Mutates document: `yes`
* Idempotency: `conditional`
* Supports tracked mode: `no`
* Supports dry run: `yes`
* Deterministic target resolution: `yes`

## Expected result

Returns a ParagraphMutationResult; reports NO\_OP if outline level already matches.

## Input fields

| Field          | Type                | Required          | Description     |                       |                                                           |
| -------------- | ------------------- | ----------------- | --------------- | --------------------- | --------------------------------------------------------- |
| `outlineLevel` | integer \\          | null              | yes             | One of: integer, null |                                                           |
| `target`       | ParagraphAddress \\ | HeadingAddress \\ | ListItemAddress | yes                   | One of: ParagraphAddress, HeadingAddress, ListItemAddress |

### Example request

```json theme={null}
{
  "outlineLevel": 1,
  "target": {
    "kind": "block",
    "nodeId": "node-def456",
    "nodeType": "paragraph"
  }
}
```

## Output fields

### Variant 1 (success=true)

| Field               | Type                | Required          | Description      |     |                                                           |
| ------------------- | ------------------- | ----------------- | ---------------- | --- | --------------------------------------------------------- |
| `resolution`        | object              | yes               |                  |     |                                                           |
| `resolution.target` | ParagraphAddress \\ | HeadingAddress \\ | ListItemAddress  | yes | One of: ParagraphAddress, HeadingAddress, ListItemAddress |
| `success`           | `true`              | yes               | Constant: `true` |     |                                                           |
| `target`            | ParagraphAddress \\ | HeadingAddress \\ | ListItemAddress  | yes | One of: ParagraphAddress, HeadingAddress, ListItemAddress |

### Variant 2 (success=false)

| Field               | Type                | Required          | Description       |    |                                                           |
| ------------------- | ------------------- | ----------------- | ----------------- | -- | --------------------------------------------------------- |
| `failure`           | object              | yes               |                   |    |                                                           |
| `failure.code`      | enum                | yes               | `"NO_OP"`         |    |                                                           |
| `failure.details`   | any                 | no                |                   |    |                                                           |
| `failure.message`   | string              | yes               |                   |    |                                                           |
| `resolution`        | object              | no                |                   |    |                                                           |
| `resolution.target` | ParagraphAddress \\ | HeadingAddress \\ | ListItemAddress   | no | One of: ParagraphAddress, HeadingAddress, ListItemAddress |
| `success`           | `false`             | yes               | Constant: `false` |    |                                                           |

### Example response

```json theme={null}
{
  "resolution": {
    "target": {
      "kind": "block",
      "nodeId": "node-def456",
      "nodeType": "paragraph"
    }
  },
  "success": true,
  "target": {
    "kind": "block",
    "nodeId": "node-def456",
    "nodeType": "paragraph"
  }
}
```

## Pre-apply throws

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

## Non-applied failure codes

* `NO_OP`

## Raw schemas

<Accordion title="Raw input schema">
  ```json theme={null}
  {
    "additionalProperties": false,
    "properties": {
      "outlineLevel": {
        "oneOf": [
          {
            "maximum": 9,
            "minimum": 0,
            "type": "integer"
          },
          {
            "type": "null"
          }
        ]
      },
      "target": {
        "oneOf": [
          {
            "$ref": "#/$defs/ParagraphAddress"
          },
          {
            "$ref": "#/$defs/HeadingAddress"
          },
          {
            "$ref": "#/$defs/ListItemAddress"
          }
        ]
      }
    },
    "required": [
      "target",
      "outlineLevel"
    ],
    "type": "object"
  }
  ```
</Accordion>

<Accordion title="Raw output schema">
  ```json theme={null}
  {
    "oneOf": [
      {
        "additionalProperties": false,
        "properties": {
          "resolution": {
            "additionalProperties": false,
            "properties": {
              "target": {
                "oneOf": [
                  {
                    "$ref": "#/$defs/ParagraphAddress"
                  },
                  {
                    "$ref": "#/$defs/HeadingAddress"
                  },
                  {
                    "$ref": "#/$defs/ListItemAddress"
                  }
                ]
              }
            },
            "required": [
              "target"
            ],
            "type": "object"
          },
          "success": {
            "const": true
          },
          "target": {
            "oneOf": [
              {
                "$ref": "#/$defs/ParagraphAddress"
              },
              {
                "$ref": "#/$defs/HeadingAddress"
              },
              {
                "$ref": "#/$defs/ListItemAddress"
              }
            ]
          }
        },
        "required": [
          "success",
          "target",
          "resolution"
        ],
        "type": "object"
      },
      {
        "additionalProperties": false,
        "properties": {
          "failure": {
            "additionalProperties": false,
            "properties": {
              "code": {
                "enum": [
                  "NO_OP"
                ]
              },
              "details": {},
              "message": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message"
            ],
            "type": "object"
          },
          "resolution": {
            "additionalProperties": false,
            "properties": {
              "target": {
                "oneOf": [
                  {
                    "$ref": "#/$defs/ParagraphAddress"
                  },
                  {
                    "$ref": "#/$defs/HeadingAddress"
                  },
                  {
                    "$ref": "#/$defs/ListItemAddress"
                  }
                ]
              }
            },
            "required": [
              "target"
            ],
            "type": "object"
          },
          "success": {
            "const": false
          }
        },
        "required": [
          "success",
          "failure"
        ],
        "type": "object"
      }
    ]
  }
  ```
</Accordion>

<Accordion title="Raw success schema">
  ```json theme={null}
  {
    "additionalProperties": false,
    "properties": {
      "resolution": {
        "additionalProperties": false,
        "properties": {
          "target": {
            "oneOf": [
              {
                "$ref": "#/$defs/ParagraphAddress"
              },
              {
                "$ref": "#/$defs/HeadingAddress"
              },
              {
                "$ref": "#/$defs/ListItemAddress"
              }
            ]
          }
        },
        "required": [
          "target"
        ],
        "type": "object"
      },
      "success": {
        "const": true
      },
      "target": {
        "oneOf": [
          {
            "$ref": "#/$defs/ParagraphAddress"
          },
          {
            "$ref": "#/$defs/HeadingAddress"
          },
          {
            "$ref": "#/$defs/ListItemAddress"
          }
        ]
      }
    },
    "required": [
      "success",
      "target",
      "resolution"
    ],
    "type": "object"
  }
  ```
</Accordion>

<Accordion title="Raw failure schema">
  ```json theme={null}
  {
    "additionalProperties": false,
    "properties": {
      "failure": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "enum": [
              "NO_OP"
            ]
          },
          "details": {},
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "resolution": {
        "additionalProperties": false,
        "properties": {
          "target": {
            "oneOf": [
              {
                "$ref": "#/$defs/ParagraphAddress"
              },
              {
                "$ref": "#/$defs/HeadingAddress"
              },
              {
                "$ref": "#/$defs/ListItemAddress"
              }
            ]
          }
        },
        "required": [
          "target"
        ],
        "type": "object"
      },
      "success": {
        "const": false
      }
    },
    "required": [
      "success",
      "failure"
    ],
    "type": "object"
  }
  ```
</Accordion>
