> For the complete documentation index, see [llms.txt](https://help.cerby.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.cerby.com/setup-and-admin/workspace-settings/webhooks/rotate-a-webhook-signing-key.md).

# Rotate a webhook signing key

This article describes how to rotate a webhook signing key in Cerby when a key is compromised or as part of a regular key rotation policy.

{% hint style="info" %}
**Who can use this feature?**

* Workspace **Owners**, **Super Admins**, and **Admins**
* Supported using the Cerby web app
  {% endhint %}

As a workspace **Owner**, **Super Admin**, or **Admin**, you can rotate the signing key of a webhook when a key is compromised or as part of a regular key rotation policy. During rotation, Cerby dual-signs requests with both the old and new keys for 24 hours, giving your system time to update its stored key before the old key expires. You cannot start a second rotation while a grace period is active.

During the 24-hour grace period, each delivery includes two `X-Cerby-Signature` headers and two `X-Cerby-Signature-Key-Id` headers, with the new key first. Accept the request if either signature validates.

To rotate a signing key, you must complete the following steps:

1. Log in to your [Cerby](https://app.cerby.com/) workspace.
2. Select **Settings** from the left navigation. The **Workspace Configuration** page is displayed.
3. Select the **Webhooks** left tab.
4. Click the name of the webhook whose key you want to rotate. The webhook detail page is displayed.
5. Locate the **Signing and verification** card. The card displays the signing algorithm and the current key of the webhook.
6. Click the rotate button for your signing algorithm:

   * **Ed25519:** Click **Rotate public key**.
   * **HMAC-SHA256:** Click **Rotate secret**.

   The **Rotate signing key?** confirmation dialog box is displayed, describing the 24-hour dual-sign grace period.
7. Click the confirm button for your signing algorithm:

   * **Ed25519:** Click **Rotate public key**.
   * **HMAC-SHA256:** Click **Rotate secret**.

   For **Ed25519**, the rotation begins immediately and the new public key appears in the **Signing and verification** card.

   For **HMAC-SHA256**, a dialog box is displayed showing the new signing secret.

{% hint style="warning" %}
**IMPORTANT:** For **HMAC-SHA256** only, copy the new **Signing secret** value before closing the dialog box. Cerby displays it only once and cannot recover it.
{% endhint %}

8. Update the stored key in your verification system. Your receiver can now validate signatures made with the new key.
9. Click the **Done** button. Cerby begins dual-signing requests with both the old and new keys, and expires the old key automatically after 24 hours.

{% hint style="success" %}
**TIP:** If you suspect the old key was exposed, you can revoke it immediately using the Cerby API rather than waiting out the 24-hour grace period. Send `DELETE /v1/event-webhooks/{webhook_id}/keys/{key_id}` for the old key. Only the old key can be revoked, never the active one, and your receiver must re-fetch your public keys afterward.
{% endhint %}

Now you are done.

## Related articles

**Feature guides:**

* [Edit a webhook](https://help.cerby.com/setup-and-admin/workspace-settings/webhooks/edit-a-webhook.md)
* [Test a webhook endpoint](https://help.cerby.com/setup-and-admin/workspace-settings/webhooks/test-a-webhook-endpoint.md)

**Developer reference:**

* [Implement a webhook receiver](https://help.cerby.com/developer-tools/cerby-webhooks/implement-a-webhook-receiver)

**Troubleshooting:**

* [Troubleshooting: Webhook deliveries failing](https://help.cerby.com/tips-and-troubleshooting/troubleshooting/webhooks/troubleshooting-webhook-deliveries-failing)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.cerby.com/setup-and-admin/workspace-settings/webhooks/rotate-a-webhook-signing-key.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
