# SendGrid setup for PopMCP

You paste one SendGrid API key that starts with SG., shown once when you create it. Two optional fields take a separate Email Address Validation key and, for EU data-residency subusers only, the region eu.

- Auth: API credentials
- Setup time: 3 min
- API base URL: https://api.sendgrid.com/v3 (EU data-residency subusers: https://api.eu.sendgrid.com/v3)
- Credentials screen: https://app.sendgrid.com/settings/api_keys
- Provider docs: https://www.twilio.com/docs/sendgrid/ui/account-and-settings/api-keys

## Before you begin

- A Twilio SendGrid account on the free trial or a paid plan. A key acts only as the account that created it, so for a subuser, sign in as that subuser and create the key there.
- A SendGrid login that can open Settings, API Keys and create keys there. An account can hold up to 100 API keys.
- A verified sender or an authenticated domain if the AI will send mail. SendGrid answers 403 to a from address it does not recognise.
- Optional: a Pro or Premier plan for Email Address Validation, and the paid Email Activity add-on if you want per-message activity lookups.

## Get your credentials

### 1. Open API Keys in Settings

Sign in at `app.sendgrid.com`. In the left menu open Settings and click API Keys. Connecting a subuser? Sign in as that subuser first, because a key only ever acts as the account that created it.

Screen: https://app.sendgrid.com/settings/api_keys

### 2. Name the key and choose Full Access

Click Create API Key. Type `PopMCP` in API Key Name, choose Full Access so every tool works, then click Create & View. A narrower key, Restricted Access (Twilio's current docs call it Custom Access), also connects: tools outside the areas you allow answer 403.

Screen: https://app.sendgrid.com/settings/api_keys

### 3. Copy the key from the API Key Created page

Click the key to copy it. It starts with `SG.` and is about 69 characters long. SendGrid shows it only on this page and cannot recover it later, so store it before you leave.

Screen: https://app.sendgrid.com/settings/api_keys

### 4. Optional: create an Email Address Validation key

Skip this unless you want the AI to validate addresses (Pro and Premier plans). SendGrid issues that access only as its own key: click Create API Key again, name it `PopMCP validation`, choose Email Address Validation Access, click Create & View and copy it.

Screen: https://app.sendgrid.com/settings/api_keys

### 5. Paste the key into PopMCP

Paste the main key into API key. Put the validation key, if you made one, into Email Address Validation key (optional). Leave Data residency (optional) blank unless the key belongs to an EU data-residency subuser, in which case type `eu`.

## Fields PopMCP asks for

- API key (apiKey) [required]: SendGrid → Settings → API Keys → Create API Key → Full Access → Create & View. Copy the whole key (it starts with SG.). Using subusers? Connect each subuser with a key created inside that subuser.
- Email Address Validation key (optional) (validationApiKey): SendGrid gives Email Address Validation (Pro and Premier plans) its own key: Settings → API Keys → Create API Key → Email Address Validation Access. Only needed for the validation tools.
- Data residency (optional) (region): Leave blank for a standard account. Type eu only if this key belongs to an EU data-residency subuser (its API host is api.eu.sendgrid.com).

## Verify

PopMCP shows SendGrid as Verified, labelled with your company or username, plus (EU) for an EU data-residency subuser. Ask for last week's sending stats: sendgrid_get_global_stats returns daily requests, delivered and opens instead of a 401 or 403.

## Troubleshooting

### 401 `{"errors":[{"field":null,"message":"unauthorized"}]}`, or a 403, when connecting

Cause: The key was mistyped, cut short or deleted, or SendGrid temporarily blocked it after repeated failed requests.

Fix: Create a new key under Settings, API Keys, Create API Key and paste the whole value, including the SG. prefix.

### PopMCP says the value doesn't look like a SendGrid key because it doesn't start with SG.

Cause: The API Key ID from the key list was copied instead of the key itself. The list never shows key values.

Fix: Create a new key and copy it from the API Key Created page while it is on screen.

### Some tools answer 403 while others work

Cause: The key uses Restricted Access and does not include that area, for example Mail Send, Marketing or Suppressions.

Fix: On API Keys open the key's action menu, choose Edit API Key, raise the missing area and click Update, or create a Full Access key and reconnect.

### send_mail answers 403 about the from address

Cause: The from address is not a verified single sender and is not on an authenticated domain.

Fix: Verify the sender (sendgrid_create_verified_sender emails a confirmation link) or authenticate the domain under Settings, Sender Authentication, then send again.

### Sends fail with `User is not authorized to send mail based on their regional attribute`

Cause: The key belongs to an EU data-residency subuser but the connection is calling the global host.

Fix: Reconnect with eu in the Data residency (optional) field so calls go to api.eu.sendgrid.com.

### Marketing Campaigns, Email Activity or validation tools say they aren't available to EU data-residency subusers

Cause: SendGrid serves those APIs from its global region only.

Fix: Use a global (non-EU) SendGrid account for those tools. Sending, templates, stats and suppressions keep working on the EU connection.

### sendgrid_list_email_activity answers 403 with a Full Access key

Cause: The account has not bought SendGrid's Email Activity add-on, which the activity API needs.

Fix: Add the Email Activity add-on in SendGrid, or check the bounce, block, spam report and global unsubscribe lists instead.

---

Source: https://www.docs.popmcp.com/docs/integrations/sendgrid/