Skip to content
Inkbox

Inkbox

ContactDocs
GuidesAPI Reference
GuidesAPI Reference

Jump to

Vault Keys

Vault keys protect your organization's encryption key. There are two types:

TypePurpose
primaryThe main vault key used for day-to-day access
recoveryBackup keys generated during vault initialization, used to regain access if the primary key is lost

The server stores wrapped (encrypted) copies of the organization encryption key — one per vault key. It never has access to the unwrapped encryption key or the vault keys themselves.


List vault keys GET

GET /vault/keys

List all vault keys (metadata only — no wrapped key material). Optionally filter by key type.

Query parameters

ParameterTypeDescription
typestringFilter by type: primary or recovery

Response (200)

JSONJSON

Code examples


Replace primary key PUT

PUT /vault/keys/primary

Replace the primary vault key. You must prove possession of either the current primary key or a recovery code. When using a recovery code, that recovery key is consumed (invalidated) after the replacement.

Request body

FieldTypeRequiredDescription
idUUIDYesNew vault key ID (client-generated)
wrapped_org_encryption_keystringYesOrg encryption key wrapped with the new vault key (base64)
auth_hashstringYesSHA-256 hash of the new vault key
current_auth_hashstringOne ofSHA-256 hash of the current primary key (proves current key possession)
recovery_auth_hashstringOne ofSHA-256 hash of a recovery code (consumes the recovery key)

Exactly one of current_auth_hash or recovery_auth_hash must be provided.

Request example (normal rotation)

JSONJSON

Response (200)

JSONJSON

Error responses

StatusDescription
400Must provide exactly one of current_auth_hash or recovery_auth_hash
403Invalid auth hash — key verification failed
404Vault not found or recovery key not found

Code examples


Revoke vault key DELETE

DELETE /vault/keys/{auth_hash}

Revoke a vault key by its auth hash. The key is invalidated and can no longer be used to unlock the vault. This operation is refused if the key is the last active key.

Path parameters

ParameterTypeDescription
auth_hashstringSHA-256 hash of the vault key to revoke

Error responses

StatusDescription
403Cannot revoke the last active vault key
404Vault key not found

Code examples


Vault key object

FieldTypeDescription
idUUIDUnique vault key identifier
key_typestringKey type: primary or recovery
created_bystringUser ID that created this key
statusstringLifecycle status: active, invalidated
invalidated_atstring | nullWhen the key was revoked (ISO 8601), or null if active
created_atstringCreation timestamp (ISO 8601)
updated_atstringLast update timestamp (ISO 8601)

Inkbox

Copyright © 2026 Inkbox

This site is protected by reCAPTCHA.

Google Privacy Policy and Terms of Service apply.

Website

Inkbox

Copyright © 2026 Inkbox

This site is protected by reCAPTCHA.

Google Privacy Policy and Terms of Service apply.

Website