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

# protection.get

> Read the current document protection state including editing restrictions, write protection, and read-only recommendation.

## Summary

Read the current document protection state including editing restrictions, write protection, and read-only recommendation.

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

## Expected result

Returns a DocumentProtectionState with editingRestriction, writeProtection, and readOnlyRecommended fields.

## Input fields

*No fields.*

### Example request

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

## Output fields

| Field | Type | Required | Description |
| - | - | - | - |
| `editingRestriction` | object | yes | |
| `editingRestriction.enforced` | boolean | yes | |
| `editingRestriction.formattingRestricted` | boolean | yes | |
| `editingRestriction.mode` | enum | yes | `"none"`, `"readOnly"`, `"comments"`, `"trackedChanges"`, `"forms"` |
| `editingRestriction.passwordProtected` | boolean | yes | |
| `editingRestriction.runtimeEnforced` | boolean | yes | |
| `readOnlyRecommended` | boolean | yes | |
| `writeProtection` | object | yes | |
| `writeProtection.enabled` | boolean | yes | |
| `writeProtection.passwordProtected` | boolean | yes | |

### Example response

```json theme={null}
{
  "editingRestriction": {
    "enforced": true,
    "formattingRestricted": true,
    "mode": "none",
    "passwordProtected": true,
    "runtimeEnforced": true
  },
  "readOnlyRecommended": true,
  "writeProtection": {
    "enabled": true,
    "passwordProtected": true
  }
}
```

## Pre-apply throws

* `CAPABILITY_UNAVAILABLE`

## Non-applied failure codes

* None

## Raw schemas

> [accordion] Raw input schema
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {},
>   "type": "object"
> }
> ```

> [accordion] Raw output schema
>
> ```json theme={null}
> {
>   "additionalProperties": false,
>   "properties": {
>     "editingRestriction": {
>       "additionalProperties": false,
>       "properties": {
>         "enforced": {
>           "type": "boolean"
>         },
>         "formattingRestricted": {
>           "type": "boolean"
>         },
>         "mode": {
>           "enum": [
>             "none",
>             "readOnly",
>             "comments",
>             "trackedChanges",
>             "forms"
>           ],
>           "type": "string"
>         },
>         "passwordProtected": {
>           "type": "boolean"
>         },
>         "runtimeEnforced": {
>           "type": "boolean"
>         }
>       },
>       "required": [
>         "mode",
>         "enforced",
>         "runtimeEnforced",
>         "passwordProtected",
>         "formattingRestricted"
>       ],
>       "type": "object"
>     },
>     "readOnlyRecommended": {
>       "type": "boolean"
>     },
>     "writeProtection": {
>       "additionalProperties": false,
>       "properties": {
>         "enabled": {
>           "type": "boolean"
>         },
>         "passwordProtected": {
>           "type": "boolean"
>         }
>       },
>       "required": [
>         "enabled",
>         "passwordProtected"
>       ],
>       "type": "object"
>     }
>   },
>   "required": [
>     "editingRestriction",
>     "writeProtection",
>     "readOnlyRecommended"
>   ],
>   "type": "object"
> }
> ```


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