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

# format.paragraph.setBorder

> Set border properties for a specific side of a paragraph.

## Summary

Set border properties for a specific side of a paragraph.

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

## Expected result

Returns a ParagraphMutationResult; reports NO\_OP if the border already matches.

## Input fields

| Field | Type | Required | Description |
| - | - | - | - |
| `color` | string | no | |
| `side` | enum | yes | `"top"`, `"bottom"`, `"left"`, `"right"`, `"between"`, `"bar"` |
| `size` | integer | no | |
| `space` | integer | no | |
| `style` | string | yes | |
| `target` | ParagraphAddress \| HeadingAddress \| ListItemAddress | yes | One of: ParagraphAddress, HeadingAddress, ListItemAddress |

### Example request

```json theme={null}
{
  "color": "example",
  "side": "top",
  "size": 1,
  "style": "example",
  "target": {
    "kind": "block",
    "nodeId": "node-def456",
    "nodeType": "paragraph",
    "story": {
      "kind": "story",
      "storyType": "body"
    }
  }
}
```

## 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",
      "story": {
        "kind": "story",
        "storyType": "body"
      }
    }
  },
  "success": true,
  "target": {
    "kind": "block",
    "nodeId": "node-def456",
    "nodeType": "paragraph",
    "story": {
      "kind": "story",
      "storyType": "body"
    }
  }
}
```

## Pre-apply throws

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

## Non-applied failure codes

* `NO_OP`

## Raw schemas

> [accordion] Raw input schema
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "color": {
>       "minLength": 1,
>       "type": "string"
>     },
>     "side": {
>       "enum": [
>         "top",
>         "bottom",
>         "left",
>         "right",
>         "between",
>         "bar"
>       ]
>     },
>     "size": {
>       "minimum": 0,
>       "type": "integer"
>     },
>     "space": {
>       "minimum": 0,
>       "type": "integer"
>     },
>     "style": {
>       "minLength": 1,
>       "type": "string"
>     },
>     "target": {
>       "oneOf": [
>         {
>           "$ref": "#/$defs/ParagraphAddress"
>         },
>         {
>           "$ref": "#/$defs/HeadingAddress"
>         },
>         {
>           "$ref": "#/$defs/ListItemAddress"
>         }
>       ]
>     }
>   },
>   "required": [
>     "target",
>     "side",
>     "style"
>   ],
>   "type": "object"
> }
> ```

> [accordion] 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] 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] 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"
> }
> ```


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