> ## Documentation Index
> Fetch the complete documentation index at: https://superdoc-caio-pizzol-docs-ai-core-preset.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# sections.setPageBorders

> Set page border configuration for a section.

## Summary

Set page border configuration for a section.

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

## Expected result

Returns a SectionMutationResult receipt; reports NO\_OP if page border configuration already matches.

## Input fields

| Field                   | Type                                          | Required | Description                                   |
| ----------------------- | --------------------------------------------- | -------- | --------------------------------------------- |
| `borders`               | any \| any \| any \| any \| any \| any \| any | yes      | One of: any, any, any, any, any, any, any     |
| `borders.bottom`        | any \| any \| any \| any \| any \| any        | no       | One of: any, any, any, any, any, any          |
| `borders.bottom.color`  | string                                        | no       |                                               |
| `borders.bottom.frame`  | boolean                                       | no       |                                               |
| `borders.bottom.shadow` | boolean                                       | no       |                                               |
| `borders.bottom.size`   | number                                        | no       |                                               |
| `borders.bottom.space`  | number                                        | no       |                                               |
| `borders.bottom.style`  | string                                        | no       |                                               |
| `borders.display`       | enum                                          | no       | `"allPages"`, `"firstPage"`, `"notFirstPage"` |
| `borders.left`          | any \| any \| any \| any \| any \| any        | no       | One of: any, any, any, any, any, any          |
| `borders.left.color`    | string                                        | no       |                                               |
| `borders.left.frame`    | boolean                                       | no       |                                               |
| `borders.left.shadow`   | boolean                                       | no       |                                               |
| `borders.left.size`     | number                                        | no       |                                               |
| `borders.left.space`    | number                                        | no       |                                               |
| `borders.left.style`    | string                                        | no       |                                               |
| `borders.offsetFrom`    | enum                                          | no       | `"page"`, `"text"`                            |
| `borders.right`         | any \| any \| any \| any \| any \| any        | no       | One of: any, any, any, any, any, any          |
| `borders.right.color`   | string                                        | no       |                                               |
| `borders.right.frame`   | boolean                                       | no       |                                               |
| `borders.right.shadow`  | boolean                                       | no       |                                               |
| `borders.right.size`    | number                                        | no       |                                               |
| `borders.right.space`   | number                                        | no       |                                               |
| `borders.right.style`   | string                                        | no       |                                               |
| `borders.top`           | any \| any \| any \| any \| any \| any        | no       | One of: any, any, any, any, any, any          |
| `borders.top.color`     | string                                        | no       |                                               |
| `borders.top.frame`     | boolean                                       | no       |                                               |
| `borders.top.shadow`    | boolean                                       | no       |                                               |
| `borders.top.size`      | number                                        | no       |                                               |
| `borders.top.space`     | number                                        | no       |                                               |
| `borders.top.style`     | string                                        | no       |                                               |
| `borders.zOrder`        | enum                                          | no       | `"front"`, `"back"`                           |
| `target`                | SectionAddress                                | yes      | SectionAddress                                |
| `target.kind`           | `"section"`                                   | yes      | Constant: `"section"`                         |
| `target.sectionId`      | string                                        | yes      |                                               |

### Example request

```json theme={null}
{
  "borders": {
    "display": "allPages"
  },
  "target": {
    "kind": "section",
    "sectionId": "example"
  }
}
```

## Output fields

### Variant 1 (success=true)

| Field               | Type           | Required | Description           |
| ------------------- | -------------- | -------- | --------------------- |
| `section`           | SectionAddress | yes      | SectionAddress        |
| `section.kind`      | `"section"`    | yes      | Constant: `"section"` |
| `section.sectionId` | string         | yes      |                       |
| `success`           | `true`         | yes      | Constant: `true`      |

### Variant 2 (success=false)

| Field             | Type    | Required | Description                                               |
| ----------------- | ------- | -------- | --------------------------------------------------------- |
| `failure`         | object  | yes      |                                                           |
| `failure.code`    | enum    | yes      | `"NO_OP"`, `"INVALID_TARGET"`, `"CAPABILITY_UNAVAILABLE"` |
| `failure.details` | any     | no       |                                                           |
| `failure.message` | string  | yes      |                                                           |
| `success`         | `false` | yes      | Constant: `false`                                         |

### Example response

```json theme={null}
{
  "section": {
    "kind": "section",
    "sectionId": "example"
  },
  "success": true
}
```

## Pre-apply throws

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

## Non-applied failure codes

* `NO_OP`
* `INVALID_TARGET`
* `CAPABILITY_UNAVAILABLE`

## Raw schemas

