Event Overview
Event Name:call_ended
Trigger: Sent automatically when any call completes
Method: POSTContent-Type:
application/json
Payload Structure
Field Descriptions
| Field | Type | Description |
|---|---|---|
event | String | Always "call_ended" |
data | Object | Contains all call information |
Data Object Fields
| Field | Type | Description |
|---|---|---|
callSid | String | Unique identifier for the call session |
name | String | Call type |
agent | String | Agent ID that handled the call |
versionId | String | Version ID of the agent |
from | String | Phone number call originated from |
to | String | Phone number called |
recordingUrl | String | URL to call recording audio file |
call_duration | Number | Duration in seconds |
time | String | Timestamp when call was made |
transcription | String | Full call transcript |
batchId | String | Batch/Campaign ID (if applicable) |
hangup_reason | String | Reason call ended |
call_metadata | Object | Custom metadata passed when triggering call |
try_count | Number | Trial count: -1 for inbound, 0 for first, 1+ for retries |
post_call | Object | Post-call variables (values only) |
post_call_detail | Object | Post-call variables with values and reasoning |
functions_called | Array | Functions executed during/after call |
disposition_reason | String | Short disposition for the call |
conversion_status | Boolean | Whether lead was converted/goal achieved |
next_call_scheduled | Boolean | Whether another call was scheduled |
call_link | String | Link to view call in dashboard |
Reference Documentation
Call Types
View all call type values
Hangup Reasons
View all hangup reason values
Example Implementation
Node.js (Express)
Python (FastAPI)
Response Requirements
Your webhook endpoint must:- Respond with HTTP status code 2xx (preferably 200)
- Respond within 5 seconds
- Return a JSON response (optional but recommended)