> ## Documentation Index
> Fetch the complete documentation index at: https://docs.polynode.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Rotate Secret

> Generate a new HMAC signing secret for a webhook.

## Endpoint

```
POST /v3/webhooks/:id/rotate-secret
```

Generates a new signing secret. The old secret is immediately invalidated. Update your verification code before the next delivery arrives.

## Example

```bash theme={null}
curl -X POST https://api.polynode.dev/v3/webhooks/wh_451e06ca0534/rotate-secret \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Response

```json theme={null}
{
  "secret": "whsec_new_secret_value_here_32chars"
}
```

<Warning>Save this value immediately. It is only returned once.</Warning>
