K Rudy
03/06/2026, 5:03 PMAI Evy
03/06/2026, 5:04 PMAI Evy
03/06/2026, 5:04 PMAI Evy
03/06/2026, 5:04 PMagent_id using the filter_criteria parameter in your request body. Here's an example:
json
{
"filter_criteria": {
"agent_id": ["agent_oBeDLoLOeuAbiuaMFXRtDOLriT12345"]
}
}
The response includes call analysis data such as:
- call_summary
- user_sentiment
- call_successful
- custom_analysis_data
You can also filter by additional criteria like call_status, call_type, direction, and date ranges using start_timestamp.
For more details on post-call analysis data types (Boolean, Text, Number, Selector) , see the [Post Call Analysis Overview]() . [(2) ]()AI Evy
03/06/2026, 5:04 PMK Rudy
03/06/2026, 5:05 PMAI Evy
03/06/2026, 5:05 PMAI Evy
03/06/2026, 5:05 PM/list-calls. [(1) ]()
Using the SDK, you can call it like this:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponses = await client.agent.list() ;
[(2) ]()
For filtering by a specific agent, use client.call.list() with filter_criteria containing your agent_id. [(1) ]()AI Evy
03/06/2026, 5:05 PMAI Evy
03/06/2026, 5:05 PMK Rudy
03/06/2026, 5:07 PMAI Evy
03/06/2026, 5:07 PMAI Evy
03/06/2026, 5:07 PM/v2/list-calls. [(1) ]()
The base URL for Retell AI's API is ` so the full URL would be:
<https://api.retellai.com/v2/list-calls>
Here's a sample request body to filter calls by a specific agent:
json
{
"filter_criteria": {
"agent_id": ["agent_oBeDLoLOeuAbiuaMFXRtDOLriT12345"],
"call_status": ["ended"],
"call_type": ["phone_call"],
"direction": ["inbound"],
"start_timestamp": {
"upper_threshold": 1738475421000,
"lower_threshold": 1738475411000
}
},
"sort_order": "descending",
"limit": 50
}
Using the SDK, you can call it like this:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const callResponses = await client.call.list() ;
console.log(callResponses) ;
The Authorization header should be formatted as Bearer YOUR_API_KEY.AI Evy
03/06/2026, 5:07 PMAI Evy
03/06/2026, 5:07 PMK Rudy
03/06/2026, 6:58 PMAI Evy
03/06/2026, 6:58 PMAI Evy
03/06/2026, 6:59 PMbatch_call_id. [(1) ]()
The endpoint is POST `
Here's a sample request body to filter by batch call ID:
json
{
"filter_criteria": {
"batch_call_id": ["batch_call_dbcc4412483ebfc348abb"]
},
"sort_order": "descending",
"limit": 1000
}
The filter_criteria parameter accepts various fields for filtering, and you can combine batch_call_id with other filters like call_status, start_timestamp, etc.
Each call in the response will include:
- call_id
- transcript
- recording_url
- call_analysis (with call_summary, user_sentiment, call_successful, custom_analysis_data)
- metadata
- And other call details
Note: There have been some community reports of issues when filtering by batch_call_id, where users received internal server errors. [(2) ]() If you encounter this, double-check your payload format or test with curl to isolate the issue.AI Evy
03/06/2026, 6:59 PMAI Evy
03/06/2026, 6:59 PMK Rudy
03/06/2026, 7:00 PMAI Evy
03/06/2026, 7:00 PMAI Evy
03/06/2026, 7:01 PMcall_ended – Triggered when a call completes, transfers, or encounters an error
- call_analyzed – Triggered when call analysis is complete (includes full call data with call_analysis object)
Each call in a batch will trigger these events individually as they complete.
## Setting Up Webhooks
You can register webhooks at two levels:
- Account-level webhooks – Set up in the dashboard's webhooks tab; notifies you of events for any agent under your account
- Agent-level webhooks – Set webhook_url when creating/updating an agent; events for that agent go to this URL instead of the account-level webhook
## Example Endpoint
javascript
import Retell from "retell-sdk";
import express, { Request, Response } from "express";
const app = express() ;
app.use(express.json() ) ;
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) ;
}
res.status(204) .send() ;
}) ;
[(2) ]()
When processing batch calls, you could track the call_ended or call_analyzed events and match them to your batch using the call metadata or by querying the List Calls API with batch_call_id after receiving notifications.AI Evy
03/06/2026, 7:01 PMAI Evy
03/06/2026, 7:01 PMK Rudy
03/06/2026, 7:01 PMAI Evy
03/06/2026, 7:01 PMAI Evy
03/06/2026, 7:02 PMcall_started
- call_ended
- call_analyzed
- transfer_started
- transfer_bridged
- transfer_cancelled
- transfer_ended
These events trigger per individual call, not at the batch level.
To automate detection of when a batch call finishes, you would need to implement your own logic—for example:
1. Track the total number of calls in your batch
2. Count call_ended or call_analyzed webhook events matching that batch
3. Trigger your automation when all calls have completed
This is a common feature request. You may want to submit this as a suggestion in the #📒・feature-requests channel on Discord.AI Evy
03/06/2026, 7:02 PMAI Evy
03/06/2026, 7:02 PMK Rudy
03/06/2026, 7:16 PMAI Evy
03/06/2026, 7:16 PMAI Evy
03/06/2026, 7:16 PMagent_id filter to download call reports for a specific agent. [(1) ]()
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const callResponses = await client.call.list() ;
console.log(callResponses) ;
The response will include call_analysis data with call_summary, user_sentiment, call_successful, and custom_analysis_data.
Feel free to reach out if you have more questions!AI Evy
03/06/2026, 7:16 PMAI Evy
03/06/2026, 7:16 PMK Rudy
03/06/2026, 7:17 PMAI Evy
03/06/2026, 7:17 PMAI Evy
03/06/2026, 7:17 PMcall_id, agent_id, transcript, recording_url, call_analysis, metadata, latency, etc.) , and there is no parameter to specify a subset of fields.
You would need to handle field selection on your end after receiving the response—for example, by extracting only the fields you need in your application code:
javascript
const callResponses = await client.call.list({
filter_criteria: {
agent_id: ["your_agent_id"]
},
limit: 50
}) ;
// Extract only the fields you need
const report = callResponses.map(call => ({
call_id: call.call_id,
call_summary: call.call_analysis?.call_summary,
user_sentiment: call.call_analysis?.user_sentiment
}) ) ;
This approach lets you shape the data for your report while working within the API's current capabilities.AI Evy
03/06/2026, 7:17 PMAI Evy
03/06/2026, 7:17 PMAI Evy
03/06/2026, 8:40 PMK Rudy
03/06/2026, 8:40 PMAI Evy
03/06/2026, 8:40 PMAI Evy
03/06/2026, 8:40 PMAI Evy
03/06/2026, 8:40 PMlimit parameter for the List Calls API has a maximum of 1000. [(1) ]()
The default is 50, and you can set it up to 1000 per request.
To retrieve more than 1000 calls, you need to use pagination with the pagination_key parameter. The pagination_key is typically the last call_id from your previous response, and it fetches the next page of results (exclusive of that call ID) .
Example with increased limit and pagination:
json
{
"filter_criteria": {
"agent_id": ["your_agent_id"]
},
"limit": 1000,
"pagination_key": "last_call_id_from_previous_response"
}