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

# Rotate Event Webhook Secret

> Issues a new secret for an endpoint

## Path Parameters

**webhookId** `string` *required*

The event webhook endpoint ID

## Request Body

**overlap\_hours** `number`

HMAC endpoints: how long the old secret keeps signing alongside the new one (default 24; the maximum is set by Telzino, 168 unless changed). During the overlap the signature header carries two `v1=` values.

**activate\_at** `string`

Shared-secret endpoints: ISO 8601 time when the new secret takes over (default now), so you can update your receiver first. Must be now or up to the HMAC overlap maximum ahead (7 days unless changed).

**secret** `string`

Your own secret value: 16 to 256 printable characters, no spaces. Generated when omitted.

> [!WARNING]
>
> The new secret is returned only this once.

> [!NOTE]
>
> An endpoint or delivery outside your API key's scope returns `404`, the same as one that does not exist.

```bash cURL theme={null}
curl -X POST "https://api.telzino.com/v1/webhooks/3f2b8c1e-5d4a-4e7b-9c2d-1a6f0e8b7d54/rotate-secret" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "overlap_hours": 24
}'
```

```javascript JavaScript theme={null}
const response = await fetch('https://api.telzino.com/v1/webhooks/3f2b8c1e-5d4a-4e7b-9c2d-1a6f0e8b7d54/rotate-secret', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "overlap_hours": 24
  })
});
```

```python Python theme={null}
import requests

response = requests.post(
    'https://api.telzino.com/v1/webhooks/3f2b8c1e-5d4a-4e7b-9c2d-1a6f0e8b7d54/rotate-secret',
    headers={'Authorization': 'Bearer YOUR_ACCESS_TOKEN'},
    json={
      "overlap_hours": 24
    }
)
```

```json 200 theme={null}
{ "secret": "whsec_…" }
```

```json 400 theme={null}
{ "error": "invalid_request", "error_description": "A secret must be 16-256 printable characters with no spaces." }
```

```json 404 theme={null}
{ "error": "not_found", "error_description": "Webhook endpoint not found." }
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.