Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

Twilio API domain migration guide


Twilio is deprecating the api.REGION.twilio.com domain pattern (where REGION is ie1, au1, br1, de1, jp1, sg1, or us2). These domains process all requests in US1 regardless of the region code and will stop working on April 28, 2026.

Migrate fromMigrate to
api.ie1.twilio.com, api.au1.twilio.com, api.br1.twilio.com, api.de1.twilio.com, api.jp1.twilio.com, api.sg1.twilio.com, api.us2.twilio.comapi.twilio.com
SDK usage with region parameter onlySDK usage without region, or with both edge and region

api.us1.twilio.com remains valid. If you need Twilio to primarily process and store data outside the US (in Ireland or Australia), see Understanding Edge Locations.


Identify affected systems

identify-affected-systems page anchor

Search your code, configuration files, and infrastructure for the deprecated domains (api.ie1.twilio.com, api.au1.twilio.com, api.br1.twilio.com, api.de1.twilio.com, api.jp1.twilio.com, api.sg1.twilio.com, api.us2.twilio.com).


Choose your primary data processing region

choose-your-primary-data-processing-region page anchor

Twilio can process your data in the United States, Ireland, or Australia. Identify the regions your applications need.


If you make API requests without using a Twilio SDK (for example, with cURL or a custom HTTP client), update the domain based on where you need data processed.

USIrelandAustralia
  • Replace the deprecated domain with api.twilio.com. Your existing credentials continue to work.

    1
    # Before (deprecated)
    2
    curl -X POST https://api.ie1.twilio.com/2010-04-01/Accounts/$ACCOUNT_SID/Messages.json \
    3
    -u $ACCOUNT_SID:$AUTH_TOKEN \
    4
    -d "Body=Hello from Twilio"
    5
    6
    # After
    7
    curl -X POST https://api.twilio.com/2010-04-01/Accounts/$ACCOUNT_SID/Messages.json \
    8
    -u $ACCOUNT_SID:$AUTH_TOKEN \
    9
    -d "Body=Hello from Twilio"

(warning)

Update to the Latest SDK Version

Before migrating, update to the latest version of your Twilio SDK.

Older SDK versions may not properly support the edge parameter or may have bugs related to regional routing. Updating to the latest SDK version ensures:

  • Proper support for edge and region parameters
  • Bug fixes for regional routing
  • Improved error handling

Check the Twilio Helper Libraries page for the latest SDK versions.

Select your SDK language to see migration examples. If you need data processing in Ireland or Australia, see Using the Twilio REST API in a non-US Region.

Node.jsPythonRubyPHPJavaC# / .NET

Before: Deprecated pattern

1
// Deprecated - region without edge routes to US only
2
const twilio = require('twilio');
3
const client = twilio(accountSid, authToken, {
4
region: 'ie1'
5
});

After: US processing

1
// Correct - processes in US
2
const twilio = require('twilio');
3
const client = twilio(accountSid, authToken);
4
// No region parameter needed

After: Regional processing

If you are looking to use regionalized Twilio applications, see Using the Twilio REST API in a non-US Region.

1
// Processes in IE1 (requires IE1 credentials and data migration)
2
const twilio = require('twilio');
3
const client = twilio(accountSid, authToken, {
4
edge: 'dublin',
5
region: 'ie1'
6
});
(error)

Important

When using any SDK, specifying only the region parameter without the edge parameter routes requests to US1, not the specified region. Always specify both edge and region parameters together for regional processing.


Migrate infrastructure and networking

migrate-infrastructure-and-networking page anchor

Migrate DNS allowlists

migrate-dns-allowlists page anchor

Update your DNS allowlists to include the correct domains:

Remove (deprecated domains):

1
api.ie1.twilio.com
2
api.au1.twilio.com
3
api.br1.twilio.com
4
api.de1.twilio.com
5
api.jp1.twilio.com
6
api.sg1.twilio.com
7
api.us2.twilio.com

Keep or Add (US processing):

1
api.twilio.com
2
api.us1.twilio.com (valid - processes in US)

Add (if using regional processing - IE1 and AU1 only):

1
api.dublin.ie1.twilio.com
2
api.sydney.au1.twilio.com

Update firewall rules, security groups, proxies, and load balancers that reference the deprecated domains.

(information)

Info

Twilio uses a CDN, so IP addresses may vary. Use domain names in allowlists rather than IP addresses when possible. See Network Connectivity Requirements for IP ranges.


Test in a development environment before deploying to production. If using regional processing, confirm your regional credentials work. Deploy gradually and monitor error rates before completing the migration.


Common issues and solutions

common-issues-and-solutions page anchor

Issue: "Authentication failed" errors

issue-authentication-failed-errors page anchor

Cause: Using US credentials with regional endpoints, or vice versa.

Solution: Ensure you're using region-specific credentials for regional endpoints. See managing Regional API credentials.

1
# Wrong - US credentials with IE1 endpoint
2
curl -u $US_ACCOUNT_SID:$US_AUTH_TOKEN \
3
https://api.dublin.ie1.twilio.com/...
4
5
# Right - IE1 credentials with IE1 endpoint
6
curl -u $IE1_API_KEY_SID:$IE1_API_KEY_SECRET \
7
https://api.dublin.ie1.twilio.com/...

Issue: Requests still going to US despite using region parameter in SDK

issue-requests-still-going-to-us-despite-using-region-parameter-in-sdk page anchor

Cause: Specifying region without edge parameter.

Solution: Always specify both edge and region together:

1
// Wrong - only region specified
2
const client = twilio(accountSid, authToken, {
3
region: 'ie1' // Still routes to US!
4
});
5
6
// Right - both edge and region specified
7
const client = twilio(accountSid, authToken, {
8
edge: 'dublin',
9
region: 'ie1'
10
});

Issue: DNS resolution fails for new domain pattern

issue-dns-resolution-fails-for-new-domain-pattern page anchor

Cause: Firewall, proxy, or DNS resolver blocking new domain patterns.

Solution:

  1. Update DNS allowlists
  2. Update firewall rules
  3. Clear DNS cache: sudo dscacheutil -flushcache (macOS) or ipconfig /flushdns (Windows)
  4. Verify DNS resolution: nslookup api.dublin.ie1.twilio.com

Issue: SSL/TLS certificate validation errors

issue-ssltls-certificate-validation-errors page anchor

Cause: Certificate mismatch or outdated certificates.

Solution:

  1. Update system CA certificates
  2. Ensure clients support SNI (Server Name Indication)
  3. Verify certificate chain: openssl s_client -connect api.dublin.ie1.twilio.com:443

Contact Twilio Support(link takes you to an external page) for assistance with your migration.