# Inbound Domains

Inbound Domains allow you to receive emails using SparkPost. When combined with Relay Webhooks, SparkPost can parse the emails sent to the inbound domain and post their contents to your server.

In order to use an inbound domain, you will need to add MX records to your DNS settings.

#### MX Records for US Accounts

| Name              | Type | Data                  | Priority |
| ----------------- | ---- | --------------------- | -------- |
| \<inbound domain> | MX   | rx1.sparkpostmail.com | 10       |
| \<inbound domain> | MX   | rx2.sparkpostmail.com | 10       |
| \<inbound domain> | MX   | rx3.sparkpostmail.com | 10       |

#### MX Records for EU Accounts

| Name              | Type | Data                     | Priority |
| ----------------- | ---- | ------------------------ | -------- |
| \<inbound domain> | MX   | rx1.eu.sparkpostmail.com | 10       |
| \<inbound domain> | MX   | rx2.eu.sparkpostmail.com | 10       |
| \<inbound domain> | MX   | rx3.eu.sparkpostmail.com | 10       |

### Regional Endpoints

Please use the appropriate API endpoint based on your workspace region:

* EU workspaces: <https://email.eu-west-1.api.bird.com>
* US workspaces: <https://email.us-west-1.api.bird.com>

## List all Inbound Domains

> Returns an array with all your inbound domains.

```json
{"openapi":"3.0.4","info":{"title":"Reach Email API","version":"1.0"},"tags":[{"name":"Inbound Domains","description":"Inbound Domains allow you to receive emails using SparkPost. When combined with Relay Webhooks, SparkPost can parse the emails sent to the inbound domain and post their contents to your server.\n\nIn order to use an inbound domain, you will need to add MX records to your DNS settings.\n\n### MX Records for US Accounts\n\n| Name | Type | Data | Priority |\n|------|------|------|----------|\n| \\<inbound domain\\> | MX | rx1.sparkpostmail.com | 10 |\n| \\<inbound domain\\> | MX | rx2.sparkpostmail.com | 10 |\n| \\<inbound domain\\> | MX | rx3.sparkpostmail.com | 10 |\n\n### MX Records for EU Accounts\n\n| Name | Type | Data | Priority |\n|------|------|------|----------|\n| \\<inbound domain\\> | MX | rx1.eu.sparkpostmail.com | 10 |\n| \\<inbound domain\\> | MX | rx2.eu.sparkpostmail.com | 10 |\n| \\<inbound domain\\> | MX | rx3.eu.sparkpostmail.com | 10 |\n\n## Regional Endpoints\n\nPlease use the appropriate API endpoint based on your workspace region:\n\n- EU workspaces: https://email.eu-west-1.api.bird.com\n\n- US workspaces: https://email.us-west-1.api.bird.com\n"}],"servers":[{"url":"https://email.eu-west-1.api.bird.com/api","description":"Production endpoint for EU workspaces","variables":{"protocol":{"enum":["https"],"default":"https","description":"Protocol for API communication"}}},{"url":"https://email.us-west-1.api.bird.com/api","description":"Production endpoint for US workspaces","variables":{"protocol":{"enum":["https"],"default":"https","description":"Protocol for API communication"}}}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key for authentication. Format: `AccessKey <token>` or `Bearer <token>`.\n"}}},"paths":{"/workspaces/{workspaceId}/reach/inbound-domains":{"get":{"tags":["Inbound Domains"],"summary":"List all Inbound Domains","description":"Returns an array with all your inbound domains.","parameters":[{"name":"workspaceId","in":"path","description":"The ID of the workspace","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Successfully retrieved inbound domains list","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"domain":{"type":"string"}}}}}}}}}}}}}}
```

## Create an Inbound Domain

> Create an inbound domain by providing an inbound domain object as the POST request body.

