EU Data Residency with Twilio SMS: How to Configure It in Your Messaging Bot
Data residency stopped being a luxury for European startups or a headache exclusive to large corporations. As of June 2026, Twilio's Programmable Messaging API for SMS is generally available (GA) in the Ireland region (IE1), meaning that personal data from your SMS messages is processed and stored within the EU up until the point it reaches telecommunications carriers. If you have clients in Europe, if you handle data from EU citizens, or if you simply don't want your client's DPO calling you at 11 PM, this tutorial is for you.

This how-to assumes you already have an active Twilio account, a provisioned phone number, and that you're building or migrating a messaging bot (either WhatsApp Business API via Twilio, or plain SMS). Let's get straight to it.
Prerequisites
- Twilio account with access to Programmable Messaging API
- Twilio phone number enabled for SMS (or WhatsApp Sender)
- Node.js 20+ or Python 3.11+ (examples cover both)
- Environment variables configured:
TWILIO_ACCOUNT_SID,TWILIO_AUTH_TOKEN - Access to Twilio Console to configure the IE1 region
- (Optional) A working webhook receiver — ngrok or a real server
Step 1: Verify Your Account Has Access to IE1
Not all Twilio accounts have data residency enabled automatically. Confirm first:
- Go to console.twilio.com
- Navigate to Account > Data Residency
- If you see IE1 (Ireland) as an available region, you're good. If it doesn't appear, contact support — some Trial accounts don't have access.
You can also verify available regions via API:
curl -X GET "https://accounts.twilio.com/v1/Credentials/AWS" \
-u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN"
To query the Messaging Service configuration directly:
curl -X GET "https://messaging.twilio.com/v1/Services" \
-u "$TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN"
Step 2: Create or Migrate a Messaging Service to IE1
Data residency in Twilio SMS works at the Messaging Service level, not per individual number. You need to create (or update) a Messaging Service pointing to IE1.
From the Console:
1. Go to Messaging > Services > Create Messaging Service
2. In the Region field, select IE1 - Ireland
3. Assign your phone numbers to this service
4. Save the MessagingServiceSid — you'll need it in your code
From the API (Node.js):
const twilio = require('twilio');
const client = twilio(
process.env.TWILIO_ACCOUNT_SID,
process.env.TWILIO_AUTH_TOKEN,
{ region: 'ie1' } // <-- this is the key part
);
async function createMessagingService() {
const service = await client.messaging.v1.services.create({
friendlyName: 'EU Bot Service',
usecase: 'notifications',
});
console.log('Service SID:', service.sid);
return service.sid;
}
createMessagingService();
From the API (Python):
from twilio.rest import Client
import os
client = Client(
os.environ['TWILIO_ACCOUNT_SID'],
os.environ['TWILIO_AUTH_TOKEN'],
region='ie1' # <-- EU data residency
)
service = client.messaging.v1.services.create(
friendly_name='EU Bot Service',
usecase='notifications'
)
print(f"Service SID: {service.sid}")
Production warning: The region='ie1' parameter in the client constructor is what routes requests to European infrastructure. If you forget this parameter, the client defaults to us1 and your data travels to the United States even if you configured IE1 in the Console. Double-check mandatory.
Step 3: Send SMS from the IE1 Region
Once you have the Messaging Service configured, sending messages is practically the same as always, with two differences: you use messagingServiceSid instead of from, and the client has region: 'ie1'.
Node.js:
const twilio = require('twilio');
const client = twilio(
process.env.TWILIO_ACCOUNT_SID,
process.env.TWILIO_AUTH_TOKEN,
{ region: 'ie1' }
);
async function sendEUSMS(to, body) {
const message = await client.messages.create({
to: to, // e.g. '+34612345678'
messagingServiceSid: process.env.TWILIO_MESSAGING_SERVICE_SID,
body: body,
});
console.log(`Message SID: ${message.sid} | Status: ${message.status}`);
return message;
}
sendEUSMS('+34612345678', 'Hello from IE1, your data stays in Europe.');
Python:
import os
from twilio.rest import Client
client = Client(
os.environ['TWILIO_ACCOUNT_SID'],
os.environ['TWILIO_AUTH_TOKEN'],
region='ie1'
)
def send_eu_sms(to: str, body: str):
message = client.messages.create(
to=to,
messaging_service_sid=os.environ['TWILIO_MESSAGING_SERVICE_SID'],
body=body
)
print(f"SID: {message.sid} | Status: {message.status}")
return message
send_eu_sms('+34612345678', 'Hello from IE1.')
Step 4: Configure the Inbound Webhook in IE1
If your bot receives messages (not just sends them), the webhook must also point to endpoints that process data within the EU. Configure the inboundRequestUrl of your Messaging Service:
await client.messaging.v1.services(process.env.TWILIO_MESSAGING_SERVICE_SID)
.update({
inboundRequestUrl: 'https://your-eu-server.com/webhook/sms',
inboundMethod: 'POST',
statusCallback: 'https://your-eu-server.com/webhook/status',
});
Real-world warning: If your webhook server is on AWS us-east-1 but the Messaging Service is on IE1, Twilio fulfills its part (data in EU until the carrier), but your own logs and database may be in the US. For full GDPR compliance, your processing infrastructure must also be in the EU — eu-west-1 (Ireland) or eu-central-1 (Frankfurt) are the most common options.
Step 5: Validate Twilio's Signature on Your Webhook
This isn't exclusive to IE1, but in production it's mandatory. Twilio signs each request with your Auth Token:
const twilio = require('twilio');
function validateTwilioRequest(req, res, next) {
const twilioSignature = req.headers['x-twilio-signature'];
const url = `https://your-eu-server.com${req.originalUrl}`;
const isValid = twilio.validateRequest(
process.env.TWILIO_AUTH_TOKEN,
twilioSignature,
url,
req.body
);
if (!isValid) {
return res.status(403).send('Forbidden');
}
next();
}
Production Warnings Nobody Tells You
-
Twilio Console logs are still global. Even though message data is processed in IE1, the web Console may display metadata on US servers. For strict GDPR audits, query logs via API from IE1, not through the Console.
-
WhatsApp vs SMS: This GA applies to SMS. If you use Twilio for WhatsApp Business API, WhatsApp data residency has a different roadmap — check the current status of that feature separately before promising it to your client.
-
Local phone numbers: For SMS in the EU you need local numbers (UK, Spain, Germany, etc.). US numbers may have delivery restrictions on European networks. Provision local numbers within your IE1 Messaging Service.
-
Pricing: IE1 may have slightly different costs than
us1. Review Twilio's pricing calculator with IE1 selected before scaling up. -
Staging testing: Create a staging Messaging Service also in IE1. Don't test compliance with your production service.
Flow Summary
Your Bot (EU server)
→ Twilio SDK (region: ie1)
→ Twilio IE1 Infrastructure
→ Carrier (personal data stays in EU up to this point)
→ User's phone
With this your integration meets the data residency requirement for SMS in the EU, you have ready-to-use snippets for both Node.js and Python, and you know where the pitfalls are that could cost you a fine or an uncomfortable call from your European client.