<Accordion title="Raw input schema">
  ```json theme={null}
  {
    "additionalProperties": false,
    "properties": {
      "borders": {
        "additionalProperties": false,
        "oneOf": [
          {
            "required": [
              "display"
            ]
          },
          {
            "required": [
              "offsetFrom"
            ]
          },
          {
            "required": [
              "zOrder"
            ]
          },
          {
            "required": [
              "top"
            ]
          },
          {
            "required": [
              "right"
            ]
          },
          {
            "required": [
              "bottom"
            ]
          },
          {
            "required": [
              "left"
            ]
          }
        ],
        "properties": {
          "bottom": {
            "additionalProperties": false,
            "oneOf": [
              {
                "required": [
                  "style"
                ]
              },
              {
                "required": [
                  "size"
                ]
              },
              {
                "required": [
                  "space"
                ]
              },
              {
                "required": [
                  "color"
                ]
              },
              {
                "required": [
                  "shadow"
                ]
              },
              {
                "required": [
                  "frame"
                ]
              }
            ],
            "properties": {
              "color": {
                "type": "string"
              },
              "frame": {
                "type": "boolean"
              },
              "shadow": {
                "type": "boolean"
              },
              "size": {
                "minimum": 0,
                "type": "number"
              },
              "space": {
                "minimum": 0,
                "type": "number"
              },
              "style": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "display": {
            "enum": [
              "allPages",
              "firstPage",
              "notFirstPage"
            ]
          },
          "left": {
            "additionalProperties": false,
            "oneOf": [
              {
                "required": [
                  "style"
                ]
              },
              {
                "required": [
                  "size"
                ]
              },
              {
                "required": [
                  "space"
                ]
              },
              {
                "required": [
                  "color"
                ]
              },
              {
                "required": [
                  "shadow"
                ]
              },
              {
                "required": [
                  "frame"
                ]
              }
            ],
            "properties": {
              "color": {
                "type": "string"
              },
              "frame": {
                "type": "boolean"
              },
              "shadow": {
                "type": "boolean"
              },
              "size": {
                "minimum": 0,
                "type": "number"
              },
              "space": {
                "minimum": 0,
                "type": "number"
              },
              "style": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "offsetFrom": {
            "enum": [
              "page",
              "text"
            ]
          },
          "right": {
            "additionalProperties": false,
            "oneOf": [
              {
                "required": [
                  "style"
                ]
              },
              {
                "required": [
                  "size"
                ]
              },
              {
                "required": [
                  "space"
                ]
              },
              {
                "required": [
                  "color"
                ]
              },
              {
                "required": [
                  "shadow"
                ]
              },
              {
                "required": [
                  "frame"
                ]
              }
            ],
            "properties": {
              "color": {
                "type": "string"
              },
              "frame": {
                "type": "boolean"
              },
              "shadow": {
                "type": "boolean"
              },
              "size": {
                "minimum": 0,
                "type": "number"
              },
              "space": {
                "minimum": 0,
                "type": "number"
              },
              "style": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "top": {
            "additionalProperties": false,
            "oneOf": [
              {
                "required": [
                  "style"
                ]
              },
              {
                "required": [
                  "size"
                ]
              },
              {
                "required": [
                  "space"
                ]
              },
              {
                "required": [
                  "color"
                ]
              },
              {
                "required": [
                  "shadow"
                ]
              },
              {
                "required": [
                  "frame"
                ]
              }
            ],
            "properties": {
              "color": {
                "type": "string"
              },
              "frame": {
                "type": "boolean"
              },
              "shadow": {
                "type": "boolean"
              },
              "size": {
                "minimum": 0,
                "type": "number"
              },
              "space": {
                "minimum": 0,
                "type": "number"
              },
              "style": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "zOrder": {
            "enum": [
              "front",
              "back"
            ]
          }
        },
        "type": "object"
      },
      "target": {
        "$ref": "#/$defs/SectionAddress"
      }
    },
    "required": [
      "target",
      "borders"
    ],
    "type": "object"
  }
  ```
</Accordion>

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

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

<Accordion title="Raw failure schema">
  ```json theme={null}
  {
    "additionalProperties": false,
    "properties": {
      "failure": {
        "additionalProperties": false,
        "properties": {
          "code": {
            "enum": [
              "NO_OP",
              "INVALID_TARGET",
              "CAPABILITY_UNAVAILABLE"
            ]
          },
          "details": {},
          "message": {
            "type": "string"
          }
        },
        "required": [
          "code",
          "message"
        ],
        "type": "object"
      },
      "success": {
        "const": false
      }
    },
    "required": [
      "success",
      "failure"
    ],
    "type": "object"
  }
  ```
</Accordion>
