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

# permissionRanges.create

> Create a permission range exception region in the document. Inserts matched permStart/permEnd markers at the target.

## Summary

Create a permission range exception region in the document. Inserts matched permStart/permEnd markers at the target.

* Operation ID: `permissionRanges.create`
* API member path: `editor.doc.permissionRanges.create(...)`
* Mutates document: `yes`
* Idempotency: `non-idempotent`
* Supports tracked mode: `no`
* Supports dry run: `yes`
* Deterministic target resolution: `yes`

## Expected result

Returns a PermissionRangeMutationResult with the created range info on success.

## Input fields

| Field            | Type            | Required | Description              |
| ---------------- | --------------- | -------- | ------------------------ |
| `id`             | string          | no       |                          |
| `principal`      | object          | yes      |                          |
| `principal.id`   | string          | no       |                          |
| `principal.kind` | enum            | yes      | `"everyone"`, `"editor"` |
| `target`         | SelectionTarget | yes      | SelectionTarget          |
| `target.end`     | SelectionPoint  | yes      | SelectionPoint           |
| `target.kind`    | `"selection"`   | yes      | Constant: `"selection"`  |
| `target.start`   | SelectionPoint  | yes      | SelectionPoint           |
| `target.story`   | StoryLocator    | no       | StoryLocator             |

### Example request

```json theme={null}
{
  "id": "id-001",
  "principal": {
    "id": "id-001",
    "kind": "everyone"
  },
  "target": {
    "end": {
      "blockId": "block-abc123",
      "kind": "text",
      "offset": 0,
      "story": {
        "kind": "story",
        "storyType": "body"
      }
    },
    "kind": "selection",
    "start": {
      "blockId": "block-abc123",
      "kind": "text",
      "offset": 0,
      "story": {
        "kind": "story",
        "storyType": "body"
      }
    },
    "story": {
      "kind": "story",
      "storyType": "body"
    }
  }
}
```

## Output fields

*No fields.*

### Example response

```json theme={null}
{}
```

## Pre-apply throws

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

## Non-applied failure codes

* None

## Raw schemas

<Accordion title="Raw input schema">
  ```json theme={null}
  {
    "additionalProperties": false,
    "properties": {
      "id": {
        "type": "string"
      },
      "principal": {
        "additionalProperties": false,
        "properties": {
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "everyone",
              "editor"
            ],
            "type": "string"
          }
        },
        "required": [
          "kind"
        ],
        "type": "object"
      },
      "target": {
        "$ref": "#/$defs/SelectionTarget"
      }
    },
    "required": [
      "target",
      "principal"
    ],
    "type": "object"
  }
  ```
</Accordion>

<Accordion title="Raw output schema">
  ```json theme={null}
  {
    "type": "object"
  }
  ```
</Accordion>

<Accordion title="Raw success schema">
  ```json theme={null}
  {
    "type": "object"
  }
  ```
</Accordion>

<Accordion title="Raw failure schema">
  ```json theme={null}
  {
    "type": "object"
  }
  ```
</Accordion>
