7 · Secret Manager

GET/api/v1/secret-manager/apps/master-key

Get encrypted master key

Fetch the encrypted Master Encryption Key (MEK) for an app.

Scope: full-access or secret-read

Path param: appId — the App ID from the secret manager dashboard (set as {{appId}} in your environment)

Success — 200 OK

{
  "encryptedMek": "<base64-encoded-encrypted-key>",
  "algorithm": "AES-256-GCM",
  "kdfAlgorithm": "HKDF-SHA256"
}

Decrypt the MEK using your App Secret:

const mek = await crypto.subtle.decrypt(
  { name: 'AES-GCM', iv: decodeBase64(iv) },
  await deriveKey(appSecret),  // HKDF-SHA256
  decodeBase64(encryptedMek)
);

Common errors

  • 401 — invalid API key
  • 403 — key lacks secret-read scope
  • 404 — app not found
  • 429 — rate limited (50 req/hour)

Headers

x-api-key

Responses

200 – Encrypted MEK

{
  "encryptedMek": "base64encodedEncryptedKeyHere==",
  "algorithm": "AES-256-GCM",
  "kdfAlgorithm": "HKDF-SHA256"
}
boltTry it
env
GEThttp://localhost:5050/api/v1/secret-manager/apps/master-key

Headers

x-api-key

Code samples

curl -X GET 'http://localhost:5050/api/v1/secret-manager/apps/master-key'
GET/api/v1/secret-manager/apps/variables

Get encrypted variables

Fetch encrypted environment variables for an app.

Scope: full-access or secret-read

Path param: appId — App ID from dashboard Query param: environment (optional) — development | staging | production (default: development)

Success — 200 OK

{
  "environment": "production",
  "variables": [
    { "key": "DATABASE_URL", "encryptedValue": "<base64>", "iv": "<base64>" },
    { "key": "STRIPE_SECRET_KEY", "encryptedValue": "<base64>", "iv": "<base64>" }
  ]
}

Decrypt each variable using the MEK from GET master-key:

const plaintext = await crypto.subtle.decrypt(
  { name: 'AES-GCM', iv: decodeBase64(variable.iv) },
  mek,
  decodeBase64(variable.encryptedValue)
);

Common errors

  • 401 — invalid API key
  • 403 — key lacks secret-read scope
  • 404 — app not found or no variables for this environment

Headers

x-api-key

Parameters

environmentquerystringdefault: development | staging | production (default: development)

Responses

200 – Encrypted variables

{
  "environment": "production",
  "variables": [
    {
      "key": "DATABASE_URL",
      "encryptedValue": "base64ciphertext==",
      "iv": "base64iv=="
    },
    {
      "key": "STRIPE_SECRET_KEY",
      "encryptedValue": "base64ciphertext2==",
      "iv": "base64iv2=="
    }
  ]
}
boltTry it
env
GEThttp://localhost:5050/api/v1/secret-manager/apps/variables

Query parameters

environment

Headers

x-api-key

Code samples

curl -X GET 'http://localhost:5050/api/v1/secret-manager/apps/variables'