API Reference · Secrets

Set or rotate a secret

Create or overwrite a secret value at a Vault-like path (leading `/`, segments of `[A-Za-z0-9_.-]+`, ≤253 chars — e.g. `/prod/db-password`). The path rides the body because it contains slashes. The value is written to the write-only `<workspace>-secrets` Secret under a deterministic sanitized data key (returned as `key`) and never read back. Reference it from a workload via `pod.secretEnv: {name: <ENV>, secret: "<workspace>-secrets", key: <key>, path: <path>}` — that reference is also what grants the secret to the workspace's agents. Every write is a new immutable VERSION (returned as `version`): the previous value is archived and stays rollbackable via the rollback endpoint until retention prunes it (the newest 20 archives are kept per secret). `key` never changes, so consuming references are untouched by rotation. An optional `note` is recorded on the version.

PUT/v1/tenants/{name}/secrets

Authorization

x-api-keystringrequired
Your per-workspace API key, e.g. llc_AbC123…. Also accepted as Authorization: Bearer <key>. Mint keys on your workspace's API keys page — each key belongs to one workspace.

Path parameters

namestringrequired
Workspace (tenant) name.

Body

pathstringrequired
The Vault-like secret path
valuestringrequired
The secret value. Never logged or returned.
notestringoptional
Optional note recorded on the new version (e.g. why it was rotated).

Response

200The secret was set.

pathstring
keystring
The sanitized Secret data key a secretEnv reference targets.
versioninteger
The new current version number.
statusstring
e.g. set
curl -X PUT https://api.live-llm.com/v1/tenants/acme/secrets \
  -H "x-api-key: $LIVELLM_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "path": "/prod/tg-bot-token",
    "value": "7301234567:AAFxDummyTokenValue",
    "note": "rotated"
  }'
Try itPUThttps://api.live-llm.com/v1/tenants/{name}/secrets
Fill required path param: name.
Example response200
{
  "path": "/prod/tg-bot-token",
  "key": "prod_tg_bot_token",
  "version": 3,
  "status": "stored"
}