blekkk_
10/23/2025, 3:17 AMAI Evy
10/23/2025, 3:17 AMAI Evy
10/23/2025, 3:18 AMAI Evy
10/23/2025, 3:18 AMfrom_number must be a phone number you've purchased and configured through Retell AI - you can't use arbitrary numbers .
**Agent Binding**: The phone number should have an outbound_agent_id configured, or you need to use the override_agent_id parameter in your request .
**Parameter Names**: Use override_agent_id instead of agent_id, and retell_llm_dynamic_variables instead of custom_data :
json
{
"from_number": "+16504144521",
"to_number": "your_target_number",
"override_agent_id": "agent_71724df7636716ceb3a7e244c8",
"retell_llm_dynamic_variables": {
"name": "Sarah"
}
}
**Phone Number Configuration**: If you haven't set up your phone number yet, you'll need to either purchase a new number through Retell AI or import an existing number from a supported provider (Twilio, Telnyx, etc.) .
To update an existing phone number for outbound calls :
javascript
const phoneNumberResponse = await client.phoneNumber.update('+14157774444', {
inbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
nickname: 'Frontdesk Number',
outbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
}) ;
Configure your phone number properly first, then test the API call with the corrected payload structure .AI Evy
10/23/2025, 3:18 AMblekkk_
10/23/2025, 3:18 AMAI Evy
10/23/2025, 3:18 AMAI Evy
10/23/2025, 3:19 AMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.retrieve('16b980523634a6dc504898cda492e939') ;
console.log(agentResponse.agent_id) ;
[(2) ]()
If you're using a direct API call, make sure you're using the correct endpoint URL format [(1) ]() . The endpoint should be:
`
Common troubleshooting steps:
1. Verify your agent ID format - ensure you're using the complete agent ID as it appears in your dashboard
2. Check your API key - make sure it's properly configured in the Authorization header
3. Agent publication status - the agent may need to be published before it can be retrieved via API
If you're still experiencing issues, try creating a new test agent and publishing it, then test the retrieval with that agent ID .AI Evy
10/23/2025, 3:19 AMAI Evy
10/23/2025, 3:19 AMblekkk_
10/23/2025, 9:17 AMAI Evy
10/23/2025, 9:18 AMAI Evy
10/23/2025, 9:18 AMjavascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const callResponse = await client.call.update('call_a4441234567890777c4a4a123e6', {
data_storage_setting: 'everything_except_pii',
metadata: { customer_id: 'cust_123', notes: 'Follow-up required' },
}) ;AI Evy
10/23/2025, 9:18 AMAI Evy
10/23/2025, 9:18 AM