Skip to content
Docs

Authentication

Rotating credentials

Rotation replaces the secret immediately; project ID stays the same.

Overview

Rotation issues a new gray_sk_… and immediately invalidates the previous secret. The project ID stays the same, so you only update the Bearer token in config.

Zero-downtime checklist

  1. Create or rotate the secret in Console (copy it once).
  2. Deploy the new value to every server, worker, and CI secret store.
  3. Smoke-test with GET /v1/chains using the new secret.
  4. Remove the old value from vaults—after rotation it returns revoked_secret or unauthorized.

When to rotate

  • Scheduled hygiene (e.g. quarterly)
  • Employee with key access leaves
  • Secret appeared in logs, screenshots, or a client bundle
  • You decommission an environment
json
{
  "error": {
    "code": "revoked_secret",
    "message": "Project secret has been revoked.",
    "retryable": false
  }
}

See also Rotate a key and Rotate after a leak.