Call (V2)
Update Call
Call (V2)
Phone Number
Agent
Retell LLM Response Engine (for single / multi prompt agent)
Knowledge Base
Batch call
Account
Custom Telephony
Custom LLM
Call (V2)
Update Call
Update metadata and sensitive data storage settings for an existing call
PATCH
/
v2
/
update-call
/
{call_id}
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
});
async function main() {
const callResponse = await client.call.update('call_a4441234567890777c4a4a123e6', {
metadata: { customer_id: 'cust_123', notes: 'Follow-up required' },
opt_out_sensitive_data_storage: true,
});
console.log(callResponse);
}
main();
{
"call_type": "web_call",
"access_token": "eyJhbGciOiJIUzI1NiJ9.eyJ2aWRlbyI6eyJyb29tSm9p",
"call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"version": 1,
"call_status": "registered",
"metadata": {},
"retell_llm_dynamic_variables": {
"customer_name": "John Doe"
},
"opt_out_sensitive_data_storage": true,
"opt_in_signed_url": true,
"start_timestamp": 1703302407333,
"end_timestamp": 1703302428855,
"transcript": "Agent: hi how are you doing?\nUser: Doing pretty well. How are you?\nAgent: That's great to hear! I'm doing well too, thanks! What's up?\nUser: I don't have anything in particular.\nAgent: Got it, just checking in!\nUser: Alright. See you.\nAgent: have a nice day\n ",
"transcript_object": [
{
"role": "agent",
"content": "hi how are you doing?",
"words": [
{
"word": "hi",
"start": 0.7,
"end": 1.3
}
]
}
],
"transcript_with_tool_calls": [
{
"role": "agent",
"content": "hi how are you doing?",
"words": [
{
"word": "hi",
"start": 0.7,
"end": 1.3
}
]
}
],
"recording_url": "https://retellai.s3.us-west-2.amazonaws.com/Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6/recording.wav",
"public_log_url": "https://retellai.s3.us-west-2.amazonaws.com/Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6/public_log.txt",
"latency": {
"e2e": {
"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",
"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",
"unitPrice": 1,
"cost": 60
}
],
"total_duration_seconds": 60,
"total_duration_unit_price": 1,
"total_one_time_price": 10,
"combined_cost": 70
}
}
Authorizations
Authentication header containing API key (find it in dashboard). The format is "Bearer YOUR_API_KEY"
Path Parameters
The call id of the call to be updated.
Example:
"call_a4441234567890777c4a4a123e6"
Body
application/json
Response
200
application/json
Call metadata updated successfully
The response is of type object
.
The response is of type object
.
The response is of type object
.
Was this page helpful?
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
});
async function main() {
const callResponse = await client.call.update('call_a4441234567890777c4a4a123e6', {
metadata: { customer_id: 'cust_123', notes: 'Follow-up required' },
opt_out_sensitive_data_storage: true,
});
console.log(callResponse);
}
main();
{
"call_type": "web_call",
"access_token": "eyJhbGciOiJIUzI1NiJ9.eyJ2aWRlbyI6eyJyb29tSm9p",
"call_id": "Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6",
"agent_id": "oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD",
"version": 1,
"call_status": "registered",
"metadata": {},
"retell_llm_dynamic_variables": {
"customer_name": "John Doe"
},
"opt_out_sensitive_data_storage": true,
"opt_in_signed_url": true,
"start_timestamp": 1703302407333,
"end_timestamp": 1703302428855,
"transcript": "Agent: hi how are you doing?\nUser: Doing pretty well. How are you?\nAgent: That's great to hear! I'm doing well too, thanks! What's up?\nUser: I don't have anything in particular.\nAgent: Got it, just checking in!\nUser: Alright. See you.\nAgent: have a nice day\n ",
"transcript_object": [
{
"role": "agent",
"content": "hi how are you doing?",
"words": [
{
"word": "hi",
"start": 0.7,
"end": 1.3
}
]
}
],
"transcript_with_tool_calls": [
{
"role": "agent",
"content": "hi how are you doing?",
"words": [
{
"word": "hi",
"start": 0.7,
"end": 1.3
}
]
}
],
"recording_url": "https://retellai.s3.us-west-2.amazonaws.com/Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6/recording.wav",
"public_log_url": "https://retellai.s3.us-west-2.amazonaws.com/Jabr9TXYYJHfvl6Syypi88rdAHYHmcq6/public_log.txt",
"latency": {
"e2e": {
"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",
"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",
"unitPrice": 1,
"cost": 60
}
],
"total_duration_seconds": 60,
"total_duration_unit_price": 1,
"total_one_time_price": 10,
"combined_cost": 70
}
}