https://retellai.com/?utm_source=discord&utm_medium=seo logo
I’m trying to post calls on retell batch API but I...
# ❓・ai-evy-support
k
@AI Evy I’m trying to post calls on retell batch API but I’m getting a lot of “invalid number not in e64” format, I’ve implemented nanp 10 digit us/canada validation, but I need the full list of validation requirements for phone number so I don’t get more errors
a
Thanks for tagging me @K Rudy. I'll look through relevant sources and get back to you shortly.
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
### Answer --- The phone numbers must be in E.164 format. [(1) ]() [(2) ]() E.164 format requirements: - Must start with a
+
sign followed by the country code and number - Example:
"+14157774444"
[(1) ]() - Example:
"+12137774445"
[(2) ]() For your batch call tasks, ensure the
to_number
field follows this format exactly. [(1) ]() Bypassing E.164 validation (custom telephony only) : If you're using custom telephony (not Retell Telephony) , you have two options: 1. **Via API**: Set
ignore_e164_validation
to
true
in your request. This only applies when using custom telephony. [(2) ]() 2. **Via CSV upload**: Add a column named
ignore e164 validation
with value
true
for numbers that don't conform to E.164. This only applies when using custom telephony and does not apply when using Retell Telephony. [(3) ]() Common issues to check: - Missing the
+
prefix [(4) ]() - Including parentheses or dashes (e.g.,
+1(216) 340-9355
is incorrect — should be
+12163409355
)
​ To learn more, see the sources I considered: [[1] Create Batch Call](https://docs.retellai.com/api-references/create-batch-call) [[2] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) [[3] Create Batch calls](https://docs.retellai.com/deploy/make-batch-call) [[4] The resource you are requesting could not be found](https://discord.com/channels/1186424376300679209/1425103902101209209) ​
k
@AI Evy ok great, where in the body should I add the ignore e164
a
Thanks for the follow-up, @K Rudy. I'll get back to you soon.
### Answer The
ignore_e164_validation
parameter should be added as a top-level field in the request body when making outbound calls. [(1) ]() For the Create Phone Call API, include it like this:
Copy code
javascript
const phoneCallResponse = await client.call.createPhoneCall({
  from_number: '+14157774444',
  to_number: '+12137774445',
  ignore_e164_validation: true
}) ;
Important note: This parameter only applies when you are using custom telephony and does not apply when using Retell Telephony.
​ 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
I’m making a body that has multiple to number and also each of them has the same dynamic variables but different values, so where can I add that?
@AI Evy I’m making a body that has multiple to number and also each of them has the same dynamic variables but different values, so where can I add that?
a
Thanks for the follow-up, @K Rudy. I'll get back to you soon.
### Answer For batch calls with multiple recipients and per-task dynamic variables, you add them within each task object in the
tasks
array. [(1) ]() The
tasks
field is a list of individual call tasks, where each task represents a single outbound call and includes details such as the recipient's phone number and optional dynamic variables to personalize the call content. Here's the structure based on the Create Batch Call API:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const batchCallResponse = await client.batchCall.createBatchCall({
  from_number: '+14157774444',
  tasks: [{ to_number: '+12137774445' }],
}) ;
console.log(batchCallResponse.batch_call_id) ;
Each task in the
tasks
array can include its own
to_number
and dynamic variables specific to that recipient. You would structure it like:
Copy code
json
{
  "from_number": "+14157774444",
  "tasks": [
    { "to_number": "+12137774445" },
    { "to_number": "+12137774446" }
  ]
}
For the dynamic variables per task, you can use
retell_llm_dynamic_variables
to inject personalized data (e.g.,
{"customer_name": "John Doe"}
) . [(2) ]() [(3) ]() I don't have explicit documentation showing the exact field name for dynamic variables within each batch call task object. You may want to check the full API reference at [Create Batch Call]() for the complete task object schema, or reach out via [Contact Sales]() for clarification.
​ To learn more, see the sources I considered: [[1] Create Batch Call](https://docs.retellai.com/api-references/create-batch-call) [[2] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) [[3] 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 I meant where do I add the disable e164 in a request with multiple to numbers, can you give me an example with 3 dynamic variables?
a
Thanks for the follow-up, @K Rudy. I'll get back to you soon.
### Answer For batch calls via CSV upload, you can bypass E.164 validation by adding a column named
ignore e164 validation
with value
true
for each row/number that doesn't conform to E.164 format. [(1) ]() For dynamic variables in batch calls via CSV, you add additional columns in the CSV with custom data for each recipient. For example, a column header
first_name
can be referenced as
{{first_name}}
in your agent prompts. Example CSV structure with 3 dynamic variables: | phone number | ignore e164 validation | first_name | appointment_date | account_id | |--------------|------------------------|------------|------------------|------------| | 5551234567 | true | John | 2025-02-01 | ACC001 | | 5559876543 | true | Sarah | 2025-02-02 | ACC002 | | 5554567890 | true | Mike | 2025-02-03 | ACC003 | You can then reference these in your agent prompts as
{{first_name}}
,
{{appointment_date}}
, and
{{account_id}}
. , [(2) ]() Important: The
ignore e164 validation
option only applies when you are using custom telephony and does not apply when using Retell Telephony. [(1) ]() I don't have explicit documentation showing how to include
ignore_e164_validation
within each task object when using the Create Batch Call API programmatically. The available documentation shows the task object structure but doesn't specify this field at the task level. [(3) ]() For the full API schema or to confirm the exact field placement for programmatic batch calls, check the [Create Batch Call API reference]() or reach out via [Contact Sales]() .
​ To learn more, see the sources I considered: [[1] Create Batch calls](https://docs.retellai.com/deploy/make-batch-call) [[2] Dynamic Variables](https://docs.retellai.com/build/dynamic-variables) [[3] Create Batch Call](https://docs.retellai.com/api-references/create-batch-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
k
@AI Evy not on csv upload, via api
a
Thanks for the follow-up, @K Rudy. I'll get back to you soon.
### Answer I don't have documentation showing the exact structure for including
ignore_e164_validation
or
retell_llm_dynamic_variables
within each task object when using the Create Batch Call API programmatically. The sources I have available show: - For single phone calls,
retell_llm_dynamic_variables
is a top-level field in the request body [(1) ]() - For Register Phone Call (custom telephony) ,
retell_llm_dynamic_variables
is also a top-level field [(2) ]() Example from single call documentation:
Copy code
json
{ "customer_name": "John Doe" }
[(1) ]() However, I don't have the complete Create Batch Call API schema that shows whether these fields can be nested within individual task objects in the
tasks
array. Check out these potentially useful sources: - [Create Batch Call]() - for the full task object schema - [Dynamic Variables]() For clarification on the exact API structure for batch calls with per-task dynamic variables and E.164 validation bypass, you can reach out via [Contact Sales]() or visit [) . Would you like me to try to answer generally based on common API patterns?
​ To learn more, see the sources I considered: [[1] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) [[2] Register Phone Call](https://docs.retellai.com/api-references/register-phone-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
k
im getting error +17216805586 is not a valid number. Please provide a valid number in e.164 format. why that number does not work?
@AI Evy im getting error +17216805586 is not a valid number. Please provide a valid number in e.164 format. why that number does not work?
a
Thanks for the follow-up, @K Rudy. I'll get back to you soon.
### Answer The number
+17216805586
appears to be in valid E.164 format (+ followed by country code 1 and 10 digits) . [(1) ]() A few things to check: 1. Ensure there are no hidden characters - Sometimes copy/pasting can introduce invisible characters (spaces, special unicode characters) before the
+
or within the number. 2. Verify the area code is valid - 721 is not a standard US/Canada area code. US area codes don't start with 0 or 1 in the second digit (e.g., 721 would be invalid because the second digit is 2, but actually 721 is assigned to Sint Maarten in the Caribbean, not the US) . 3. If using custom telephony, you can bypass validation by setting
ignore_e164_validation
to
true
in your request.
Copy code
javascript
const phoneCallResponse = await client.call.createPhoneCall({
  from_number: '+14157774444',
  to_number: '+12137774445',
  ignore_e164_validation: true
}) ;
Important: The
ignore_e164_validation
option only applies when using custom telephony and does not apply when using Retell Telephony. [(2) ]() , [(1) ]() If the number is genuinely a US number, double-check that it's typed correctly without any hidden characters or formatting issues.
​ To learn more, see the sources I considered: [[1] Create Phone Call](https://docs.retellai.com/api-references/create-phone-call) [[2] Create Batch calls](https://docs.retellai.com/deploy/make-batch-call) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.