Every subscription has a signing secret used to compute the HMAC-SHA256 signature on each delivery. You should rotate this secret periodically or immediately if you suspect it has been compromised. Off the Hook supports zero-downtime rotation by signing deliveries with both the old and new secrets during a configurable grace period, giving you time to deploy the updated secret before the old one expires.Documentation Index
Fetch the complete documentation index at: https://docs.offthehook.dev/llms.txt
Use this file to discover all available pages before exploring further.
Rotate the secret
Send a POST request to the rotate endpoint with the desired grace period in seconds.gracePeriodSeconds field controls how long the old secret remains valid alongside the new one. Set it to 0 for an immediate cutover with no grace period.
How the grace period works
During the grace period, Off the Hook signs each delivery with both secrets. Thewebhook-signature header contains two space-separated v1, values:
Idempotency
Include anIdempotency-Key header on the rotation request to safely retry it without triggering a double rotation. If a request with the same key is already in flight, the API returns idempotency_in_flight. If a completed request with the same key is replayed, you receive the original response.
Rotation workflow
Rotate the secret
Call the rotate endpoint and save the new
whsec_... value returned in the response.Deploy the new secret
Update your environment variables or secrets manager with the new value and deploy your service. Your verification code does not need to change — the Svix library handles both signatures automatically during the grace period.