---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/global-infrastructure/inbound-processing-api#article
headline: Set a phone number's inbound processing Region using the REST API
description: Learn how to get and set region of a phone number or short code for Twilio Voice and Messaging.
url: https://www.twilio.com/docs/global-infrastructure/inbound-processing-api
inLanguage: en
dateModified: 2026-10-05T16:25:30.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# Set a phone number's inbound processing Region using the REST API

This guide explains how to use Twilio's REST API to control which [Twilio Region](/docs/global-infrastructure/understanding-twilio-regions) handles incoming calls to your phone numbers.

To get the most out of this guide, please ensure you are familiar with the concepts described in the [Inbound Processing Region](/docs/global-infrastructure/inbound-call-processing) overview.

The examples in this guide target the Ireland (IE1) Region. To view the available Regions, see the [Region and Product Availability](/docs/global-infrastructure/regional-product-and-feature-availability) reference.

> \[!NOTE]
>
> Inbound Processing Region API V3 adds support for [SMS Data Residency in the EU](/docs/global-infrastructure/messaging-api-with-twilio-regions) in the Ireland (`IE1`) region. This covers configuring the messaging region for a phone number or short code to Ireland.
>
> To learn more about these changes, see the [V3 API documentation](#v3-region-configuration-api).

## Review your phone number's webhook configuration in the target Region

Your phone number's webhook configuration is Region-specific and may vary between different Regions. Before making any changes to your phone number's call routing, it's a good idea to double-check the number's configuration in the specific Region that you plan to set the number's routing to.

To manage a phone number's configuration via Twilio Console, follow the instructions under the phone number section of [our guide to managing Region-specific resources in the Console](/docs/global-infrastructure/managing-regional-resources-in-console).

To inspect a phone number's configuration via the API, make a request to fetch the [IncomingPhoneNumber resource](/docs/phone-numbers/api/incomingphonenumber-resource) in the target Region. Make sure that the request's FQDN targets the desired Region, and remember that the default FQDN of api.twilio.com defaults to the US1 Region.

For example, to check a phone number's configuration in the IE1 Region, you might make the following request using cURL or another HTTP client:

```bash
curl -u $API_KEY_SID:$API_KEY_SECRET \
  https://api.dublin.ie1.twilio.com/2010-04-01/Accounts/$ACCOUNT_SID/IncomingPhoneNumbers/$PHONE_NUMBER.json
```

Alternatively, you can issue these requests using a Twilio server-side SDK or the Twilio CLI. See the guide to [using the REST API with Twilio Regions](/docs/global-infrastructure/using-the-twilio-rest-api-in-a-non-us-region) for more information.

If the phone number's configuration in the target Region is not correct, use the REST API or the Console to adjust the number's configuration in the target Region before proceeding.

## Check which Region your phone number is routed to

To check the Region that your number is routed to, make a `GET` request to the Inbound Processing Region API.

```bash
curl -u $API_KEY_SID:$API_KEY_SECRET \
  https://routes.dublin.ie1.twilio.com/v2/PhoneNumbers/+16505551212
```

Look for the `voice_region` key in the response. This will indicate which Region your number's inbound voice calls will be routed to for processing.

> \[!WARNING]
>
> If the response to this request is a 404, the number has no explicitly set routing configuration and routes inbound calls to the default United States (US1) Region.
>
> This occurs only when a phone number has been provisioned via the `/IncomingPhoneNumbers` REST API resource. Phone numbers provisioned via the Twilio Console will automatically be configured with an explicit routing configuration.

## Set which Region your phone number is currently routed to

To set the Region that your number is routed to, make a `POST` request to the Inbound Processing Region API with the `VoiceRegion` parameter.

In this example, the request sets the Region for inbound calls to IE1:

```bash
curl -u $API_KEY_SID:$API_KEY_SECRET \
  https://routes.dublin.ie1.twilio.com/v2/PhoneNumbers/+16505551212 \
  -d VoiceRegion=ie1
```

> \[!CAUTION]
>
> Warning: changing a phone number's incoming call routing Region can lead to call handling errors in certain cases. Be sure to test call routing in the target Region in a pre-production environment before changing routing in production.

## Verify the incoming call routing Region

To demonstrate that calls to your phone number are being handled in the appropriate Region after a routing change, perform the following steps:

1. Place a call to your phone number from any phone.
2. Visit the phone number's Call Logs in the target Region.
3. Verify that you find a new Call Log that corresponds with your sample call from step 1.
4. Visit the phone number's Call Logs in a different, non-Active Region.
5. Verify that you do not find a Call Log that corresponds with your sample call.

## Routing calls to an Elastic SIP Trunk or Twilio SIP Domain

Twilio routes inbound calls to your Twilio-powered [SIP Trunks](/docs/sip-trunking) and [SIP Domains](/docs/voice/sip/api/sip-domain-resource) using the same system as for phone numbers.

To manage routing for these resources types using the Inbound Processing Region API, adjust the request URL paths illustrated above as follows:

1. Replace the word `PhoneNumbers` with `Trunk` or `SipDomain`, depending on which resource type you are managing.
2. Replace the phone number in the path with the Trunk or Domain's full URI.

> \[!WARNING]
>
> It may take up to five minutes for a routing change to take effect.

## V3 Region Configuration API

> \[!NOTE]

V3 includes support for setting the messaging region for a phone number or short code to Ireland (IE1) for EU SMS data residency. See the [SMS Data Residency Guide](/docs/global-infrastructure/messaging-api-with-twilio-regions) to learn more about this feature.

> \[!CAUTION]
>
> To control where Twilio processes a sender's SMS messages, set the `messagingRegion` parameter for that sender.
>
> Phone numbers and short codes can send and receive SMS only in their configured region. Messages sent from a sender in a different region fail.

### Phone numbers

```bash title="Get phone number regional configuration"
curl -u $API_KEY_SID:$API_KEY_SECRET \
  https://routes.twilio.com/v3/PhoneNumbers/+33123XXXXXX
```

```json title="Response example"
{
  "phoneNumber": "+33123XXXXXX",
  "url": "https://routes.twilio.com/v3/PhoneNumbers/+33123XXXXXX",
  "voiceRegion": "ie1",
  "messagingRegion": "us1",
  "dateCreated": "2026-03-15T10:00:00Z",
  "dateUpdated": "2026-03-18T14:30:00Z"
}
```

The messaging and voice regions can be set independently, so you can choose to only update one at a time. Twilio recommends keeping voice and messaging regions aligned to ensure consistent behavior.

> \[!NOTE]
>
> Phone numbers that are currently part of a messaging service should be removed from the service before updating the messaging region.

```bash title="Set phone number regional configuration"
curl -u $API_KEY_SID:$API_KEY_SECRET \
  https://routes.twilio.com/v3/PhoneNumbers/+33123XXXXXX \
  --data-urlencode messagingRegion=ie1 \
  --data-urlencode voiceRegion=ie1
```

```json title="Response example"
{
  "phoneNumber": "+33123XXXXXX",
  "url": "https://routes.twilio.com/v3/PhoneNumbers/+33123XXXXXX",
  "voiceRegion": "ie1",
  "messagingRegion": "ie1",
  "dateCreated": "2026-03-15T10:00:00Z",
  "dateUpdated": "2026-03-18T14:30:00Z"
}
```

### Short codes

To specify a short code, add the relevant [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) country code to the path of the API endpoint URL: `routes.twilio.com/v3/ShortCodes/{ISO_CODE}/{SHORT_CODE}`

```bash title="Get short code regional configuration"
curl -u $API_KEY_SID:$API_KEY_SECRET \
  https://routes.twilio.com/v3/ShortCodes/US/123456
```

```json title="Response example"
{
  "isoCountryCode": "US",
  "shortCode": "123456",
  "url": "https://routes.twilio.com/v3/ShortCodes/US/123456",
  "messagingRegion": "us1",
  "dateCreated": "2026-03-15T10:00:00Z",
  "dateUpdated": "2026-03-18T14:30:00Z"
}
```

```bash title="Set short code regional configuration"
curl -u $API_KEY_SID:$API_KEY_SECRET \
  https://routes.twilio.com/v3/ShortCodes/US/123456 \
  --data-urlencode messagingRegion=ie1
```

```json title="Response example"
{
  "isoCountryCode": "US",
  "shortCode": "123456",
  "url": "https://routes.twilio.com/v3/ShortCodes/US/123456",
  "messagingRegion": "ie1",
  "dateCreated": "2026-03-15T10:00:00Z",
  "dateUpdated": "2026-03-18T14:30:00Z"
}
```
