Regional Email Public Beta: Set Up a Subuser and IP Address in the EU


Regional Email Public Beta: Set Up a Subuser and IP Address in the EU - 1
April 16, 2024
Written by
Tyler Bischel
Contributor
Opinions expressed by Twilio contributors are their own

Regional Email Public Beta: Set Up a Subuser and IP Address in the EU

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:

  • A Twilio SendGrid API account on the Pro plan or above with a dedicated IP (signup)
  • An API key for your parent account

Configure a SendGrid Subuser account to send regional emails

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. 

 

  • A SendGrid API Key with permission to send emails.

Create a regional subuser

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.

Create Subuser | Twilio

cURL Example:

IP procurement and assignment

Add a regional IP and assign to parent account and subusers:

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:

 

Assign the EU IP address to the EU subuser

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.

Complete Sender Authentication

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!

Create a SendGrid API Key to send emails

You can create an API key for your EU-based subuser via the SendGrid Console or the API.

Create an API Key in the Console

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.

Create an API Key via the API

See the cURL sample below or visit the Create API keys documentation to see how to create an API Key.

Send your email

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.

Conclusion

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:

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.


Recommended For You



Most Popular


Send With Confidence

Partner with the email service trusted by developers and marketers for time-savings, scalability, and delivery expertise.