mrearthbound
08/11/2025, 10:10 PMAI Evy
08/11/2025, 10:10 PMAI Evy
08/11/2025, 10:10 PMcall_analyzed event [(1) ]() .
There are three webhook events available :
- call_started - Triggered when a new call begins
- call_ended - Triggered when a call completes
- call_analyzed - Triggered when call analysis is complete
The call_analyzed event includes the full call data including the call_analysis object . The webhook payload will look like this [(2) ]() :
json
{
"event_type": "call_analysis",
"call_analysis": {
// Analysis results object
}
}
To set up webhooks, visit the [Webhook Configuration](/features/webhook-overview) section . You can configure webhooks either at the account level or at the agent level [(3) ]() . If set at the agent level, it will bind webhook events for that specific agent to the specified URL and ignore the account level webhook for that agent .
The webhook will POST the payload to your endpoint with a 10-second timeout and up to 3 retries if no success status (2xx) is received [(1) ]() .AI Evy
08/11/2025, 10:15 PMAI Evy
08/11/2025, 10:15 PMmrearthbound
08/11/2025, 10:18 PMAI Evy
08/11/2025, 10:18 PMAI Evy
08/11/2025, 10:18 PMAI Evy
08/11/2025, 10:18 PMAI Evy
08/11/2025, 10:18 PMmrearthbound
08/11/2025, 10:24 PMAI Evy
08/11/2025, 10:24 PMAI Evy
08/11/2025, 10:24 PMcall_analyzed event is triggered, you'll receive the webhook payload with the analysis results :
{
"event_type": "call_analysis",
"call_analysis": {
// Analysis results object
}
}
Your single webhook endpoint can process this payload and perform multiple actions sequentially - first logging the data to your sheet, then sending the email [(2) ]() . Webhooks are designed to trigger custom workflows across platforms like Zapier, Make, or n8n, allowing you to initiate multiple automated actions from one webhook event .
This approach is more efficient than setting up separate webhook endpoints, as you'll only receive one call_analyzed event per call [(1) ]() . Your webhook handler can parse the analysis data once and distribute it to both your sheet logging function and email sending function.AI Evy
08/11/2025, 10:24 PMAI Evy
08/11/2025, 10:24 PMmrearthbound
08/11/2025, 10:25 PMAI Evy
08/11/2025, 10:25 PMAI Evy
08/11/2025, 10:25 PMAI Evy
08/11/2025, 10:25 PMwebhook_url parameter [(1) ]() [(2) ]() [(3) ]() . Here's the JavaScript example:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.update('16b980523634a6dc504898cda492e939', {
webhook_url: "<https://webhook-url-here%22>
}) ;
[(2) ]()
2. At the account level - This would be configured through your dashboard settings [(1) ]() [(2) ]() .
The webhook_url field binds webhook events for that specific agent to your specified URL and will ignore the account level webhook for that agent [(1) ]() [(2) ]() [(3) ]() [(4) ]() . You can also set it to null to remove the webhook URL from an agent .
For post call analysis specifically, your webhook will receive the call_analyzed event with the analysis results [(5) ]() .AI Evy
08/11/2025, 10:25 PMAI Evy
08/11/2025, 10:25 PMmrearthbound
08/11/2025, 11:03 PMAI Evy
08/11/2025, 11:03 PMAI Evy
08/11/2025, 11:03 PMwebhook_url field when creating or updating an agent [(1) ]() [(2) ]() [(3) ]() . This single webhook URL will receive all webhook events for that agent, including the call_analyzed event that contains your post call analysis data [(4) ]() .
Here's how to set it using the JavaScript SDK:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.update('16b980523634a6dc504898cda492e939', {
webhook_url: "<https://webhook-url-here%22>
}) ;AI Evy
08/11/2025, 11:03 PMcall_started - when calls begin
- call_ended - when calls complete
- call_analyzed - when post call analysis is complete
Since you mentioned using several webhooks, note that Retell sends all webhook events for an agent to the same URL [(1) ]() [(2) ]() . Your webhook endpoint will need to filter the events based on the event_type field to handle different webhook events appropriately [(4) ]() .
The agent-level webhook URL will override any account-level webhook settings for that specific agent [(1) ]() [(2) ]() [(5) ]() [(3) ]() [(6) ]() [(7) ]() .AI Evy
08/11/2025, 11:03 PMAI Evy
08/11/2025, 11:03 PMmrearthbound
08/12/2025, 4:55 AMAI Evy
08/12/2025, 4:55 AMAI Evy
08/12/2025, 4:55 AMcall_analyzed webhook from being triggered. Here are the key troubleshooting steps:
1. Compatibility Issue Between Inbound and Agent Webhooks
There's a known compatibility issue between inbound call webhooks and agent-level webhooks [(1) ]() . Users have reported that when you have both a phone number level call_inbound webhook and an agent-level webhook configured, the standard webhook events (call_started, call_ended, call_analyzed) may not work properly . This appears to be exactly your setup.
2. Webhook Configuration Conflicts
The documentation shows that when you configure both webhooks, they can interfere with each other . One user reported that adding a webhook URL to the phone number auto-saves, but when they go back to their conversation agent and save the agent, the webhook on the phone number gets lost .
3. Post-Call Analysis Requirements
For the call_analyzed webhook to trigger, several conditions must be met:
- The call must complete successfully [(2) ]()
- The agent session must finish successfully
- If your inbound call is being rejected or doesn't complete properly, it won't trigger the analysis webhook
4. Troubleshooting Steps
First, verify your agent configuration includes the post_call_analysis_data field [(3) ]() [(4) ]() [(5) ]() . This should look like:AI Evy
08/12/2025, 4:55 AMjson
{
"post_call_analysis_data": [
{
"type": "string",
"name": "customer_name",
"description": "The name of the customer.",
"examples": [
"John Doe",
"Jane Smith"
]
}
]
}
5. Recommended Solution
Based on the compatibility issues reported [(1) ]() , consider separating your webhook configurations:
- Use the inbound webhook only for pre-call processing (call_inbound event) [(6) ]()
- Use a separate agent-level webhook URL specifically for post-call events (call_analyzed) [(3) ]() [(4) ]() [(5) ]()
The agent-level webhook URL can be set using the webhook_url parameter when updating your agent [(3) ]() [(7) ]() :
javascript
const agentResponse = await client.agent.update('agent_id', {
webhook_url: "<https://your-n8n-webhook-url-here%22>
}) ;
[(3) ]()
This separation should resolve the compatibility issue and ensure your call_analyzed events are properly delivered to N8N.AI Evy
08/12/2025, 4:55 AMAI Evy
08/12/2025, 4:55 AMmrearthbound
08/12/2025, 4:59 AMAI Evy
08/12/2025, 4:59 AMAI Evy
08/12/2025, 4:59 AMpost_call_analysis_data field can be found in the agent configuration when creating or updating an agent [(1) ]() [(2) ]() [(3) ]() [(4) ]() . It's part of the request body when using the Create Agent or Update Agent API endpoints.
Here's exactly where you'll find it in the API structure:
json
{
"post_call_analysis_data": [
{
"type": "string",
"name": "customer_name",
"description": "The name of the customer.",
"examples": [
"John Doe",
"Jane Smith"
]
}
]
}AI Evy
08/12/2025, 4:59 AMAI Evy
08/12/2025, 4:59 AMAI Evy
08/12/2025, 4:59 AMmrearthbound
08/12/2025, 5:00 AMAI Evy
08/12/2025, 5:00 AMAI Evy
08/12/2025, 5:01 AMpost_call_analysis_data through the Create Agent and Update Agent endpoints [(1) ]() . The documentation shows how to set this field programmatically using the JavaScript SDK:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.create({
response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
voice_id: '11labs-Adrian',
}) ;
The sources also show that the post_call_analysis_data field is included in the agent response structure . However, the available documentation doesn't specify whether there's a GUI option in the Retell dashboard for configuring post-call analysis data without using the API.
One Discord user mentioned that they "can also not add new post call analysis fields in the UI either, even on newly created agents" [(2) ]() , which suggests there may be UI functionality, but this was in the context of a bug report.
I don't have specific information about GUI configuration options for post_call_analysis_data in the available sources. You might want to check your Retell dashboard directly or contact support for guidance on GUI-based configuration options.
**AI Evy
08/12/2025, 5:01 AMAI Evy
08/12/2025, 5:01 AMmrearthbound
08/12/2025, 5:06 AMAI Evy
08/12/2025, 5:06 AMAI Evy
08/12/2025, 5:06 AMAuthorization and value Bearer YOUR_RETELL_API_KEY
- Set Content-Type to application/json
*Step 3: Create an Agent (Example Request) *
- Set the method to POST
- Use the endpoint: ` [(1) ]()
- In the request body, use this JSON structure:
json
{
"response_engine": {
"llm_id": "llm_234sdertfsdsfsdf",
"type": "retell-llm"
},
"voice_id": "11labs-Adrian"
}AI Evy
08/12/2025, 5:06 AMGET
- Use the endpoint for listing agents [(2) ]()
- Add query parameters if needed:
- `limit`: Number of objects to return (1-1000, default 1000)
- `pagination_key`: For continuing to next page
Step 5: Handle the Response
The successful response will include agent details like:
- `agent_id`: Unique identifier [(1) ]() [(2) ]()
- `version`: Agent version number
- `is_published`: Publication status
- `voice_id`: Voice configuration
- `webhook_url`: Configured webhook endpoint
Step 6: Test Different Endpoints
You can test various API endpoints including:
- Create Agent [(1) ]()
- List Agents [(2) ]()
- Get Agent Versions [(3) ]()
- Update Agent configurations
Authentication Requirements
All requests require the Authorization header containing your API key [(2) ]() . The API will return a 401 error if authentication fails [(1) ]() [(2) ]() .AI Evy
08/12/2025, 5:06 AMAI Evy
08/12/2025, 5:06 AMmrearthbound
08/12/2025, 5:39 AMAI Evy
08/12/2025, 5:39 AMAI Evy
08/12/2025, 5:39 AMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
Step 2: Create an Agent with Post Call Analysis
Create an agent with the minimum required fields plus post call analysis configuration :
javascript
const agentResponse = await client.agent.create({
response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
voice_id: '11labs-Adrian',
}) ;
Step 3: Add Post Call Analysis Data
Include the post_call_analysis_data field to define what data you want to extract :
javascript
{
"post_call_analysis_data": [
{
"type": "string",
"name": "customer_name",
"description": "The name of the customer.",
"examples": [
"John Doe",
"Jane Smith"
]
}
],
"post_call_analysis_model": "gpt-4o-mini"
}
Step 4: Configure Webhook URL
Set up a webhook URL to receive the post call analysis results :
javascript
const agentResponse = await client.agent.create({
response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
voice_id: '11labs-Adrian',
webhook_url: "<https://webhook-url-here%22>
}) ;
Step 5: Complete Agent Configuration
Your complete minimal agent configuration should look like this :AI Evy
08/12/2025, 5:39 AMjavascript
const agentResponse = await client.agent.create({
response_engine: {
llm_id: 'llm_234sdertfsdsfsdf',
type: 'retell-llm'
},
voice_id: '11labs-Adrian',
webhook_url: "<https://your-webhook-url-here%22,>
post_call_analysis_data: [
{
type: "string",
name: "customer_name",
description: "The name of the customer.",
examples: ["John Doe", "Jane Smith"]
}
],
post_call_analysis_model: "gpt-4o-mini"
}) ;
Step 6: Receive Analysis Results
After each call completes, your webhook will receive the call_analyzed event [(2) ]() :
{
"event_type": "call_analysis",
"call_analysis": {
// Analysis results object
}
}
Key Requirements:
- The post_call_analysis_data field defines what data to extract from calls [(1) ]()
- The webhook_url field is required to receive analysis results
- The post_call_analysis_model defaults to "gpt-4o-mini" if not specified
- Analysis will only trigger for completed calls where conversation occurred [(2) ]()
This creates the simplest functional agent that will automatically perform post call analysis and send results to your webhook endpoint after each call ends .AI Evy
08/12/2025, 5:39 AMAI Evy
08/12/2025, 5:39 AMmrearthbound
08/12/2025, 5:56 AMAI Evy
08/12/2025, 5:56 AMAI Evy
08/12/2025, 5:56 AM<https://dashboard.retellai.com/agents/agent_id>AI Evy
08/12/2025, 5:56 AMagent_id with your actual agent ID . This method has been confirmed to work even when search fails .
Step 2: Search by Agent ID
Instead of searching by agent name, try searching using the agent ID in the dashboard search bar . The search bar should show the agent when you put the agent ID .
Step 3: Verify Agent Exists via API
Check if your agent exists using the API to confirm it's not a data issue [(3) ]() . You can use the List Agents endpoint to verify the agent exists [(4) ]() .
Step 4: Check for Recent Dashboard Issues
Dashboard display issues have been reported and fixed before [(2) ]() . If you're experiencing similar problems, the issue may be temporary and resolved by the Retell team .
Known Compatibility Issue:
There's also a reported issue where published agents may not appear in API calls, returning "Found agents: 0" even when the agent exists and is published in the dashboard [(3) ]() . This suggests there may be synchronization issues between the dashboard and API .
If none of these solutions work, the direct URL method using your agent ID should allow you to access your agent even when search functionality fails [(1) ]() .AI Evy
08/12/2025, 5:56 AMAI Evy
08/12/2025, 5:56 AM