# Rotate a secret key without downtime

> Roll a key with a 24-hour overlap so you can deploy the new one before the old one stops working.

Source: https://helpdox.fekbd.com/docs/relay-api/auth/rotate-a-secret-key-without-downtime/

Roll a key with a 24-hour overlap so you can deploy the new one before the old one stops working. Here is exactly what to do.

## Steps

1. 1Roll the keyAPI keys → ⋯ → Roll key. Choose how long the old key keeps working.
2. 2Deploy the new keyUpdate your environment variables and redeploy.
3. 3Confirm, then expireWhen the old key shows no traffic, expire it immediately.

Tip

Roll keys at least once a year, and right away if one leaks.

## Still stuck?

Include the request ID from the `Relay-Request-Id` response header — it lets us find your call in seconds.
