---
title: "Rotate the inbound trigger secret"
---

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

# Rotate the inbound trigger secret

Path: CloudRaker Workspace API › Org Automations

`POST /organization/automations/{automationId}/rotate-secret`

Mints a new HMAC secret for the automation’s inbound trigger and returns it ONCE. Signatures made with the old secret stop verifying immediately. Authorization: organization admin.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `automationId` (`rotateAutomationSecret.path.automationId`; string, required)

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.cloudraker.com/organization/automations/<automationId>/rotate-secret' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/organization/automations/<automationId>/rotate-secret';
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/organization/automations/<automationId>/rotate-secret"

headers = {"Authorization": "Bearer <token>"}

response = requests.post(url, headers=headers)

print(response.text)
```

## Responses

### 200

The new secret, shown once.

#### Example

```json
{
  "secret": "string",
  "secretPreview": "string"
}
```

- `secret` (`rotateAutomationSecret.response.200.secret`; string, required)
- `secretPreview` (`rotateAutomationSecret.response.200.secretPreview`; string, required)


Source: https://docs.cloudraker.com/workspace/api/org-automations/rotate-automation-secret/index.md
