# Rotate Signing Secret

Canonical: https://docs.bluehola.com/docs/webhooks/post-v1-webhook-endpoints-id-rotate-secret
OpenAPI: https://docs.bluehola.com/openapi.yaml

<div class="endpoint"><span class="endpoint-method endpoint-method--post">POST</span><code class="endpoint-path">/v1/webhook-endpoints/{id}/rotate-secret</code></div>

Rotate the signing secret, returning a one-time new plaintext value.

:::note[Authentication]

Send `Authorization: Bearer <API_KEY>` in the request headers. Which resources an API Key can reach is determined by its current authorization scope.

:::

## Request

Base URL: `https://api.bluehola.com`

### Parameters

| Name | In | Required | Type / constraints | Description |
| --- | --- | --- | --- | --- |
| `id` | path | Yes | string | The callback endpoint ID, `whe_...` |

## Response

| Status | Description |
| --- | --- |
| `201` | Created |
| `4xx` | Client error |

For the common error envelope and how to handle it, see [Error Codes](../guides/error-codes.md).

## Notes

**Takes effect immediately, with no overlap period**: the very next delivery is signed with the new secret. Deliveries that arrive at the receiver before the new secret has been saved will fail signature verification, and a failed verification typically shows up as a 4xx — which, under the delivery policy, is **a permanent failure that is not retried**. So rotate during a quiet period, or follow the order "disable → rotate → save → re-enable/verify" (the way back is `POST {id}/enable`). The plaintext appears only in this response, the same rule as at creation.
