Authentication
Every request to /api/v1/ sends an API key and its secret in two headers:
curl https://documents.finopsbricks.com/api/v1/documents \
-H "api-key: YOUR_KEY" \
-H "api-secret: YOUR_SECRET"
Create keys in the app under Settings › API keys. A key belongs to one organization and only sees that organization's documents.
Permissions
Each key has per-resource permissions. For documents:
| Permission | Allows |
|---|---|
read | GET /documents, GET /documents/:id, GET /documents/:id/file |
create | POST /documents (upload) |
edit | PUT /documents/:id |
A missing or wrong key returns 401 UNAUTHORIZED; a key without the permission returns
403 FORBIDDEN, for example API key lacks documents:create permission.