# EU region (/advanced/eu-region)

<!-- agent-signals: reading_time_min: 3 · est_tokens: 1071 · updated: 2026-09-06 -->
Related: [Webhooks](/advanced/webhooks.md), [WebSockets](/advanced/websockets.md), [Agent safety](/advanced/safety.md), [Custom domains](/advanced/custom-domains.md), [Deliverability and warmup](/advanced/deliverability.md), [Build a multi-tenant platform](/advanced/multi-tenant.md)



# Target the EU region

AgentMail runs a separate EU deployment that serves the same API on its own hosts, and an organization set up there has its mail, inboxes, drafts, webhooks, and API keys processed and stored in the EU. Use the EU hosts whenever the API key starts with `am_eu_`, since a key authenticates only in its own region.

## Do this

Call the EU API host with an EU key (prefix `am_eu_`):

```bash
curl "https://api.agentmail.eu/v0/inboxes" \
  -H "Authorization: Bearer $AGENTMAIL_API_KEY"
```

For the CLI and the Go SDK, set the base URL once per session:

```bash
export AGENTMAIL_BASE_URL="https://api.agentmail.eu"
agentmail inboxes list
```

## SDK

Install: `npm install agentmail` (TypeScript), `pip install agentmail` (Python), `npm install -g agentmail-cli` (CLI).

* TypeScript: `new AgentMailClient()` reads the key's prefix and picks the region itself. Pin explicitly with `new AgentMailClient({ environment: AgentMailEnvironment.EuProd })`.
* Python: `AgentMail(environment=AgentMailEnvironment.EU_PROD)`. The `environment` option covers WebSocket connections too, so `EU_PROD` points both at the EU hosts.
* CLI: `export AGENTMAIL_BASE_URL="https://api.agentmail.eu"`, or per command `agentmail --base-url "https://api.agentmail.eu" inboxes list`.
* Go: reads the same `AGENTMAIL_BASE_URL` variable as the CLI.

Client configuration in depth is on [/integrations/sdks-and-cli](/integrations/sdks-and-cli).

## Facts

* EU API host: `https://api.agentmail.eu`. US API host: `https://api.agentmail.to`.
* EU WebSocket host: `wss://ws.agentmail.eu`. US WebSocket host: `wss://ws.agentmail.to`.
* Every endpoint path, parameter, and response shape is identical across the two regions.
* EU API keys start with `am_eu_`. US API keys start with `am_us_`.
* An organization lives in exactly one region, and all of its data stays in that region's deployment.
* The EU deployment runs on its own infrastructure hosted in the EU. Mail that moves through it is processed and stored there, along with inboxes, drafts, webhooks, and API keys.
* Every API key an organization issues starts with the organization's region prefix, which is how a key can tell a client where to connect.
* A key authenticates only in its own region. Calls that cross regions fail with a `403`.
* The EU region is part of enterprise agreements. Contact `support@agentmail.cc` to set up an organization there.

## Not supported

* An `am_us_` key does not authenticate on `api.agentmail.eu`, and an `am_eu_` key does not authenticate on `api.agentmail.to`. Every cross-region call fails with a `403`.
* An organization cannot span regions. It lives in exactly one region and all of its data stays there.
* The Python client takes the region through `environment`, not from the key prefix. Pass `environment=AgentMailEnvironment.EU_PROD` for the EU.

## Errors

| Error               | Status | Cause                                                                                              | Fix                                                                                         |
| ------------------- | ------ | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------- |
| `403` on every call | 403    | the key was sent to the other region's host, most often an `am_us_` key sent to `api.agentmail.eu` | check the key's prefix against the host, use a key issued by an organization in that region |

## Verify

```bash
curl "https://api.agentmail.eu/v0/inboxes" \
  -H "Authorization: Bearer $AGENTMAIL_API_KEY"
```

A `200` with an inbox list confirms the key and host match. A key known to be valid that gets `403` on every call is pointed at the wrong region's host, check its prefix first.

## Related

* [/integrations/sdks-and-cli](/integrations/sdks-and-cli) for client configuration in depth, from base URLs to retries and timeouts.
* [/advanced/plans-and-usage](/advanced/plans-and-usage) for the full enterprise entitlement list, EU region included.
* [/advanced/websockets](/advanced/websockets) for the WebSocket connections the Python `environment` option also routes.
* [/quickstart](/quickstart) for getting an API key first.
