Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.knowledgestack.ai/llms.txt

Use this file to discover all available pages before exploring further.

Roles

Every user in a tenant has one of three roles:
RoleDescription
OwnerFull access to everything. Can manage the tenant itself (billing, deletion). One per tenant.
AdminFull access to all content and settings. Cannot delete the tenant.
UserAccess is restricted to paths they’ve been explicitly granted permission to.
Owners and Admins have unrestricted access to all content — no path permission checks apply. The User role is where path permissions come into play.

Path permissions

Path permissions control which parts of the knowledge base a User can access. Permissions are granted on specific paths and automatically apply to everything underneath.

How it works

When you grant a User read access to /shared/engineering, they can read:
  • /shared/engineering
  • /shared/engineering/design-doc
  • /shared/engineering/design-doc/v1/introduction
  • Everything else under /shared/engineering

Capabilities

CapabilityWhat it allows
Read-onlyView and list resources at and below the granted path
Read-writeEverything in read-only, plus create, update, and delete

Personal workspace

Every user automatically has read-write access to their own workspace at /users/{user_id}. This is where their threads, personal documents, and other user-specific content lives.

Permission examples

Given these permissions for a user:
  • Read-only on /shared
  • Read-write on /shared/output
  • Read-write on /users/abc
Here’s what they can do:
PathCan read?Can write?Why
/sharedYesNoMatches read-only grant
/shared/reports/q1YesNoFalls under read-only grant on /shared
/shared/output/fileYesYesFalls under read-write grant on /shared/output
/private/docNoNoNo grant covers this path

How authorization works for different operations

OperationWhat’s checked
Get a resourceCan the user read this path?
List resourcesResults are filtered to only include paths the user can access.
Create a resourceCan the user write to the parent path?
Move a resourceCan the user write to both the source and destination paths?
SearchResults are automatically filtered to paths the user can read.
Manage tags, permissions, tenantsRequires Admin or Owner role.

Managing permissions

Admins and Owners can manage User permissions through the permissions API.
MethodEndpointDescription
GET/user-permissionsList a user’s permissions
POST/user-permissionsGrant a new permission
PATCH/user-permissions/{id}Update a permission’s capability
DELETE/user-permissions/{id}Revoke a permission

Limits and validation

  • Each user can have a maximum of 50 path permissions.
  • Redundant permissions are rejected. For example, if a user already has read-write on /a, granting read-only on /a/b is unnecessary (the broader permission already covers it).
  • Permissions can be escalated. For example, if a user has read-only on /a, you can grant read-write on /a/b to give them write access to a specific subtree.