---
title: "Create a Voice AI API tool"
description: "Served by the separate Voice API. Requires verified workspace owner/admin membership and VOICE_AI_API_TOOLS enabled. Credentials never appear in responses."
---

> 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

`POST /api/workspaces/{workspaceId}/voice-ai/tools`

Served by the separate Voice API. Requires verified workspace owner/admin membership and VOICE_AI_API_TOOLS enabled. Credentials never appear in responses.

## Authentication

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

## Path parameters

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

## Request body

_Required._

- `version` (`post/api/workspaces/workspaceId/voice-ai/tools.version`; integer, optional) — Required current saved version for update, archive and test.
- `definition` (`post/api/workspaces/workspaceId/voice-ai/tools.definition`; object, optional) — Validated HTTP tool definition with typed parameters and request/result mappings.
- `enabled` (`post/api/workspaces/workspaceId/voice-ai/tools.enabled`; boolean, optional)
  - default `false`
- `credential` (`post/api/workspaces/workspaceId/voice-ai/tools.credential`; string, optional)
  - format `password`
- `clearCredential` (`post/api/workspaces/workspaceId/voice-ai/tools.clearCredential`; boolean, optional)
  - default `false`

## Example request

```json
{
  "version": 0,
  "definition": {},
  "enabled": false,
  "credential": "pa$$word",
  "clearCredential": false
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.channelautomation.com/api/workspaces/<workspaceId>/voice-ai/tools' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "version": 0,
  "definition": {},
  "enabled": false,
  "credential": "pa$$word",
  "clearCredential": false
}
'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/api/workspaces/<workspaceId>/voice-ai/tools';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    version: 0,
    definition: {},
    enabled: false,
    credential: 'pa$$word',
    clearCredential: false
  })
};

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/tools"

payload = {
    "version": 0,
    "definition": {},
    "enabled": False,
    "credential": "pa$$word",
    "clearCredential": False
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

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

print(response.text)
```

## Responses

### 201

Successful operation

### 400

Invalid request

### 401

Missing or invalid access token

### 403

Workspace admin required or feature disabled

### 404

Tool not found

### 409

Version, name or execution conflict

### 413

Request too large

### 429

Test rate limit exceeded

### 503

Storage or credential service unavailable


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