---
title: "Generate a Voice AI webhook signing secret"
description: "Generates and stores an encrypted X-Vapi-Secret value for signed Voice AI ingest. SaaS owner access and a verified user session required; no selected workspace membership is needed."
---

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

Path: Channel Automation API › Webhooks

`POST /api/voice-ai-provisioning/workspaces/{workspaceId}/webhook-secret`

Generates and stores an encrypted X-Vapi-Secret value for signed Voice AI ingest. SaaS owner access and a verified user session required; no selected workspace membership is needed.

## Authentication

- `BearerAuth`, http, header `Authorization`, format `JWT`

## Path parameters

- `workspaceId` (`post/api/voice-ai-provisioning/workspaces/workspaceId/webhook-secret.path.workspaceId`; string, required) — Workspace ID to configure.

## Request body

_Optional._

- `rotate` (`post/api/voice-ai-provisioning/workspaces/workspaceId/webhook-secret.rotate`; boolean, optional) — Set true to replace an existing signing secret.

## Example request

```json
{
  "rotate": true
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.channelautomation.com/api/voice-ai-provisioning/workspaces/<workspaceId>/webhook-secret' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "rotate": true
}'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/voice-ai-provisioning/workspaces/<workspaceId>/webhook-secret';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({rotate: true})
};

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

### Python

```python
import requests

url = "https://api.channelautomation.com/api/voice-ai-provisioning/workspaces/<workspaceId>/webhook-secret"

payload = { "rotate": True }
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

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

print(response.text)
```

## Responses

### 200

Signing secret generated and stored.

### 400

Invalid request.

### 401

Authentication required

#### Example

```json
{
  "error": "Authentication required",
  "success": false
}
```

- `error` (`post/api/voice-ai-provisioning/workspaces/workspaceId/webhook-secret.response.401.error`; string, optional)
  - example `"Authentication required"`
- `success` (`post/api/voice-ai-provisioning/workspaces/workspaceId/webhook-secret.response.401.success`; boolean, optional)
  - example `false`

### 403

SaaS owner access required.

### 409

Secret already exists and rotate was not set.

### 500

Internal server error

#### Example

```json
{
  "error": "Internal server error",
  "details": "string",
  "success": false
}
```

- `error` (`post/api/voice-ai-provisioning/workspaces/workspaceId/webhook-secret.response.500.error`; string, optional)
  - example `"Internal server error"`
- `details` (`post/api/voice-ai-provisioning/workspaces/workspaceId/webhook-secret.response.500.details`; string, optional)
- `success` (`post/api/voice-ai-provisioning/workspaces/workspaceId/webhook-secret.response.500.success`; boolean, optional)
  - example `false`

### 503

Identity verification unavailable.


Source: https://developer.channelautomations.com/api/post-api-voice-ai-provisioning-workspaces-workspace-id-webhook-secret/index.md
