Overview
Every document has an access policy that controls who can interact with it. The policy uses a deny-by-default model with explicit grants.Policy shape
Principals
| Type | Matches | Use case |
|---|---|---|
owner | The user who uploaded the document | Full control |
public | Any caller, no auth required | Public-facing documents (HKEX filings, shared reports) |
user | A specific user ID | Shared with a teammate |
org | All members of an org | Org-wide access |
project | All keys scoped to a project | Project-level access |
Actions
| Action | What it permits |
|---|---|
admin | All operations (superset) |
query | Chat completions, structured extraction |
read_content | Page markdown, node content |
read_meta | Document status, metadata |
download_pdf | Original PDF download |
update_config | Change settings and access policy |
trigger_extract | Start extraction jobs |
publish | Publish to public corpus |
create_link | Create share links |
list_links | View existing share links |
Setting the policy
Response (200)
Grant constraints
Grants can have optional constraints:| Constraint | Effect |
|---|---|
expires_at | Grant stops working after this time |
not_before | Grant only active after this time |
redaction_role | Applies PII redaction profile (admin, viewer, public) |