https://retellai.com/?utm_source=discord&utm_medium=seo logo
retell api batch call failed due to "Bad request -...
# ❓・ai-evy-support
b
@AI Evy retell api batch call failed due to "Bad request - please check your parameters Country is not in the allowed outbound country list for this phone number."
a
Thanks for tagging me @Bobster2002. I'll look through relevant sources and get back to you shortly.
### Answer --- This error occurs because the destination country for your batch call isn't in the allowed outbound country list configured for your
from_number
. [(1) ]() To fix this: Update your phone number's
outbound_allowed_countries
setting to include the countries you're trying to call. This is a list of ISO 3166-1 alpha-2 country codes. For example, if you're calling US and Canada numbers, your phone number should have:
Copy code
json
["US", "CA"]
You can update this via the [Import Phone Number]() or Update Phone Number API by setting the
outbound_allowed_countries
parameter. If not set or empty, calls to all countries are allowed—so if you previously had restrictions configured, you'll need to either add the target country to the list or remove the restriction entirely.
​ To learn more, see the sources I considered: [[1] Import Phone Number](https://docs.retellai.com/api-references/import-phone-number) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
@AI Evy am I able to change this on the retell UI?
a
Thanks for the follow-up, @Bobster2002. I'll get back to you soon.
### Answer I don't have specific information about whether the
outbound_allowed_countries
setting can be changed through the Retell dashboard UI. The available documentation only covers updating this setting via the API. [(1) ]() [(2) ]() Via API, you can update it using:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
[(1) ]() With the
outbound_allowed_countries
parameter set to an array of ISO 3166-1 alpha-2 country codes like
["US", "CA"]
. [(1) ]() [(2) ]() Check out these potentially useful sources: - [Create Phone Number]() - [Import Phone Number]() Would you like me to try to answer generally based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] Create Phone Number](https://docs.retellai.com/api-references/create-phone-number) [[2] Import Phone Number](https://docs.retellai.com/api-references/import-phone-number) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
b
@AI Evy anyway to configure the batch call, so that it will just skip invalid numbers? Automatically
a
Thanks for the follow-up, @Bobster2002. I'll get back to you soon.
### Answer --- ### Answer I don't have documentation indicating that batch calls can be configured to automatically skip invalid numbers (such as those with disallowed destination countries) . The batch call API and dashboard features don't mention a "skip invalid" or "ignore errors" parameter. [(1) ]() [(2) ]() Current workarounds based on community feedback: You can filter out invalid numbers before submitting your batch call by: 1. Exporting failed calls from Call History to CSV 2. Filtering your contact list to remove numbers in disallowed countries 3. Re-uploading the cleaned list for a new batch [(3) ]() For the
ignore_e164_validation
option—this only bypasses E.164 format validation for custom telephony setups and won't help with country restrictions. [(1) ]() Check out these potentially useful sources: - [Create Batch calls]() - [Create Batch Call API]() Would you like me to try to answer generally based on my knowledge instead?
​ To learn more, see the sources I considered: [[1] Create Batch calls](https://docs.retellai.com/deploy/make-batch-call) [[2] Create Batch Call](https://docs.retellai.com/api-references/create-batch-call) [[3] Batch call](https://discord.com/channels/1186424376300679209/1357080050343743508) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.