https://retellai.com/?utm_source=discord&utm_medium=seo logo
How to use api to create a outbound phone call usi...
# ❓・ai-evy-support
c
@AI Evy How to use api to create a outbound phone call using an agent that is not tied to that number
a
Thanks for tagging me @cameroncubra. I'll look through relevant sources and get back to you shortly.
### Answer You can create an outbound phone call using the Create Phone Call API with the
override_agent_id
parameter to specify an agent that's not bound to the phone number [(1) ]() . Here's the code example from the documentation:
Copy code
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) ;
The key parameters are : - `from_number`: Your Retell number in E.164 format - `to_number`: The number to call in E.164 format - `override_agent_id`: Your agent ID (optional override) You can also include optional dynamic variables [(2) ]() :
Copy code
javascript
const registerCallResponse = await retell.call.createPhoneCall({
 from_number: '+14157774444', // replace with the number you purchased
 to_number: '+12137774445', // replace with the number you want to call
 retell_llm_dynamic_variables: { // replace with the dynamic variables you want to send (optional)
 name: 'John Doe',
 blood_group: 'B+'
 }, 
 custom_sip_headers: { // replace with custom sip headers you want to send (optional)
 X-Custom-Header: 'Custom Value'
 }
}) ;
console.log(registerCallResponse) ;
The API endpoint is `POST [(1) ]() .
​ To learn more, see the sources I considered: [[1] Discord message from @dannykimes on 2025-07-29](https://discord.com/channels/1186424376300679209/1294891368505937952/1399582499407003751) [[2] Outbound calls (make calls)](https://docs.retellai.com/deploy/outbound-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.