```json
{"openapi":"3.0.4","info":{"title":"Reach Email API","version":"1.0"},"tags":[{"name":"Inbound Domains","description":"Inbound Domains allow you to receive emails using SparkPost. When combined with Relay Webhooks, SparkPost can parse the emails sent to the inbound domain and post their contents to your server.\n\nIn order to use an inbound domain, you will need to add MX records to your DNS settings.\n\n### MX Records for US Accounts\n\n| Name | Type | Data | Priority |\n|------|------|------|----------|\n| \\<inbound domain\\> | MX | rx1.sparkpostmail.com | 10 |\n| \\<inbound domain\\> | MX | rx2.sparkpostmail.com | 10 |\n| \\<inbound domain\\> | MX | rx3.sparkpostmail.com | 10 |\n\n### MX Records for EU Accounts\n\n| Name | Type | Data | Priority |\n|------|------|------|----------|\n| \\<inbound domain\\> | MX | rx1.eu.sparkpostmail.com | 10 |\n| \\<inbound domain\\> | MX | rx2.eu.sparkpostmail.com | 10 |\n| \\<inbound domain\\> | MX | rx3.eu.sparkpostmail.com | 10 |\n\n## Regional Endpoints\n\nPlease use the appropriate API endpoint based on your workspace region:\n\n- EU workspaces: https://email.eu-west-1.api.bird.com\n\n- US workspaces: https://email.us-west-1.api.bird.com\n"}],"servers":[{"url":"https://email.eu-west-1.api.bird.com/api","description":"Production endpoint for EU workspaces","variables":{"protocol":{"enum":["https"],"default":"https","description":"Protocol for API communication"}}},{"url":"https://email.us-west-1.api.bird.com/api","description":"Production endpoint for US workspaces","variables":{"protocol":{"enum":["https"],"default":"https","description":"Protocol for API communication"}}}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key for authentication. Format: `AccessKey <token>` or `Bearer <token>`.\n"}},"schemas":{"Error":{"required":["errors"],"type":"object","properties":{"errors":{"type":"array","items":{"required":["code","message"],"type":"object","properties":{"message":{"type":"string","description":"Human readable error message"},"code":{"type":"string","description":"Machine readable error code"},"description":{"type":"string","description":"Detailed error description"}}}}}}}},"paths":{"/workspaces/{workspaceId}/reach/inbound-domains":{"post":{"tags":["Inbound Domains"],"summary":"Create an Inbound Domain","description":"Create an inbound domain by providing an inbound domain object as the POST request body.","parameters":[{"name":"workspaceId","in":"path","description":"The ID of the workspace","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["domain"],"properties":{"domain":{"type":"string","description":"Domain name for which SparkPost will receive inbound emails. Your DNS provider's MX record for this domain must point back to SparkPost."}}}}}},"responses":{"200":{"description":"Inbound domain created successfully"},"409":{"description":"An inbound domain with similar attributes already exists","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Retrieve an Inbound Domain

> Retrieve an inbound domain by specifying its domain name in the URI path.

```json
{"openapi":"3.0.4","info":{"title":"Reach Email API","version":"1.0"},"tags":[{"name":"Inbound Domains","description":"Inbound Domains allow you to receive emails using SparkPost. When combined with Relay Webhooks, SparkPost can parse the emails sent to the inbound domain and post their contents to your server.\n\nIn order to use an inbound domain, you will need to add MX records to your DNS settings.\n\n### MX Records for US Accounts\n\n| Name | Type | Data | Priority |\n|------|------|------|----------|\n| \\<inbound domain\\> | MX | rx1.sparkpostmail.com | 10 |\n| \\<inbound domain\\> | MX | rx2.sparkpostmail.com | 10 |\n| \\<inbound domain\\> | MX | rx3.sparkpostmail.com | 10 |\n\n### MX Records for EU Accounts\n\n| Name | Type | Data | Priority |\n|------|------|------|----------|\n| \\<inbound domain\\> | MX | rx1.eu.sparkpostmail.com | 10 |\n| \\<inbound domain\\> | MX | rx2.eu.sparkpostmail.com | 10 |\n| \\<inbound domain\\> | MX | rx3.eu.sparkpostmail.com | 10 |\n\n## Regional Endpoints\n\nPlease use the appropriate API endpoint based on your workspace region:\n\n- EU workspaces: https://email.eu-west-1.api.bird.com\n\n- US workspaces: https://email.us-west-1.api.bird.com\n"}],"servers":[{"url":"https://email.eu-west-1.api.bird.com/api","description":"Production endpoint for EU workspaces","variables":{"protocol":{"enum":["https"],"default":"https","description":"Protocol for API communication"}}},{"url":"https://email.us-west-1.api.bird.com/api","description":"Production endpoint for US workspaces","variables":{"protocol":{"enum":["https"],"default":"https","description":"Protocol for API communication"}}}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key for authentication. Format: `AccessKey <token>` or `Bearer <token>`.\n"}},"schemas":{"Error":{"required":["errors"],"type":"object","properties":{"errors":{"type":"array","items":{"required":["code","message"],"type":"object","properties":{"message":{"type":"string","description":"Human readable error message"},"code":{"type":"string","description":"Machine readable error code"},"description":{"type":"string","description":"Detailed error description"}}}}}}}},"paths":{"/workspaces/{workspaceId}/reach/inbound-domains/{domain}":{"get":{"tags":["Inbound Domains"],"summary":"Retrieve an Inbound Domain","description":"Retrieve an inbound domain by specifying its domain name in the URI path.","parameters":[{"name":"workspaceId","in":"path","description":"The ID of the workspace","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"domain","in":"path","description":"The inbound domain name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successfully retrieved inbound domain","content":{"application/json":{"schema":{"type":"object","properties":{"results":{"type":"object","properties":{"domain":{"type":"string"}}}}}}}},"404":{"description":"Resource could not be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Delete an Inbound Domain

> Delete an inbound domain by specifying its domain name in the URI path.

```json
{"openapi":"3.0.4","info":{"title":"Reach Email API","version":"1.0"},"tags":[{"name":"Inbound Domains","description":"Inbound Domains allow you to receive emails using SparkPost. When combined with Relay Webhooks, SparkPost can parse the emails sent to the inbound domain and post their contents to your server.\n\nIn order to use an inbound domain, you will need to add MX records to your DNS settings.\n\n### MX Records for US Accounts\n\n| Name | Type | Data | Priority |\n|------|------|------|----------|\n| \\<inbound domain\\> | MX | rx1.sparkpostmail.com | 10 |\n| \\<inbound domain\\> | MX | rx2.sparkpostmail.com | 10 |\n| \\<inbound domain\\> | MX | rx3.sparkpostmail.com | 10 |\n\n### MX Records for EU Accounts\n\n| Name | Type | Data | Priority |\n|------|------|------|----------|\n| \\<inbound domain\\> | MX | rx1.eu.sparkpostmail.com | 10 |\n| \\<inbound domain\\> | MX | rx2.eu.sparkpostmail.com | 10 |\n| \\<inbound domain\\> | MX | rx3.eu.sparkpostmail.com | 10 |\n\n## Regional Endpoints\n\nPlease use the appropriate API endpoint based on your workspace region:\n\n- EU workspaces: https://email.eu-west-1.api.bird.com\n\n- US workspaces: https://email.us-west-1.api.bird.com\n"}],"servers":[{"url":"https://email.eu-west-1.api.bird.com/api","description":"Production endpoint for EU workspaces","variables":{"protocol":{"enum":["https"],"default":"https","description":"Protocol for API communication"}}},{"url":"https://email.us-west-1.api.bird.com/api","description":"Production endpoint for US workspaces","variables":{"protocol":{"enum":["https"],"default":"https","description":"Protocol for API communication"}}}],"security":[{"ApiKeyAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"Authorization","description":"API key for authentication. Format: `AccessKey <token>` or `Bearer <token>`.\n"}},"schemas":{"Error":{"required":["errors"],"type":"object","properties":{"errors":{"type":"array","items":{"required":["code","message"],"type":"object","properties":{"message":{"type":"string","description":"Human readable error message"},"code":{"type":"string","description":"Machine readable error code"},"description":{"type":"string","description":"Detailed error description"}}}}}}}},"paths":{"/workspaces/{workspaceId}/reach/inbound-domains/{domain}":{"delete":{"tags":["Inbound Domains"],"summary":"Delete an Inbound Domain","description":"Delete an inbound domain by specifying its domain name in the URI path.","parameters":[{"name":"workspaceId","in":"path","description":"The ID of the workspace","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"domain","in":"path","description":"The inbound domain name","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Inbound domain deleted successfully"},"404":{"description":"Resource could not be found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Domain currently being used in a relay-webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bird.com/api/email-api/inbound-domains.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
