# Restrict or unrestrict a page

`POST /v1/documents/{documentId}/restricted`

A restricted page does not inherit access from its parent or its teamspace: only its own grants apply (to it and its subpages). Restricting gives you full access so you keep it.

Scope: `docs:write`.

## Request

```bash
curl -X POST "https://api.lydie.co/v1/documents/01JCQ3V5MZ8G4ZK2X7T9R6N1PB/restricted" \
  -H "Authorization: Bearer $LYDIE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "restricted": false
  }'
```

## Path parameters

- `documentId` (ULID, required)

## Body

- `restricted` (boolean, required)

## Response

- `ok` (true, required)

```json
{
  "ok": true
}
```

Errors use the envelope described at https://developers.lydie.co/errors.md.
