FlaresendDocs
Webhooks

Rotate a webhook secret

Replace a webhook's signing secret and get the new one.

POST/v1/webhooks/{id}/rotate-secretAPI key

Generates 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

idstringpathrequired

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

StatusCodeWhen
404webhook_not_foundNo webhook with this ID in the project.