Skip to content
Inkbox

Inkbox

ContactDocs
GuidesAPI Reference

Ctrl K

GuidesAPI Reference

Jump to

Vault

The vault is a zero-knowledge encrypted credential store for your organization. Store API keys, login credentials, SSH keys, and other secrets: Inkbox never sees the plaintext. All encryption and decryption happens client-side in the SDK or console using your vault key.

How it works

Every secret stored in the vault is encrypted with your organization's encryption key before it leaves the SDK. The server only ever sees ciphertext. To read secrets, you unlock the vault with your vault key, and the SDK or console decrypts everything locally.

Two keys are involved:

KeyPurpose
INKBOX_API_KEYAuthenticates API requests (sent to server)
INKBOX_VAULT_KEYUnlocks the vault for client-side decryption (never sent to server)

Secret types

Each secret has a type that determines its payload structure:

TypeFieldsUse case
loginpassword, username, email, url, notes, totpWebsite or service logins (with optional TOTP)
api_keyapi_key, endpoint, notesAPI keys and tokens
key_pairaccess_key, secret_key, endpoint, notesAWS-style key pairs
ssh_keyprivate_key, public_key, fingerprint, passphrase, notesSSH keys
otherdata, notesFreeform secrets

Unlocking the vault

Before you can read or write secrets, unlock the vault with your vault key. The SDK validates the key, fetches all encrypted secrets, and decrypts them locally.

Initializing the vault

Initialize a vault once per organization. This creates the vault, sets the primary vault key, and generates four recovery codes. Store the recovery codes securely when they are returned.

Creating secrets

Once unlocked, create secrets by specifying a name and a typed payload. The SDK encrypts the payload before sending it to the server.

Reading secrets

Access all decrypted secrets via the secrets property, or fetch a specific one by ID.

Updating and deleting secrets

Update a secret's name, description, or payload. Delete secrets when they're no longer needed.

Storing logins with TOTP

Login secrets can include a TOTP configuration for two-factor authentication. Use parse_totp_uri to parse a standard otpauth:// URI (the same format used by Google Authenticator, Authy, etc.) into a TOTP config, then attach it to the login payload.

You can also build a TOTP config manually instead of parsing a URI:

Generating TOTP codes

Once a login secret has a TOTP config, generate the current one-time code with get_totp_code. The code, expiry window, and seconds remaining are returned.

The returned TOTPCode includes:

FieldTypeDescription
codestringThe current OTP code (e.g. "482901")
period_startnumberUnix timestamp when this code became valid
period_endnumberUnix timestamp when this code expires
seconds_remainingnumberSeconds left until expiry

You can also generate codes directly from a TOTP config without storing it in the vault:

Identity access control

Grant specific agent identities access to individual secrets. This lets you control which agents can use which credentials.

Vault metadata

Check the vault's status and counts without unlocking it.

Managing vault keys

Rotate the primary vault key or revoke an existing key by auth hash. Rotating the primary key keeps the same organization encryption key and re-wraps it under the new primary vault key.

Deleting the vault

Delete the vault and all its keys and secrets from the Inkbox Console. This is destructive and permanently removes access to all stored secrets. After deletion, the organization can initialize a new vault.

Vault deletion is not available through the SDK or CLI. Use the Inkbox Console instead.

After deletion, you can initialize a new vault.

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

Vault