Send With Confidence
Partner with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.
Time to read: 4 minutes
Regional Email is only available in Public Beta
With Twilio SendGrid, you can now send emails on servers in the European Union, reducing the data that leaves the region. In this post, you will learn how to set up regional subusers, dedicated IPs, and DNS records within the EU—plus, you’ll learn how to send emails using the SendGrid API at the base url api.eu.sendgrid.com.
Prerequisites
Before starting, you will need the following:
There are three things you need to configure before you can send regional emails:
A subuser that is bound to the EU region.
Sender Authentication to verify that you own the email address or domain that you send emails from.
Review the documentation for creating a subuser or see the cURL example below to create a Subuser in the EU region. When creating the subuser, make sure to specify the region as eu.
cURL Example:
You can only add one IP address per month via self service
The cURL command below adds a EU-based IP address and assigns it to the subuser and parent accounts. You can view the full documentation for this endpoint in the Add a Twilio SendGrid IP Address doc.
cURL Example:
This step assigns the EU-based IP address to the subuser you created. If you included the subuser parameter in the previous call, you can omit this step.
It is recommended to configure Domain Authentication, which requires you to add a record to your DNS host.
Follow the steps below to complete Domain Authentication. Each step includes links to documentation as well as the example cURL command.
1. Authenticate your domain
Authenticate a domain documentation.
2. Validate the domain authentication
Validate domain authentication documentation.
3. Associate the authenticated domain with your EU-based subuser
Associate an authenticated domain with a subuser documentation.
4. Create an EU-based branded link
Create a branded link documentation.
5. Validate the branded link
Validate a branded link documentation.
6. Associate the branded link with your subuser
Associate a branded link with a subuser documentation.
Your domain address has been verified and you can now use it to send emails!
You can create an API key for your EU-based subuser via the SendGrid Console or the API.
In the SendGrid Console, navigate to the API Keys section (under Settings from the Console landing page). Click on Create API Key in the top right corner of the screen. This will open another form on the right side of the screen. Give your API Key a useful name and click on Restricted Access to assign permissions to the key.
For optimal security, you should only give the minimum amount of permissions that you need. In this tutorial, you will only need the Mail Send permission to send emails.
Under Access Details, scroll to the Mail Send section and click on it to reveal the permissions underneath. Drag the slider to the right to enable the Mail Send permission.
Finally, scroll to the bottom of the form and click Create & View. The API key will now be displayed on your screen. You will not be able to retrieve the API key again once you leave this screen, so copy the secret somewhere safe.
See the cURL sample below or visit the Create API keys documentation to see how to create an API Key.
Now that you have an API Key for your EU subuser, you can use that subuser to send email. Make sure to send email using the base URL `api.eu.sendgrid.com`.
The cURL code below uses the SendGrid API to send an email in SendGrid's EU region. Fill in your authenticated sender email address in the to email field and your recipient's email address in the from email field. You can view the full Mail Send API documentation for more information about sending email programmatically.
Twilio SendGrid helps you send and receive emails at scale.
Here, you learned how to send emails in the EU region using Regional Email Public Beta by Twilio SendGrid API by following these steps:
Created a subuser that is bound to the EU region
Provisioned an IP address in the EU
Verified your email address as a single sender to send emails from
Created a SendGrid API Key with permission to send emails
Sent an email via api.eu.sendgrid.com
Additional resources:
https://help.twilio.com/articles/4410585868443-Data-Retention-and-Deletion-in-Twilio-Products
European Commission adopts new adequacy decision for safe and trusted EU-US data flows
Erase Recipients' Email Data | Twilio*
Disclaimer this doesn’t delete email activity feed data which is stored globally no longer than ~37 days
Regional Email is not available for Marketing Campaigns for this public beta.
1Regional Email in Public beta allows users to initiate sending email flow, but personal data including subject, recipient, and sending from address all are stored globally.
Partner with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.