# Get a page's sharing settings

`GET /v1/documents/{documentId}/sharing`

Scope: `docs:read`.

## Request

```bash
curl "https://api.lydie.co/v1/documents/01JCQ3V5MZ8G4ZK2X7T9R6N1PB/sharing" \
  -H "Authorization: Bearer $LYDIE_TOKEN"
```

## Path parameters

- `documentId` (ULID, required)

## Response

- `documentId` (ULID, required)
- `myLevel` (string, required): One of: `view`, `comment`, `edit`, `full`.
- `restricted` (boolean, required)
- `teamspaceId` (string, required, nullable)
- `privateOwnerId` (string, required, nullable)
- `grants` (DocumentGrant[], required): Grants on this page.
  - `id` (string, required): (1–64 chars)
  - `documentId` (string, required)
  - `principalType` (string, required): One of: `user`, `teamspace`, `workspace`.
  - `principalId` (string, required)
  - `level` (string, required): One of: `view`, `comment`, `edit`, `full`.
  - `createdBy` (string, required, nullable)
  - `createdAt` (timestamp, required)
- `inherited` (object[], required): Grants on ancestors that apply here, nearest first, up to a restricted page.
  - `documentId` (string, required)
  - `title` (string, required)
  - `grants` (DocumentGrant[], required)
    - `id` (string, required): (1–64 chars)
    - `documentId` (string, required)
    - `principalType` (string, required): One of: `user`, `teamspace`, `workspace`.
    - `principalId` (string, required)
    - `level` (string, required): One of: `view`, `comment`, `edit`, `full`.
    - `createdBy` (string, required, nullable)
    - `createdAt` (timestamp, required)
- `people` (object[], required): Everyone who can access the page and their resolved level.
  - `userId` (string, required): (1–64 chars)
  - `name` (string, required)
  - `email` (string, required)
  - `level` (string, required): One of: `view`, `comment`, `edit`, `full`.

```json
{
  "documentId": "01JCQ3V5MZ8G4ZK2X7T9R6N1PB",
  "myLevel": "view",
  "restricted": false,
  "teamspaceId": null,
  "privateOwnerId": null,
  "grants": [
    {
      "id": "string",
      "documentId": "01JCQ3V5MZ8G4ZK2X7T9R6N1PB",
      "principalType": "user",
      "principalId": "01JCQ3V5MZ8G4ZK2X7T9R6N1PB",
      "level": "view",
      "createdBy": null,
      "createdAt": "2026-11-12T09:30:00.000Z"
    }
  ],
  "inherited": [
    {
      "documentId": "01JCQ3V5MZ8G4ZK2X7T9R6N1PB",
      "title": "Meeting notes",
      "grants": [
        {
          "id": null,
          "documentId": null,
          "principalType": "user",
          "principalId": null,
          "level": "view",
          "createdBy": null,
          "createdAt": "2026-11-12T09:30:00.000Z"
        }
      ]
    }
  ],
  "people": [
    {
      "userId": "kG7qL2m9XzP4tR8w",
      "name": "Notes",
      "email": "ada@example.com",
      "level": "view"
    }
  ]
}
```

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