Skip to content
LydieDevelopers
Menu

Share a page

View as Markdown
POST/v1/documents/{documentId}/grants

Gives a user, a teamspace's members or everyone in the workspace (principalType workspace, principalId = workspace id) a level on the page and its subpages. Needs full access.

Request
curl -X POST "https://api.lydie.co/v1/documents/01JCQ3V5MZ8G4ZK2X7T9R6N1PB/grants" \
  -H "Authorization: Bearer $LYDIE_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "principalType": "user",
    "principalId": "01JCQ3V5MZ8G4ZK2X7T9R6N1PB",
    "level": "view"
  }'

Path parameters

Body

Response

200
{
  "id": "string",
  "documentId": "01JCQ3V5MZ8G4ZK2X7T9R6N1PB",
  "principalType": "user",
  "principalId": "01JCQ3V5MZ8G4ZK2X7T9R6N1PB",
  "level": "view",
  "createdBy": null,
  "createdAt": "2026-11-12T09:30:00.000Z"
}

Errors use one envelope for every endpoint. See Errors and versions.