Substratal Apps Substratal Apps Hub specs
GitHub

Help Tutorials

Developers About 15 minutes

Rotate an API key without downtime

In-place Rotate kills the old secret the instant the new one exists, so any server still using it fails until you redeploy. For zero downtime, overlap two keys:

  1. API Keys → open the key → note its scope and permissions.
  2. Create key with the same scope and permissions, and a name like billing-handler-2026-11.
  3. Copy the secret straight into your secret manager. You won't see it again.
  4. Deploy your service with the new secret.
  5. Back on the old key, watch Last used. It updates at most once a minute. When it's stopped moving for longer than your slowest job's interval, nothing is using it.
  6. Revoke the old key. The audit log records api_key.revoked.

If Last used keeps moving after the deploy, something you missed still has the old secret. Find it before you revoke.

Screens in this tutorial

KEY-01 · API keys KEY-02 · Create API key KEY-03 · Secret reveal KEY-04 · API key detail

Last updated 2026-10-23 · Built 2026-10-25 from a9ef3be · API 1.0.0-draft.13 · Substratal-Version: 1