# sections.setPageNumbering

> Set page numbering format/start and chapter numbering settings for a section.



- Member path: `doc.sections.setPageNumbering(…)`
- Mutates document: yes
- Idempotency: `conditional`
- Supports tracked mode: no
- Supports dry run: yes

## Expected result

Returns a SectionMutationResult receipt; reports NO_OP if page numbering settings already match.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "SectionAddress": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "section"
        },
        "sectionId": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "sectionId"
      ]
    }
  },
  "type": "object",
  "properties": {
    "target": {
      "$ref": "#/$defs/SectionAddress"
    },
    "start": {
      "type": "integer",
      "minimum": 1
    },
    "format": {
      "enum": [
        "decimal",
        "lowerLetter",
        "upperLetter",
        "lowerRoman",
        "upperRoman",
        "numberInDash"
      ]
    },
    "chapterStyle": {
      "type": "integer",
      "minimum": 1
    },
    "chapterSeparator": {
      "type": "string",
      "enum": [
        "hyphen",
        "period",
        "colon",
        "emDash",
        "enDash"
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "target"
  ],
  "anyOf": [
    {
      "required": [
        "target",
        "start"
      ]
    },
    {
      "required": [
        "target",
        "format"
      ]
    },
    {
      "required": [
        "target",
        "chapterStyle"
      ]
    },
    {
      "required": [
        "target",
        "chapterSeparator"
      ]
    }
  ]
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "SectionAddress": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "section"
        },
        "sectionId": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "sectionId"
      ]
    }
  },
  "oneOf": [
    {
      "type": "object",
      "properties": {
        "success": {
          "const": true
        },
        "section": {
          "$ref": "#/$defs/SectionAddress"
        }
      },
      "additionalProperties": false,
      "required": [
        "success",
        "section"
      ]
    },
    {
      "type": "object",
      "properties": {
        "success": {
          "const": false
        },
        "failure": {
          "type": "object",
          "properties": {
            "code": {
              "enum": [
                "NO_OP",
                "INVALID_TARGET",
                "CAPABILITY_UNAVAILABLE"
              ]
            },
            "message": {
              "type": "string"
            },
            "details": {}
          },
          "additionalProperties": false,
          "required": [
            "code",
            "message"
          ]
        }
      },
      "additionalProperties": false,
      "required": [
        "success",
        "failure"
      ]
    }
  ]
}
```

## Pre-apply throws

- `TARGET_NOT_FOUND`
- `INVALID_TARGET`
- `INVALID_INPUT`
- `CAPABILITY_UNAVAILABLE`
- `INTERNAL_ERROR`

## Non-applied receipt codes

- `NO_OP`
- `INVALID_TARGET`
- `CAPABILITY_UNAVAILABLE`

