---
title: "Save built-in Voice AI configuration"
description: "Served by the Voice API. Requires a Bearer session for a workspace owner/admin/manager when VOICE_AI_TELEPHONY_TURN_CONTROL_V2 is enabled. Optional turn settings are validated for opted-in workspaces; flag-off workspaces retain existing turn behavior. Other existing configuration properties are accepted by this endpoint."
---

> 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 › Workspaces

`PUT /api/workspaces/{workspaceId}/voice-ai/config`

Served by the Voice API. Requires a Bearer session for a workspace owner/admin/manager when VOICE_AI_TELEPHONY_TURN_CONTROL_V2 is enabled. Optional turn settings are validated for opted-in workspaces; flag-off workspaces retain existing turn behavior. Other existing configuration properties are accepted by this endpoint.

## Authentication

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

## Path parameters

- `workspaceId` (`put/api/workspaces/workspaceId/voice-ai/config.path.workspaceId`; string, required)

## Request body

_Required._

- `turn_detection_mode` (`put/api/workspaces/workspaceId/voice-ai/config.turn_detection_mode`; string, optional)
  - one of `"server_vad"`, `"semantic_vad"`
- `turn_detection_eagerness` (`put/api/workspaces/workspaceId/voice-ai/config.turn_detection_eagerness`; string, optional)
  - one of `"low"`, `"medium"`, `"high"`, `"auto"`
- `turn_detection_threshold` (`put/api/workspaces/workspaceId/voice-ai/config.turn_detection_threshold`; number, optional)
  - min 0.35; max 0.85
- `silence_duration_ms` (`put/api/workspaces/workspaceId/voice-ai/config.silence_duration_ms`; number, optional)
  - min 300; max 1500
- `prefix_padding_ms` (`put/api/workspaces/workspaceId/voice-ai/config.prefix_padding_ms`; number, optional)
  - min 100; max 1000
- `barge_in_enabled` (`put/api/workspaces/workspaceId/voice-ai/config.barge_in_enabled`; boolean, optional)

## Example request

```json
{
  "turn_detection_mode": "server_vad",
  "turn_detection_eagerness": "low",
  "turn_detection_threshold": 0.35,
  "silence_duration_ms": 300,
  "prefix_padding_ms": 100,
  "barge_in_enabled": true
}
```

## Code samples

### cURL

```bash
curl --request PUT \
  --url 'https://api.channelautomation.com/api/workspaces/<workspaceId>/voice-ai/config' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "turn_detection_mode": "server_vad",
  "turn_detection_eagerness": "low",
  "turn_detection_threshold": 0.35,
  "silence_duration_ms": 300,
  "prefix_padding_ms": 100,
  "barge_in_enabled": true
}
'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/workspaces/<workspaceId>/voice-ai/config';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    turn_detection_mode: 'server_vad',
    turn_detection_eagerness: 'low',
    turn_detection_threshold: 0.35,
    silence_duration_ms: 300,
    prefix_padding_ms: 100,
    barge_in_enabled: 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/workspaces/<workspaceId>/voice-ai/config"

payload = {
    "turn_detection_mode": "server_vad",
    "turn_detection_eagerness": "low",
    "turn_detection_threshold": 0.35,
    "silence_duration_ms": 300,
    "prefix_padding_ms": 100,
    "barge_in_enabled": True
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

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

print(response.text)
```

## Responses

### 200

Saved configuration

### 400

Invalid settings or failed save

### 401

Missing or invalid session in an opted-in workspace

### 403

Workspace owner/admin/manager required

### 503

Feature state or membership could not be verified


Source: https://developer.channelautomations.com/api/put-api-workspaces-workspace-id-voice-ai-config/index.md
