> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cartesia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Regional routing

> How Twilio regions affect call routing and credential scoping.

Twilio phone numbers are scoped to a region through the API credentials used to manage them. The region determines how Twilio routes API calls, and matching it lets Cartesia serve region-specific traffic from a nearby cluster.

## How it works

When you import a Twilio phone number into Cartesia:

1. **Twilio routes the call regionally.** Twilio directs incoming calls to the region configured on the API key that manages the number: `us1`, `ie1` (Ireland), or `au1` (Australia).
2. **Cartesia must target the same region.** To act on a live call, such as a transfer or hangup, Cartesia sends API requests back to Twilio. These requests must reach the region where Twilio is handling the call.
3. **The region on the provider keeps both sides aligned.** When you set a region on your Cartesia provider, every request from Cartesia targets that Twilio regional edge.

The region is tied to the provider's API credentials, not to the phone number's country code or your agent's region. A UK number (`+44...`) under a `us1` provider routes through a US Twilio server. To route it through the closest server, import it under an `ie1` provider.

<Warning>
  If the region is missing or wrong, transfers and outbound calls fail with authentication errors. The region on your Twilio credentials must match the region on the Cartesia provider.
</Warning>

## Configure the region

<Steps>
  <Step title="Check your Twilio region">
    In the [Twilio Console](https://console.twilio.com/), go to **Phone Numbers → Manage → Active numbers**, select your number, and check the **Edge Location** under **Voice & Fax**.

    Supported regions: `us1` (US, default), `ie1` (Ireland), `au1` (Australia).
  </Step>

  <Step title="Set the region in Twilio (if needed)">
    If the edge location does not match the region you want, update it under **Voice & Fax** and save.

    <Note>
      Non-default regions require a region-specific API key from Twilio. A standard US key does not work for `ie1` or `au1`.
    </Note>
  </Step>

  <Step title="Match the region in Cartesia">
    When you create a provider or import a phone number, set `region` to match your Twilio configuration.
  </Step>
</Steps>

## Set up multiple regions

If you operate in several Twilio regions, create one provider per region:

1. In Twilio, create a region-specific API key (see [Step 2 of the integration guide](/line/integrations/telephony/twilio/integration#step-2-create-an-api-key)).
2. Link the same Twilio Account SID once per region:

```bash theme={null}
# US region
curl -X POST "https://api.cartesia.ai/agents/phone-numbers/providers" \
  -H "X-API-Key: $CARTESIA_API_KEY" \
  -H "Cartesia-Version: 2026-08-14" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "twilio",
    "account_sid": "YOUR_TWILIO_ACCOUNT_SID",
    "api_key_sid": "US_API_KEY_SID",
    "api_key_secret": "US_API_KEY_SECRET",
    "region": "us1"
  }'

# Ireland region
curl -X POST "https://api.cartesia.ai/agents/phone-numbers/providers" \
  -H "X-API-Key: $CARTESIA_API_KEY" \
  -H "Cartesia-Version: 2026-08-14" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "twilio",
    "account_sid": "YOUR_TWILIO_ACCOUNT_SID",
    "api_key_sid": "IE_API_KEY_SID",
    "api_key_secret": "IE_API_KEY_SECRET",
    "region": "ie1"
  }'
```

Each Account SID and region pair is unique. Import each phone number under the provider that matches its routing region.

## Troubleshooting

| Symptom                                             | Cause                                                              | Fix                                                                                               |
| --------------------------------------------------- | ------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------- |
| Outbound call fails with an authentication error    | The API key's region does not match the provider's region          | Set the provider's region to the region the Twilio API key was created for                        |
| Calls route through the wrong region                | The number was imported under the wrong provider                   | Update the number's provider with `PATCH /agents/phone-numbers/{id}`                              |
| Credential update rejected with unreachable numbers | The new API key cannot access the numbers in the provider's region | Use a key with access to every number. Twilio lists the unreachable numbers in the error response |
