Developers
API reference
Base URL: http://127.0.0.1:8200. Every request except /healthz carries Authorization: Bearer <your API key>.
A path starts at the name of the folder your key was made for: Finance/2026/a.pdf. Any part of a path may be an item's id instead of its name. Two items can share a name, because the vault never sees names; the answer is then ambiguous_path, and you use the id. URL-encode each part of a path as usual.
Routes
| Method and path | Needs | What it does |
|---|---|---|
GET /healthz | nothing | {"ok": true} when the gateway is up |
GET /v1 | any key | Checks the key. Lists the folders it reaches, with permission |
GET /v1/list/<path> | View | What is in a folder. ?limit= (1 to 1000, default 100), ?offset= |
GET /v1/meta/<path> | View | One file or folder, without its bytes |
GET /v1/files/<path> | View | A file's bytes. ?download=1 forces a download. Range is honoured |
PUT /v1/files/<path> | Edit | Upload the request body as a file of any size. ?replace=true adds a version |
POST /v1/folders/<path> | Edit | Make a folder |
POST /v1/move | Edit | Rename or move: body {"from": "<path>", "to": "<path>"} |
DELETE /v1/files/<path> | Edit | Move a file or folder to the vault owner's trash |
GET /v1/versions/<path> | Edit | Every version a file has had, newest first |
An item
{
"id": "0f8fad5b-d9cb-469f-a165-70867728950e",
"name": "invoice.pdf",
"path": "Finance/invoice.pdf",
"type": "file",
"size": 48213,
"mime": "application/pdf",
"version": 1,
"modified": "2026-11-15T14:02:11Z",
"permission": "edit"
}
type is file or folder. size, mime and version are null for a folder. A listing is {"folder": <item>, "items": [<item>, ...], "has_more": true|false}. An item the gateway could not open is listed with an error field and an empty name.
name, path and mime are whatever the writer typed. Treat them as untrusted input.
Uploading
- Send the bytes as the body.
Content-Typebecomes the file's type; without one it isapplication/octet-stream. - A
PUTto a path that exists answers409 already_exists. Add?replace=trueto make a new version; the old bytes stay in the file's history. - Answers
201with the item for a new file,200for a new version. - A retried upload is safe: a plain
PUTthat already landed answersalready_exists, and a retriedreplace=trueonly adds one more version.
Reading
- A file is shown in place only if a browser cannot run it: PDF, plain text, common images, audio and video. Everything else, HTML and SVG included, is sent as a download whatever you ask for.
Range: bytes=a-banswers206with those bytes. A range that starts past the end answers416. Several ranges in one header are answered with the whole file.- Versions are listed, not read: the vault serves a key the current bytes only. An earlier version comes back when the vault's owner restores it.
Errors
Every refusal has the same shape, with a code you can match on:
{"error": {"code": "not_found", "message": "nothing called 'a.pdf' here"}}
| code | status | when |
|---|---|---|
invalid_key | 401 | no key, a key that is mistyped or cut short, or one the vault has revoked |
key_out_of_date | 401 | the vault's owner changed their password or recovery key; ask them for a replacement key |
not_trusted | 403 | a folder the owner did not sign over to this key; tell the owner |
read_only | 403 | a write with a View key, on the key's own folder, or between two folders |
not_found | 404 | no such path, or nothing this key reaches |
already_exists | 409 | something of that name is there already |
ambiguous_path | 409 | two items share that name; use the id |
would_widen_access | 409 | a move into a folder more people can reach |
vault_busy | 409 | the owner is changing keys right now; try again in a few minutes |
conflict | 409 | any other clash the vault reports |
too_large | 413 | more than a key may upload in a day, or the owner's storage is full |
bad_range | 416 | a Range that starts past the end of the file |
rate_limited | 429 | a budget is spent; Retry-After says how long to wait |
bad_request | 400 | a request that is not well formed |
cannot_decrypt | 502 | the vault returned something that does not open |
server_unavailable | 502 | the vault did not answer, or answered with an error of its own |
Limits
Set by the vault, per key:
- 300 writes an hour, of which at most 60 may be renames, moves or deletions.
- 100 uploads an hour, and 2 GiB of uploads a day. 2 GiB is also the largest single file.
- 4 uploads in flight at once.
- Everything a key uploads counts against the vault owner's storage.
Treat a 429 as a sign something is wrong in your program, not as a cue to retry in a loop.
Versioning
This is /v1. It only ever gains fields and routes. A change that would break a program gets a new prefix, and both are served for a time.