george.g4038
09/29/2025, 9:34 AMAI Evy
09/29/2025, 9:34 AMAI Evy
09/29/2025, 9:35 AMtranscript, transcript_object, and transcript_with_tool_calls
- Call analysis data including sentiment, summary, and custom analysis
- Recording URLs and other call details
## Transcript Storage
The transcript is stored in several formats within the call object :
1. **Basic transcript**: Available as a simple string in the transcript field
2. **Structured transcript**: Available as transcript_object with role, content, and word timing information
3. **Transcript with tool calls**: Available as transcript_with_tool_calls including any function calls made during the conversation
## Call Analysis Event
The call_analysis object becomes available after the call ends and includes :
- `call_summary`: Summary of the conversation
- `user_sentiment`: Detected sentiment (e.g., "Positive")
- `call_successful`: Boolean indicating if the call was successful
- `custom_analysis_data`: Any custom analysis fields you've configured
You can subscribe to the call_analyzed webhook event to receive this data once the post-call analysis is ready .AI Evy
09/29/2025, 9:35 AMcall_started, call_ended, and call_analyzed [(1) ]() . Here's how to handle these events:
javascript
app.post("/webhook", (req: Request, res: Response) => {
const {event, call} = req.body;
switch (event) {
case "call_started":
console.log("Call started event received", call.call_id) ;
break;
case "call_ended":
console.log("Call ended event received", call.call_id) ;
break;
case "call_analyzed":
console.log("Call analyzed event received", call.call_id) ;
break;
default:
console.log("Received an unknown event:", event) ;
}
// Acknowledge the receipt of the event
res.status(204) .send() ;
}) ;AI Evy
09/29/2025, 9:35 AMAI Evy
09/29/2025, 9:35 AMgeorge.g4038
09/29/2025, 10:30 AMAI Evy
09/29/2025, 10:30 AMAI Evy
09/29/2025, 10:31 AMcall_started | Triggered when a new call begins | Basic call information |
| call_ended | Triggered when a call completes, transfers, or encounters an error | All fields from the call object except call_analysis |
| call_analyzed | Triggered when call analysis is complete | Full call data including call_analysis object |
## Webhook Payload Structure
The webhook contains the event type and the call object . Here's a sample payload structure:
json
{
"event_type": "call_analysis",
"call_analysis": {
// Analysis results object
}
}AI Evy
09/29/2025, 10:31 AMcall_analysis object includes [(4) ]() :
- `call_summary`: Summary of the conversation
- `in_voicemail`: Boolean indicating if call went to voicemail
- `user_sentiment`: Detected sentiment (e.g., "Positive")
- `call_successful`: Boolean indicating call success
- `custom_analysis_data`: Custom analysis fields you've configured
### Additional Data
- `metadata`: Custom metadata you've attached to the call
- `retell_llm_dynamic_variables`: Dynamic variables used in the call
- `disconnection_reason`: Reason the call ended (e.g., "agent_hangup")
- `public_log_url`: Debugging information and latency tracking [(3) ](AI Evy
09/29/2025, 10:31 AMevent_type field first to route processing appropriately [(1) ]()
2. **Transcript Parsing**: Use transcript_object for structured parsing as it includes timestamps and role information [(3) ]()
3. **Error Handling**: The webhook has a 10-second timeout and will retry up to 3 times [(1) ]()
4. **Response**: Return a 2xx status code with no body expected
## Three Methods to Access Analysis Data
You can consume call analysis through [(2) ]() :
1. **Dashboard**: Visual interface in the history tab
2. **Webhook**: Real-time notifications (what you're implementing)
3. **Get Call API**: Programmatic access to retrieve call data
The webhook approach you're using provides real-time access to analysis results as soon as they're ready .AI Evy
09/29/2025, 10:31 AMAI Evy
09/29/2025, 10:31 AMgeorge.g4038
09/29/2025, 10:31 AMAI Evy
09/29/2025, 10:31 AMAI Evy
09/29/2025, 10:32 AMcall_started | Triggered when a new call begins | Basic call information |
| call_ended | Triggered when a call completes, transfers, or encounters an error | all fields from the call object except call_analysis |
| call_analyzed | Triggered when call analysis is complete | Full call data including call_analysis object |
## Sample Webhook Payload
The webhook will contain the event type and the call object :
json
{
"event": "call_ended",
"call": {
"call_type": "phone_call",
"from_number": "+12137771234",
"to_number": "+12137771235",
"direction": "inbound",
"call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"call_status": "registered",
"metadata": {},
"retell_llm_dynamic_variables": {
"customer_name": "John Doe"
},
"start_timestamp": 1714608475945,
"end_timestamp": 1714608491736,
"disconnection_reason": "user_hangup",
"transcript": "...",
"transcript_object": [ [Object], [Object], [Object], [Object] ],
"transcript_with_tool_calls": [ [Object], [Object], [Object], [Object] ],
"opt_out_sensitive_data_storage": false
}
}
## Call Analysis Webhook Payload
For the call_analyzed event, you'll receive [(2) ]() :
json
{
"event_type": "call_analysis",
"call_analysis": {
// Analysis results object
}
}AI Evy
09/29/2025, 10:32 AMPOST the payload to your endpoint [(1) ]() . The webhook has a timeout of 10 seconds . If within 10 seconds no success status (2xx) is received, the webhook will be retried, up to 3 times .
We expect a successful status code (2xx) to be returned . No body is expected .AI Evy
09/29/2025, 10:32 AMAI Evy
09/29/2025, 10:32 AM