Search the docs

Search guides, API endpoints and MCP tools.

Vault

generate_secret

Write grantIdempotent

Generate a new value on the server for a secret in each product and environment given, such as to rotate a token, creating the name where it is missing. The value is never returned; a key pair returns only its public key. Returns each pair's outcome and version. Needs write access; production needs an admin or owner.

Inputs

productsarray of stringsRequired

The products' slugs, such as storefront.

environmentsarray of stringsRequired

The environments' slugs, such as staging. Each product must be deployed to each.

namestringRequired

The secret's name, such as DATABASE_URL.

generatorobjectRequired

What to generate. Options left out use their defaults.

tools/callJSON-RPC
{  "jsonrpc": "2.0",  "id": 1,  "method": "tools/call",  "params": {    "name": "generate_secret",    "arguments": {      "products": [        "storefront"      ],      "environments": [        "staging",        "production"      ],      "name": "SESSION_SECRET",      "generator": {        "type": "token",        "bytes": 32      }    }  }}
POST/clanker/v1/secrets:generate
curl -X POST https://api.clankership.com/clanker/v1/secrets:generate \  -H "Authorization: Bearer $CLANKER_TOKEN" \  -H "Content-Type: application/json" \  -d '{    "products": [      "storefront"    ],    "environments": [      "staging",      "production"    ],    "name": "SESSION_SECRET",    "generator": {      "type": "token",      "bytes": 32    }  }'
The same call over the clanker HTTP API. Set CLANKER_TOKEN to a clanker OAuth access token.