https://retellai.com/?utm_source=discord&utm_medium=seo logo
what’s the endpoint to launch a single outbound ca...
# ❓・ai-evy-support
k
@AI Evy what’s the endpoint to launch a single outbound call via API?
a
Thanks for tagging me @K Rudy. I'll look through relevant sources and get back to you shortly.
### Answer The endpoint to launch a single outbound call is: [(1) ]()
Copy code
POST /v2/create-phone-call
Full URL: ` Here's an example using the Retell SDK:
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) ;
Required parameters include
from_number
(a number you own in E.164 format) and
to_number
(the number you want to call in E.164 format) .
​ To learn more, see the sources I considered: [[1] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
k
@AI Evy Can you give me a sample payload with dynamic variables?
a
Thanks for the follow-up, @K Rudy. I'll get back to you soon.
### Answer Here's a sample payload for creating an outbound phone call with dynamic variables: [(1) ]()
Copy code
javascript
{
  "from_number": "+14157774444",
  "to_number": "+12137774445",
  "retell_llm_dynamic_variables": {
    "customer_name": "John Doe"
  }
}
The
retell_llm_dynamic_variables
field accepts key-value pairs where all values must be strings. [(2) ]() You can then reference these variables in your agent's prompts, begin message, tool configurations, or other settings using the
{{variable_name}}
syntax. For example, in your prompt you could write: "Hello {{customer_name}}, thanks for calling!" Important note: All values in
retell_llm_dynamic_variables
must be strings - numbers, booleans, or other data types are not supported.
​ To learn more, see the sources I considered: [[1] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) [[2] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
k
@AI Evy will the call be launched immediately? Or will it be scheduled?
a
Thanks for the follow-up, @K Rudy. I'll get back to you soon.
### Answer When you use the Create Phone Call API (
POST /v2/create-phone-call
) , the call is launched immediately by default [(1) ]() . The API initiates the outbound call as soon as the request is processed . There is no built-in scheduling parameter in the single call API endpoint . If you need to schedule calls for a future time, you would need to use Batch Calling instead [(2) ]() [(3) ]() . Batch Calling offers two options : - **Send Now**: Dispatch calls immediately - **Scheduled Time**: Send calls at a scheduled time For single API calls via
/v2/create-phone-call
, the call initiates right away [(1) ]() .
​ To learn more, see the sources I considered: [[1] Outbound Calls (Make Calls)](https://docs.retellai.com/deploy/outbound-call) [[2] Streamline Calls with Retell AI’s Batch Dialer | Retell AI](https://www.retellai.com/blog/boost-operation-efficiency-with-retell-ais-batch-calling) [[3] Batch Calling, New Docs, and More Improvements!](https://www.retellai.com/changelog/batch-calling-new-docs-and-more-improvements) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.