> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# emailDomainCreate

> Add a domain the store sends email from, and start verifying it with the email provider. Publish its `dnsRecords` at the store's DNS provider, then call `emailDomainVerify`. Errors with `INVALID_DOMAIN` if it isn't a valid domain, `DOMAIN_UNAVAILABLE` if another store uses it, and `DOMAIN_ALREADY_REGISTERED` if the email provider already has it.

**Required scopes:** [`campaigns_write`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-campaigns_write)

## Arguments

**input** `[EmailDomainCreateInput!](/docs/api-reference/v3/reference/marketing/email-domain-create-input)` *required*

The domain to add.

**fields**

**domain** `String!` *required*

The domain, such as `example.com` or `mail.example.com`. Letters are lowercased.

## Returns

**emailDomainCreate** `[EmailDomain!](/docs/api-reference/v3/reference/marketing/email-domain)` *required*

A domain the store sends email from, as set up under email domains. It can send once its DKIM record is verified.

**fields**

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the domain was added.

**dkimStatus** `[EmailDomainDkimStatus!](/docs/api-reference/v3/reference/marketing/email-domain-dkim-status)` *required*

Whether the email provider has verified the DKIM key. Sender addresses on the domain can send once it is `VERIFIED`.

**dnsLastCheckedAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When Redo last looked up the DNS records and verification. Null until it has. `emailDomainVerify` checks again.

**dnsRecords** `[\[EmailDomainDnsRecord!\]!](/docs/api-reference/v3/reference/marketing/email-domain-dns-record)` *required*

The DNS records to publish at the store's DNS provider, each with what Redo last found. DNS changes can take up to 72 hours to propagate.

**fields**

**kind** `[EmailDomainDnsRecordKind!](/docs/api-reference/v3/reference/marketing/email-domain-dns-record-kind)` *required*

What the record does.

**name** `String!` *required*

The full hostname to publish the record at, such as `redo._domainkey.example.com`. Some DNS providers want only the part before the domain.

**priority** `Int`

The MX priority. Null for other record types.

**status** `[EmailDomainDnsRecordStatus](/docs/api-reference/v3/reference/marketing/email-domain-dns-record-status)`

What Redo found when it last looked the record up. Null until it has looked.

**type** `[EmailDomainDnsRecordType!](/docs/api-reference/v3/reference/marketing/email-domain-dns-record-type)` *required*

The record type.

**value** `String!` *required*

The value to publish.

**domain** `String!` *required*

The domain, such as `example.com`.

**id** `ID!` *required*

The id of this email domain.

**mailFromDomain** `String`

The MAIL FROM domain bounces return through, such as `send.example.com`. Null until set with `emailDomainMailFromSet`.

**mailFromStatus** `[EmailDomainMailFromStatus!](/docs/api-reference/v3/reference/marketing/email-domain-mail-from-status)` *required*

Whether the email provider has verified the MAIL FROM domain.

**updatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the domain's settings or verification last changed.

## Example

```graphql theme={null}
mutation {
  emailDomainCreate(input: { ... }) {
    createdAt
    dkimStatus
    dnsLastCheckedAt
    domain
    id
    mailFromDomain
    mailFromStatus
    updatedAt
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.