import os
from wirebox.vault import VaultSecretType, LoginPayload, parse_totp_uri
vault = wb.vault.unlock(os.environ["WIREBOX_VAULT_KEY"])
# Create (payload encrypted locally before upload)
vault.create_secret(
type=VaultSecretType.LOGIN,
name="GitHub",
payload=LoginPayload(
username="eva",
password="s3cr3t",
totp=parse_totp_uri("otpauth://totp/GitHub:eva?secret=JBSWY3DPEHPK3PXP"),
),
)
# Read (by name or id) and update with the full payload
login = vault.get_login("GitHub")
login.password = "rotated"
vault.update_secret("GitHub", payload=login)
vault.delete_secret("GitHub")
import { VaultSecretType, parseTotpUri } from "@wirebox-sh/sdk";
const vault = await wb.vault.unlock(process.env.WIREBOX_VAULT_KEY);
// Create (payload encrypted locally before upload)
await vault.createSecret({
type: VaultSecretType.LOGIN,
name: "GitHub",
payload: {
username: "eva",
password: "s3cr3t",
totp: parseTotpUri("otpauth://totp/GitHub:eva?secret=JBSWY3DPEHPK3PXP"),
},
});
// Read (by name or id) and update
const login = vault.getLogin("GitHub");
await vault.updateSecret("GitHub", { payload: { ...login, password: "rotated" } });
await vault.deleteSecret("GitHub");
wirebox vault list --type login
wirebox vault add --type login --name GitHub --username eva --password
wirebox vault get GitHub --reveal
wirebox vault set GitHub --password
wirebox vault rm GitHub
{
"secrets": [
{
"id": "vsec_01J8ABC123XYZ",
"type": "login",
"name": "GitHub",
"description": null,
"created_at": "2026-10-10T10:00:00Z",
"updated_at": "2026-10-10T10:00:00Z"
}
]
}
Vault
Vault Secrets
List, create, read, update, and delete vault secrets. Payloads are ciphertext produced client-side.
GET
/
api
/
v1
/
vault
/
secrets
import os
from wirebox.vault import VaultSecretType, LoginPayload, parse_totp_uri
vault = wb.vault.unlock(os.environ["WIREBOX_VAULT_KEY"])
# Create (payload encrypted locally before upload)
vault.create_secret(
type=VaultSecretType.LOGIN,
name="GitHub",
payload=LoginPayload(
username="eva",
password="s3cr3t",
totp=parse_totp_uri("otpauth://totp/GitHub:eva?secret=JBSWY3DPEHPK3PXP"),
),
)
# Read (by name or id) and update with the full payload
login = vault.get_login("GitHub")
login.password = "rotated"
vault.update_secret("GitHub", payload=login)
vault.delete_secret("GitHub")
import { VaultSecretType, parseTotpUri } from "@wirebox-sh/sdk";
const vault = await wb.vault.unlock(process.env.WIREBOX_VAULT_KEY);
// Create (payload encrypted locally before upload)
await vault.createSecret({
type: VaultSecretType.LOGIN,
name: "GitHub",
payload: {
username: "eva",
password: "s3cr3t",
totp: parseTotpUri("otpauth://totp/GitHub:eva?secret=JBSWY3DPEHPK3PXP"),
},
});
// Read (by name or id) and update
const login = vault.getLogin("GitHub");
await vault.updateSecret("GitHub", { payload: { ...login, password: "rotated" } });
await vault.deleteSecret("GitHub");
wirebox vault list --type login
wirebox vault add --type login --name GitHub --username eva --password
wirebox vault get GitHub --reveal
wirebox vault set GitHub --password
wirebox vault rm GitHub
{
"secrets": [
{
"id": "vsec_01J8ABC123XYZ",
"type": "login",
"name": "GitHub",
"description": null,
"created_at": "2026-10-10T10:00:00Z",
"updated_at": "2026-10-10T10:00:00Z"
}
]
}
Secrets are stored as ciphertext plus plaintext metadata (
name, type,
description). Listing returns metadata only. Creating, updating, and deleting
are admin-only; reading is available to identity-scoped keys with vault:read
for the secrets they were granted.
Secret Object
string
Secret identifier (
vsec_ prefix). Client-generated on create.string
login, api_key, or other.string
Human-readable label (plaintext). Secrets can be addressed by name in the SDK/CLI.
string | null
Optional note (plaintext).
string
Base64 AES-256-GCM ciphertext of the JSON payload. Returned by single-secret reads and unlock, not by list.
string
ISO 8601 creation timestamp.
string
ISO 8601 update timestamp.
Payload Shapes (plaintext, before encryption)
- login —
username,email,password,service_url, and optionaltotp({ secret, algorithm, digits, period }). - api_key —
key, optionalservice_url. - other —
data.
Operations
| Method & Path | Description |
|---|---|
GET /api/v1/vault/secrets | List metadata. Optional ?type= filter. |
POST /api/v1/vault/secrets | Create. Body: id, type, name, description?, encrypted_payload. Admin only. |
GET /api/v1/vault/secrets/{id} | Read one, including encrypted_payload. |
PATCH /api/v1/vault/secrets/{id} | Update name, description, and/or encrypted_payload. Admin only. |
DELETE /api/v1/vault/secrets/{id} | Delete (and its access grants). Admin only. |
An identity-scoped caller that requests a secret it was not granted receives
404, so the API does not reveal that the secret exists.import os
from wirebox.vault import VaultSecretType, LoginPayload, parse_totp_uri
vault = wb.vault.unlock(os.environ["WIREBOX_VAULT_KEY"])
# Create (payload encrypted locally before upload)
vault.create_secret(
type=VaultSecretType.LOGIN,
name="GitHub",
payload=LoginPayload(
username="eva",
password="s3cr3t",
totp=parse_totp_uri("otpauth://totp/GitHub:eva?secret=JBSWY3DPEHPK3PXP"),
),
)
# Read (by name or id) and update with the full payload
login = vault.get_login("GitHub")
login.password = "rotated"
vault.update_secret("GitHub", payload=login)
vault.delete_secret("GitHub")
import { VaultSecretType, parseTotpUri } from "@wirebox-sh/sdk";
const vault = await wb.vault.unlock(process.env.WIREBOX_VAULT_KEY);
// Create (payload encrypted locally before upload)
await vault.createSecret({
type: VaultSecretType.LOGIN,
name: "GitHub",
payload: {
username: "eva",
password: "s3cr3t",
totp: parseTotpUri("otpauth://totp/GitHub:eva?secret=JBSWY3DPEHPK3PXP"),
},
});
// Read (by name or id) and update
const login = vault.getLogin("GitHub");
await vault.updateSecret("GitHub", { payload: { ...login, password: "rotated" } });
await vault.deleteSecret("GitHub");
wirebox vault list --type login
wirebox vault add --type login --name GitHub --username eva --password
wirebox vault get GitHub --reveal
wirebox vault set GitHub --password
wirebox vault rm GitHub
{
"secrets": [
{
"id": "vsec_01J8ABC123XYZ",
"type": "login",
"name": "GitHub",
"description": null,
"created_at": "2026-10-10T10:00:00Z",
"updated_at": "2026-10-10T10:00:00Z"
}
]
}