Rotate a webhook endpoint's secret
Generates a new signing secret and returns it, ONCE. For the next 24 hours (`previousSecretExpiresAt`) the replaced secret stays active too: every delivery carries one `v1` signature per active secret, so it verifies with either while you update your configuration. After that, only the new secret signs. Rotating again within that window drops the secret in grace, so send an `Idempotency-Key` to retry safely: a retry with the same key within 10 minutes answers the same secret instead of rotating again (409 `WEBHOOK_SECRET_ROTATION_SUPERSEDED` once another rotation replaced it). After those 10 minutes the same key answers 409 `WEBHOOK_SECRET_REPLAY_EXPIRED` and rotates nothing.
Generates a new signing secret and returns it, ONCE. For the next 24 hours (previousSecretExpiresAt) the replaced secret stays active too: every delivery carries one v1 signature per active secret, so it verifies with either while you update your configuration. After that, only the new secret signs. Rotating again within that window drops the secret in grace, so send an Idempotency-Key to retry safely: a retry with the same key within 10 minutes answers the same secret instead of rotating again (409 WEBHOOK_SECRET_ROTATION_SUPERSEDED once another rotation replaced it). After those 10 minutes the same key answers 409 WEBHOOK_SECRET_REPLAY_EXPIRED and rotates nothing.
The organization API key, sent as Authorization: Bearer <key>.
In: header
Path Parameters
Header Parameters
Any unique string you choose per rotation (a UUID works). Retrying with the same key within 10 minutes returns the secret of the first request instead of rotating again. After that the key answers 409 WEBHOOK_SECRET_REPLAY_EXPIRED and rotates nothing; it stays used for 24 hours.
1 <= length <= 255Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/webhooks/string/rotate-secret"{ "createdAt": "2019-08-24T14:15:22Z", "eventTypes": [ "sale.won" ], "id": "string", "previousSecretExpiresAt": "2019-08-24T14:15:22Z", "status": "enabled", "updatedAt": "2019-08-24T14:15:22Z", "url": "string", "secret": "string"}