Rotate webhook secret

Prev Next
Post
/api/webhooks-management/webhooks/{id}/rotate-secret

Rotates the signing secret for an existing webhook subscription and returns the active new secret.

Behavior:
- Use this when rotating credentials on the receiving system.
- If request body contains secret, that value is stored as the new signing secret.
- If request body is omitted or secret is blank, a secure secret is generated.
- The rotated secret is returned in the response body.
- Future webhook deliveries are signed with the new secret.
- Clients should update their signature verification configuration after rotation.

Security
HTTP
Type bearer
Path parameters
id
integer (int64) Required

Webhook subscription identifier.

Body parameters
object

Optional request body for rotating a webhook signing secret.

secret
string | null

New signing secret to store for the webhook. If omitted or blank, a secure secret is generated.

Examplewhsec_77af8290bc0192
Responses
200

Webhook secret rotated successfully. Returns the rotated secret.

{
  "id": 1,
  "secret": "whsec_77af8290bc0192",
  "updated_at": "2026-01-27T16:05:00Z"
}
object
id
integer (int64)
secret
string
updated_at
string (date-time)
404

Webhook subscription was not found for this company.

"Webhook not found"
string