---
title: "Dispatch a settled built-in Voice AI call (x-internal-secret required)."
---

> 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

`POST /internal/triggers/voice-ai-call-ended`

## Header parameters

- `x-internal-secret` (`post/internal/triggers/voice-ai-call-ended.header.x-internal-secret`; string, required)

## Request body

_Required._

- `workspaceId` (`post/internal/triggers/voice-ai-call-ended.workspaceId`; string, required)
- `callSid` (`post/internal/triggers/voice-ai-call-ended.callSid`; string, required)
  - pattern `^CA[0-9a-fA-F]{32}$`

## Example request

```json
{
  "workspaceId": "string",
  "callSid": "string"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.channelautomation.com/internal/triggers/voice-ai-call-ended \
  --header 'Content-Type: application/json' \
  --header 'x-internal-secret: string' \
  --data '
{
  "workspaceId": "string",
  "callSid": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.channelautomation.com/internal/triggers/voice-ai-call-ended';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', 'x-internal-secret': 'string'},
  body: JSON.stringify({workspaceId: 'string', callSid: 'string'})
};

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/internal/triggers/voice-ai-call-ended"

payload = {
    "workspaceId": "string",
    "callSid": "string"
}
headers = {
    "Content-Type": "application/json",
    "x-internal-secret": "string"
}

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

print(response.text)
```

## Responses

### 202

Per-trigger scheduled, skipped, failed and in_progress counts.

### 400

workspaceId and telephone callSid required.

### 422

Event is not ready.

### 503

Persisted context could not be read.


Source: https://developer.channelautomations.com/api/post-internal-triggers-voice-ai-call-ended/index.md
