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

# Rotate the HMAC signing secret

Returns the new secret once. Old secret is invalidated immediately.

` POST /projects/{projectId}/webhooks/{webhookId}/rotate-secret `

Rotate the HMAC signing secret

Returns the new secret once. Old secret is invalidated immediately.

## Servers

- ` https://api.rogeriq.com/api/v1 `

## Authentication

The operation accepts these alternatives. Schemes within one alternative are required together.

### Alternative 1

- ` apiKey `: ` apiKey `

  - Credential: ` X-API-Key ` in ` header `

  - API key with `riq_` prefix

## Parameters

### ` projectId ` (path, required)

- ` value `: type ` string `

### ` webhookId ` (path, required)

- ` value `: type ` string `

## Responses

### ` 200 ` — New secret

## Request examples

### cURL

```curl
curl -X POST 'https://api.rogeriq.com/api/v1/projects/string/webhooks/string/rotate-secret' \
  -H 'Authorization: Bearer YOUR_API_TOKEN'
```

### JavaScript

```javascript
const response = await fetch('https://api.rogeriq.com/api/v1/projects/string/webhooks/string/rotate-secret', {
  method: 'POST',
  headers: {
      "Authorization": "Bearer YOUR_API_TOKEN"
  }
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

headers = {
    'Authorization': 'Bearer YOUR_API_TOKEN'
}

response = requests.post('https://api.rogeriq.com/api/v1/projects/string/webhooks/string/rotate-secret', headers=headers)
print(response.json())
```