import Retell from 'retell-sdk';
const client = new Retell({
apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted
});
const calls = await client.call.list();
console.log(calls.has_more);{
"pagination_key": "<string>",
"has_more": true,
"items": [
{
"call_type": "web_call",
"access_token": "eyJhbGciOiJIUzI1NiJ9.eyJ2aWRlbyI6eyJyb29tSm9p",
"call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"agent_version": 1,
"call_status": "registered",
"agent_name": "My Agent",
"metadata": {},
"retell_llm_dynamic_variables": {
"customer_name": "John Doe"
},
"collected_dynamic_variables": {
"last_node_name": "Test node"
},
"custom_sip_headers": {
"X-Custom-Header": "Custom Value"
},
"data_storage_setting": "everything",
"opt_in_signed_url": true,
"start_timestamp": 1703302407333,
"end_timestamp": 1703302428855,
"transfer_end_timestamp": 1703302628855,
"duration_ms": 10000,
"recording_url": "https://retellai.s3.us-west-2.amazonaws.com/Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6/recording.wav",
"recording_multi_channel_url": "https://retellai.s3.us-west-2.amazonaws.com/Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6/recording_multichannel.wav",
"scrubbed_recording_url": "https://retellai.s3.us-west-2.amazonaws.com/Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6/recording.wav",
"scrubbed_recording_multi_channel_url": "https://retellai.s3.us-west-2.amazonaws.com/Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6/recording_multichannel.wav",
"public_log_url": "https://retellai.s3.us-west-2.amazonaws.com/Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6/public_log.txt",
"knowledge_base_retrieved_contents_url": "https://retellai.s3.us-west-2.amazonaws.com/Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6/kb_retrieved_contents.txt",
"latency": {
"e2e": {
"p50": 800,
"p90": 1200,
"p95": 1500,
"p99": 2500,
"max": 2700,
"min": 500,
"num": 10,
"values": [
123
]
},
"asr": {
"p50": 800,
"p90": 1200,
"p95": 1500,
"p99": 2500,
"max": 2700,
"min": 500,
"num": 10,
"values": [
123
]
},
"llm": {
"p50": 800,
"p90": 1200,
"p95": 1500,
"p99": 2500,
"max": 2700,
"min": 500,
"num": 10,
"values": [
123
]
},
"llm_websocket_network_rtt": {
"p50": 800,
"p90": 1200,
"p95": 1500,
"p99": 2500,
"max": 2700,
"min": 500,
"num": 10,
"values": [
123
]
},
"tts": {
"p50": 800,
"p90": 1200,
"p95": 1500,
"p99": 2500,
"max": 2700,
"min": 500,
"num": 10,
"values": [
123
]
},
"knowledge_base": {
"p50": 800,
"p90": 1200,
"p95": 1500,
"p99": 2500,
"max": 2700,
"min": 500,
"num": 10,
"values": [
123
]
},
"s2s": {
"p50": 800,
"p90": 1200,
"p95": 1500,
"p99": 2500,
"max": 2700,
"min": 500,
"num": 10,
"values": [
123
]
}
},
"disconnection_reason": "agent_hangup",
"transfer_destination": "+12137771234",
"call_analysis": {
"call_summary": "The agent called the user to ask question about his purchase inquiry. The agent asked several questions regarding his preference and asked if user would like to book an appointment. The user happily agreed and scheduled an appointment next Monday 10am.",
"in_voicemail": false,
"user_sentiment": "Positive",
"call_successful": true,
"custom_analysis_data": {}
},
"call_cost": {
"product_costs": [
{
"product": "elevenlabs_tts",
"cost": 60,
"unit_price": 1,
"is_transfer_leg_cost": true
}
],
"total_duration_seconds": 60,
"total_duration_unit_price": 1,
"combined_cost": 70
},
"llm_token_usage": {
"values": [
123
],
"average": 123,
"num_requests": 123
}
}
],
"total": 123
}List Calls
List calls with unified cursor pagination response.
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: process.env['RETELL_API_KEY'], // This is the default and can be omitted
});
const calls = await client.call.list();
console.log(calls.has_more);{
"pagination_key": "<string>",
"has_more": true,
"items": [
{
"call_type": "web_call",
"access_token": "eyJhbGciOiJIUzI1NiJ9.eyJ2aWRlbyI6eyJyb29tSm9p",
"call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"agent_version": 1,
"call_status": "registered",
"agent_name": "My Agent",
"metadata": {},
"retell_llm_dynamic_variables": {
"customer_name": "John Doe"
},
"collected_dynamic_variables": {
"last_node_name": "Test node"
},
"custom_sip_headers": {
"X-Custom-Header": "Custom Value"
},
"data_storage_setting": "everything",
"opt_in_signed_url": true,
"start_timestamp": 1703302407333,
"end_timestamp": 1703302428855,
"transfer_end_timestamp": 1703302628855,
"duration_ms": 10000,
"recording_url": "https://retellai.s3.us-west-2.amazonaws.com/Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6/recording.wav",
"recording_multi_channel_url": "https://retellai.s3.us-west-2.amazonaws.com/Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6/recording_multichannel.wav",
"scrubbed_recording_url": "https://retellai.s3.us-west-2.amazonaws.com/Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6/recording.wav",
"scrubbed_recording_multi_channel_url": "https://retellai.s3.us-west-2.amazonaws.com/Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6/recording_multichannel.wav",
"public_log_url": "https://retellai.s3.us-west-2.amazonaws.com/Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6/public_log.txt",
"knowledge_base_retrieved_contents_url": "https://retellai.s3.us-west-2.amazonaws.com/Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6/kb_retrieved_contents.txt",
"latency": {
"e2e": {
"p50": 800,
"p90": 1200,
"p95": 1500,
"p99": 2500,
"max": 2700,
"min": 500,
"num": 10,
"values": [
123
]
},
"asr": {
"p50": 800,
"p90": 1200,
"p95": 1500,
"p99": 2500,
"max": 2700,
"min": 500,
"num": 10,
"values": [
123
]
},
"llm": {
"p50": 800,
"p90": 1200,
"p95": 1500,
"p99": 2500,
"max": 2700,
"min": 500,
"num": 10,
"values": [
123
]
},
"llm_websocket_network_rtt": {
"p50": 800,
"p90": 1200,
"p95": 1500,
"p99": 2500,
"max": 2700,
"min": 500,
"num": 10,
"values": [
123
]
},
"tts": {
"p50": 800,
"p90": 1200,
"p95": 1500,
"p99": 2500,
"max": 2700,
"min": 500,
"num": 10,
"values": [
123
]
},
"knowledge_base": {
"p50": 800,
"p90": 1200,
"p95": 1500,
"p99": 2500,
"max": 2700,
"min": 500,
"num": 10,
"values": [
123
]
},
"s2s": {
"p50": 800,
"p90": 1200,
"p95": 1500,
"p99": 2500,
"max": 2700,
"min": 500,
"num": 10,
"values": [
123
]
}
},
"disconnection_reason": "agent_hangup",
"transfer_destination": "+12137771234",
"call_analysis": {
"call_summary": "The agent called the user to ask question about his purchase inquiry. The agent asked several questions regarding his preference and asked if user would like to book an appointment. The user happily agreed and scheduled an appointment next Monday 10am.",
"in_voicemail": false,
"user_sentiment": "Positive",
"call_successful": true,
"custom_analysis_data": {}
},
"call_cost": {
"product_costs": [
{
"product": "elevenlabs_tts",
"cost": 60,
"unit_price": 1,
"is_transfer_leg_cost": true
}
],
"total_duration_seconds": 60,
"total_duration_unit_price": 1,
"combined_cost": 70
},
"llm_token_usage": {
"values": [
123
],
"average": 123,
"num_requests": 123
}
}
],
"total": 123
}Documentation Index
Fetch the complete documentation index at: https://docs.retellai.com/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Authentication header containing API key (find it in dashboard). The format is "Bearer YOUR_API_KEY"
Body
Filter criteria for calls. All conditions are implicitly connected with AND.
Show child attributes
Show child attributes
Sort calls by start_timestamp in ascending or descending order.
ascending, descending Maximum number of calls to return.
x <= 1000Number of records to skip for pagination.
x >= 0Opaque pagination cursor from a previous response.
Whether to include total (count of all calls matching filter_criteria, ignoring limit/skip/pagination_key) in the response. Defaults to false. Each enabled request triggers an additional aggregate query, so opt in only when the total is needed.
Was this page helpful?