Senso
Sign inSign up

How do I make an install read-only?

A key’s reach is bounded by its knowledge base permissions, enforced per folder. Scoping a key to viewer on selected folders makes that install read-only and blind to everything else.

A node that does not exist and a node you cannot see return the same message, deliberately, so nobody can probe for what exists.

bash
# viewer is read-only: search and browse, no writes. A grant on a folder
# covers everything inside it.
curl -X PUT https://apiv2.senso.ai/api/v1/org/api-keys/$KEY_ID/kb-permissions \
  -H "X-API-Key: $SENSO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"grants": [{"node_id": "8f14e45f-...", "role": "viewer"}]}'

Call it

GET/org/api-keys/{keyId}/kb-permissionsOpen in API reference →What this key can reach.
PUT/org/api-keys/{keyId}/kb-permissionsOpen in API reference →Scope it to folders.
DELETE/org/api-keys/{keyId}/kb-permissionsOpen in API reference →Remove the scoping.