POST
/
v1
/
tenants
/
:tenantId
/
api-keys
/
:keyId
/
regenerate
curl -X POST \
  https://api.geldstuck.com/v1/tenants/$TENANT_ID/api-keys/$KEY_ID/regenerate \
  -H "x-api-key: $GELDSTUCK_PUBLIC_KEY" \
  -H "x-api-secret: $GELDSTUCK_SECRET_KEY"
{
  "id": "key_01HX3ZDE...",
  "label": "billing-worker",
  "publicKey": "pk_live_51H_new...",
  "secretKey": "sk_live_51H_new...",
  "status": "active",
  "oldKeyDeactivatesAt": "2026-04-22T12:10:00.000Z"
}
Regeneration issues a new pk_/sk_ pair on the same keyId. The old pair remains valid for 10 minutes to let in-flight deploys complete, then is automatically revoked.

Path parameters

tenantId
string
required
keyId
string
required

Returns

id
string
publicKey
string
New publishable key.
secretKey
string
Shown once.
oldKeyDeactivatesAt
string
ISO timestamp when the old pair stops working.
curl -X POST \
  https://api.geldstuck.com/v1/tenants/$TENANT_ID/api-keys/$KEY_ID/regenerate \
  -H "x-api-key: $GELDSTUCK_PUBLIC_KEY" \
  -H "x-api-secret: $GELDSTUCK_SECRET_KEY"
{
  "id": "key_01HX3ZDE...",
  "label": "billing-worker",
  "publicKey": "pk_live_51H_new...",
  "secretKey": "sk_live_51H_new...",
  "status": "active",
  "oldKeyDeactivatesAt": "2026-04-22T12:10:00.000Z"
}