! Andrii - AI Engineer
09/30/2025, 4:16 AMAI Evy
09/30/2025, 4:16 AMAI Evy
09/30/2025, 4:17 AMagent_id parameter in your call request [(1) ]() .
Here's how to create an outbound call with a specific agent:
javascript
import Retell from 'retell-sdk';
const client = new Retell({
apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.create({
response_engine: { llm_id: 'llm_234sdertfsdsfsdf', type: 'retell-llm' },
voice_id: '11labs-Adrian',
}) ;
console.log(agentResponse.agent_id) ;
However, there's an important consideration: if your phone number is already assigned to an agent in the dashboard, it will override your agent_id parameter [(2) ]() . This means the phone number's default agent configuration takes precedence over the agent_id you specify in the API call .
To ensure you're using the correct agent for outbound calls:
1. Make sure your phone number isn't bound to a specific agent in the dashboard, or
2. Use a phone number that allows agent_id override for outbound calls [(3) ]() [(4) ]()
When retrieving phone number details, you can check the outbound_agent_id field to see which agent is currently assigned to that number [(3) ]() .AI Evy
09/30/2025, 4:17 AMAI Evy
09/30/2025, 4:17 AM! Andrii - AI Engineer
09/30/2025, 4:44 AM