Rotate a webhook endpoint's secret
POST /v1/webhooks/{id}/rotate-secret
Gives the webhook endpoint a new signing secret.
Needs webhooks:write.
Path parameters
Section titled “Path parameters”id string · uuid
The webhook endpoint’s ID.
overlap_hours integer
How long the old secret keeps signing. 0 stops it at once.
From 0 to 168. Default 24.
Headers
Section titled “Headers”Switching over
Section titled “Switching over”The old secret keeps signing for overlap_hours. Meanwhile every request carries both signatures in webhook-signature, separated by a space, so you can switch over without missing an event.
Returns
Section titled “Returns”200 The new secret, shown this once, and when the old one stops signing.
secret string
The new signing secret, shown this once.
previous_secret_expires_at string · date-time · nullable
When the old secret stops signing; null when it already has.
Errors
Section titled “Errors”Besides the ones every request can get:
422
idempotency_mismatchThe Idempotency-Key was used before for a different request, or by another of your API keys.