Hanzo
OpenapiKms

Stores or replaces one secret in your org.

Stores or replaces one secret in your org. Upserts one secret under the caller's own org.

POST /v1/kms/secrets

Addresshttps://api.hanzo.ai/v1/kms/secrets
MethodPOST
Operationpost_kms_secrets
AuthAuthorization: Bearer $HANZO_API_KEY

Stores or replaces one secret in your org.

Upserts one secret under the caller's own org. The value is sealed before it is written — a fresh per-secret data key, itself wrapped by the master key — so plaintext never reaches disk. The receipt confirms the name and environment that were written and does not echo the value.

env is REQUIRED on a write and has no default, which is the rule most easily got wrong here: reads and deletes still fall back to the default environment for older callers, but a write must not, because the environment is part of the storage key. A silently defaulted write lands in a bucket the readers that resolve project, environment and path never look in, and the stale value keeps being served — so the write fails loudly instead.

name is required, path is an optional subpath beneath the org root, and the org is taken from the validated claim rather than the body.

Requires ADMIN authority over the org — a member reads, an admin writes. A machine credential holds no membership and so is never an org admin: it can read the secrets it was issued for and cannot replace one. Fail-closed admission, in order: admin of the org, well-formed org, master key present — 403, 400 and 503, all decided before any record is touched.

Request

4 fields, body application/json (required).

FieldInTypeRequiredDescription
envbodystringEnv is the environment to write under. REQUIRED, with no default: it is part of the storage key, so a silently defaulted write lands in a bucket the readers…
namebodystringName is the secret's name.
pathbodystringPath is an optional subpath beneath the org root, e.g.
valuebodystringValue is the secret itself. It is sealed under a fresh per-secret data key before storage, so plaintext never reaches disk, and it is never echoed back,…

Response

StatusBodyMeaning
200kmsStoredok

200 body — 3 fields.

FieldInTypeAlwaysDescription
envbodystringEnv is the environment the secret was written under.
namebodystringName is the secret's name.
storedbodybooleanStored is true; a write confirms by not failing.

Failure carries the platform error shape — see Errors.

Examples

hanzo kms secrets create

KMS API · All Hanzo APIs · Interactive reference

How is this guide?

On this page