Rotate a webhook signing secret
Rotate the signing secret; the new secret is returned ONCE. Default (graceful): the endpoint signs with both the old and new secret (two v1= entries) so you can switch your verifier to the new secret with zero downtime — the old secret stays valid until you finalize the rotation by calling POST /webhooks/endpoints/:id/rotate-secret/promote (retiring the old secret). Pass ?immediate=true (suspected compromise) to retire the old secret AT ONCE instead — deliveries then sign with only the new secret, so update your verifier immediately or signature checks fail.
Path Parameters
- Type: string Format: uuididrequired
Query Parameters
- Type: string enumimmediatevalues
- true
- false
Responses
- application/json
- application/json
- application/json
- application/json
Request Example for post/api/v1/webhooks/endpoints/{id}/rotate-secret
curl https://api.bettermoney.com/api/v1/webhooks/endpoints/123e4567-e89b-12d3-a456-426614174000/rotate-secret \
--request POST
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"secretNext": "string"
}