API reference
Keys
The key set that makes a signed-in account into a vault.
All routes are protected. See Encryption for what each field holds.
Get the key set
GET /api/v1/keysAnswers the caller's key set. 404 means the vault has not been set up yet;
clients use it to decide between "create your vault" and "unlock".
{
"data": {
"user_id": "…",
"kdf": "argon2id",
"kdf_salt": "base64",
"kdf_memory_kib": 65536,
"kdf_iterations": 3,
"kdf_parallelism": 1,
"encrypted_vault_key": "base64",
"public_key": "base64",
"encrypted_private_key": "base64",
"created_at": "…",
"updated_at": "…"
}
}Create the key set
POST /api/v1/keysSets up the vault, once. A second call answers 409.
| Field | Rule |
|---|---|
kdf_salt | base64, up to 64 bytes |
kdf_memory_kib | 19456 to 4194304 |
kdf_iterations | 2 to 100 |
kdf_parallelism | 1 to 64 |
encrypted_vault_key | base64, up to 512 bytes |
public_key | base64, up to 1024 bytes |
encrypted_private_key | base64, up to 8192 bytes |
Answers 201 with the stored key set.
Change the master password
PUT /api/v1/keysTakes the five kdf_* and encrypted_vault_key fields above. The key pair
does not change, so everything already shared with the user stays readable.
Look up a public key
GET /api/v1/keys/[email protected]Answers what is needed to share with that user:
{
"data": { "user_id": "…", "name": "Ada", "email": "[email protected]", "public_key": "base64" }
}404 when there is no such user, or they have not set up a vault.