# permissionRanges.updatePrincipal

> Change which principal is allowed to edit a permission range. Updates the principal fields on the start marker.



- Member path: `doc.permissionRanges.updatePrincipal(…)`
- Mutates document: yes
- Idempotency: `idempotent`
- Supports tracked mode: no
- Supports dry run: yes

## Expected result

Returns a PermissionRangeMutationResult with the updated range info on success.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {},
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "principal": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "everyone",
            "editor"
          ]
        },
        "id": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind"
      ]
    }
  },
  "additionalProperties": false,
  "required": [
    "id",
    "principal"
  ]
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {},
  "type": "object"
}
```

## Pre-apply throws

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

## Non-applied receipt codes

- None

