> ## 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.

# supportCustomEmailIntegrationCreate

> Add an address on the store's own domain, as the email settings page's setup wizard does. It goes on SES when the domain can, else Postmark, which emails the address a confirmation link. Returns it with the DNS records to add; it can't send until `verified`, which is already true when the domain verified before. Adding an address the store already has keeps its provider and records and returns it again. Throws a 409 CONFLICT error when the address is another store's, or the store's through Gmail or Outlook.

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

## Arguments

**input** `[SupportCustomEmailIntegrationCreateInput!](/docs/api-reference/v3/reference/support/support-custom-email-integration-create-input)` *required*

The address.

**fields**

**address** `String!` *required*

An address on a domain the store owns, such as [support@example.com](mailto:support@example.com); at most 254 characters. Case and surrounding spaces are ignored. A free-mail domain such as gmail.com is BAD\_USER\_INPUT.

**senderName** `String`

The From name replies go out with. 1 to 255 characters after surrounding spaces are trimmed; otherwise BAD\_USER\_INPUT. Omitted: the name an address the store already has keeps, else the store's name and " Support", as the setup wizard fills it in.

## Returns

**supportCustomEmailIntegrationCreate** `[SupportCustomEmailIntegration!](/docs/api-reference/v3/reference/support/support-custom-email-integration)` *required*

Email through an address on the store's own domain, sent through SES or Postmark once the domain's DNS records verify.

**fields**

**address** `String`

The inbox's email address. Null while no mailbox is connected.

**connected** `Boolean!` *required*

Whether the account is connected, as the channels settings page shows it. Gmail, Outlook, custom email, Facebook, Instagram, Attentive, Postscript and TikTok are false until their account is linked, such as an email integration with no mailbox. Every other type is connected while it exists.

**dnsRecords** `[\[SupportDnsRecord!\]!](/docs/api-reference/v3/reference/support/support-dns-record)` *required*

The records to add at the domain's DNS provider, in the setup guide's order, ending with the recommended DMARC record. `verified` is the state the provider last reported, with no new check; call `supportCustomEmailIntegrationVerify` to check again. Empty while no mailbox is connected.

**fields**

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

The record's full name, such as `_dmarc.example.com`. Some DNS providers want only the part before the zone.

**purpose** `[SupportDnsRecordPurpose!](/docs/api-reference/v3/reference/support/support-dns-record-purpose)` *required*

What the record is for.

**required** `Boolean!` *required*

Whether the address can't send until the record verifies. The others are recommended for deliverability.

**type** `[SupportDnsRecordType!](/docs/api-reference/v3/reference/support/support-dns-record-type)` *required*

The record's type.

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

The record's value. An MX value is the priority, a space, then the mail server.

**verified** `Boolean`

Whether the provider last saw the record published. Null for DMARC, which isn't checked.

**dnsZone** `String`

The DNS zone the merchant edits, such as `example.co.uk` for `support@help.example.co.uk`. Null while no mailbox is connected.

**forwardingAddress** `String`

The address the store's mailbox forwards its mail to so the help desk receives it, as the email info modal shows it. Null while no mailbox is connected.

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

A globally-unique identifier. Treat it as an opaque handle: pass it back to the API (e.g. to `node(id:)`) to refetch this object, but don't parse it or build one yourself — its format is not part of the contract and may change.

**inbound** `[SupportIntegrationInbound!](/docs/api-reference/v3/reference/support/support-integration-inbound)` *required*

How its incoming messages are syncing.

**fields**

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

When syncing may start again after the provider held it back. Null when it isn't held back.

**failedCount** `Int!` *required*

Incoming messages that failed and won't be retried.

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

When the last incoming message or event arrived. Null when none has.

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

When the help desk last checked for new messages. Null for a channel that pushes them instead.

**latestFailure** `[SupportIntegrationInboundFailure](/docs/api-reference/v3/reference/support/support-integration-inbound-failure)`

The latest failure. Null when none is recorded.

**fields**

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

When it failed.

**errorType** `String!` *required*

What kind of failure it was, as the sync recorded it.

**message** `String!` *required*

The failure's message, cut to 300 characters and an ellipsis.

**pendingFailureCount** `Int!` *required*

Incoming messages that failed and are still being retried.

**name** `String`

The inbox's email address for Gmail, Outlook and custom email, the page name for Facebook and Instagram. Null for other types, and while the account isn't connected.

**permissionsRevoked** `Boolean!` *required*

Whether the provider revoked Redo's access, so the integration needs reconnecting.

**provider** `[SupportCustomEmailProvider](/docs/api-reference/v3/reference/support/support-custom-email-provider)`

Who sends the address's mail. A new address goes on SES unless its domain can't, then Postmark. Null while no mailbox is connected.

**senderName** `String`

The From name replies go out with, as the email settings page's edit modal shows it. Null when the inbox has none, and while no mailbox is connected.

**syncError** `String`

The integration's current error, cut to 300 characters and an ellipsis. Null when it has none.

**type** `[SupportIntegrationType!](/docs/api-reference/v3/reference/support/support-integration-type)` *required*

What the integration connects to.

**verified** `Boolean!` *required*

Whether the domain's required records verified, so the address can send. False while the help desk asks the merchant to finish verifying it.

## Errors

Besides the [errors any request can return](https://developers.redo.com/docs/api-reference/v3/errors.md), this operation fails with these codes in `extensions.code`.

| Code | HTTP status | Meaning | Retry |
| - | - | - | - |
| `API_TOKEN_REQUIRED` | `403` | The credential has no API token to attribute the change to, such as a first-party token. Nothing was sent. | Call with a store API token. |
| `BAD_USER_INPUT` | `400` | An argument is invalid, or names something the store doesn't have. The message says which. Nothing was written. | Fix the input the message names, then send it again. |
| `CONFLICT` | `409` | The change clashes with another record, such as a name already in use, and nothing was written. Or a request with the same idempotencyKey is still in progress or its outcome isn't known yet, and its write, such as an email to the customer, may already exist. | Change the clashing value, then send it again. When the message says a request with the same idempotencyKey is still in progress, wait a few seconds and send it again with the same key, which returns that request's result once it settles. Don't resend it with a new key or without one: it may write twice. |
| `TRY_AGAIN` | `503` | The change couldn't start for a passing reason, and nothing was written or sent. | Send the same request again after a short wait, with the same idempotencyKey if it has one. |
| `INTERNAL_SERVER_ERROR` | `500` | Something failed on Redo's side. The change may or may not have been made. | Read the record to see whether the change was made before sending it again. A send with an idempotencyKey is safe to retry with the same key. |

## Example

```graphql theme={null}
mutation {
  supportCustomEmailIntegrationCreate(input: { ... }) {
    address
    connected
    dnsZone
    forwardingAddress
    id
    name
    permissionsRevoked
    provider
    # ...
  }
}
```


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