efadelrey
10/21/2025, 8:41 AMAI Evy
10/21/2025, 8:41 AMAI Evy
10/21/2025, 8:41 AMfrom_number must be a number you own in E.164 format [(3) ]() .
## Correct API Structure
Use this exact format for creating outbound calls:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const phoneCallResponse = await client.call.createPhoneCall({
from_number: '+14157774444',
to_number: '+12137774445',
}) ;
console.log(phoneCallResponse.agent_id) ;
## Agent Configuration
Before making calls, you must bind agents to your phone numbers [(2) ]() . You can either:
1. Set an outbound_agent_id on your phone number using the update API:
javascript
const phoneNumberResponse = await client.phoneNumber.update('+14157774444', {
inbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
nickname: 'Frontdesk Number',
outbound_agent_id: 'oBeDLoLOeuAbiuaMFXRtDOLriTJ5tSxD',
}) ;AI Evy
10/21/2025, 8:41 AMAI Evy
10/21/2025, 8:42 AMoverride_agent_id in your call request for one-time agent assignment [(3) ]() .
## Common Issues
- Ensure your from_number is properly configured in your Retell account [(1) ]()
- Use override_agent_id instead of agent_id
- Use retell_llm_dynamic_variables instead of custom_data
The 201 response for web calls suggests your API setup is working - the issue is specifically with phone number configuration for outbound calls.AI Evy
10/21/2025, 8:42 AM