7 · Secret Manager
GET
/api/v1/secret-manager/apps/master-keyGet 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 key403— key lackssecret-readscope404— app not found429— rate limited (50 req/hour)
Headers
x-api-keyResponses
200 – Encrypted MEK
{
"encryptedMek": "base64encodedEncryptedKeyHere==",
"algorithm": "AES-256-GCM",
"kdfAlgorithm": "HKDF-SHA256"
}boltTry it
env
GET
http://localhost:5050/api/v1/secret-manager/apps/master-keyHeaders
x-api-keyCode samples
curl -X GET 'http://localhost:5050/api/v1/secret-manager/apps/master-key'GET
/api/v1/secret-manager/apps/variablesGet 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 key403— key lackssecret-readscope404— app not found or no variables for this environment
Headers
x-api-keyParameters
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
GET
http://localhost:5050/api/v1/secret-manager/apps/variablesQuery parameters
environmentHeaders
x-api-keyCode samples
curl -X GET 'http://localhost:5050/api/v1/secret-manager/apps/variables'