Webhooks
Rotate a webhook secret
Replace a webhook's signing secret and get the new one.
POST
/v1/webhooks/{id}/rotate-secretAPI keyGenerates a new secret and returns it once. The old secret stops working straight away: every delivery from now on, including retries of earlier events, is signed with the new secret only. Update the secret in your endpoint right after calling this, or signature checks will fail until you do.
If you can't update your endpoint at the same moment, accept both secrets there for a short while: check the signature against the new one, and fall back to the old one.
Path parameters
The webhook ID.
Response
The webhook, with the new secret. Same fields as Create a webhook.
secretstring
The new signing secret, whsec_ followed by 32 letters and digits.
Errors
| Status | Code | When |
|---|---|---|
| 404 | webhook_not_found | No webhook with this ID in the project. |