Skip to main content
Resend Docs

Search documentation

Type to search this documentation.

Create a new domain

POST/domainsCreate a new domain

Request body

application/json
objectCreateDomainRequest
capabilitiesobject

Configure the domain capabilities for sending and receiving emails. At least one capability must be enabled.

Show child attributes
receivingstring

Enable or disable receiving emails to this domain.

one of "enabled", "disabled"

sendingstring

Enable or disable sending emails from this domain.

one of "enabled", "disabled"

click_trackingboolean

Track clicks within the body of each HTML email.

custom_return_pathstring

For advanced use cases, choose a subdomain for the Return-Path address. Defaults to 'send' (i.e., send.yourdomain.tld).

namestringrequired

The name of the domain you want to create.

open_trackingboolean

Track the open rate of each email.

regionstring

The region where emails will be sent from. Possible values are us-east-1 | eu-west-1 | sa-east-1 | ap-northeast-1

one of "us-east-1", "eu-west-1", "sa-east-1", "ap-northeast-1" · default "us-east-1"

tlsstring

TLS mode. Opportunistic attempts secure connection but falls back to unencrypted. Enforced requires TLS or email won't be sent.

one of "opportunistic", "enforced" · default "opportunistic"

tracking_subdomainstring

The subdomain to use for click and open tracking.

Example request
{
  "capabilities": {
    "receiving": "disabled",
    "sending": "disabled"
  },
  "click_tracking": true,
  "custom_return_path": "string",
  "name": "string",
  "open_tracking": true,
  "region": "us-east-1",
  "tls": "opportunistic",
  "tracking_subdomain": "string"
}

Responses

201OKapplication/json
objectCreateDomainResponse
capabilitiesobjectDomainCapabilities ↑

Configure the domain capabilities for sending and receiving emails. At least one capability must be enabled.

click_trackingboolean

Whether click tracking is enabled for this domain.

created_atstring · date-time

The date and time the domain was created.

idstring

The ID of the domain.

namestring

The name of the domain.

open_trackingboolean

Whether open tracking is enabled for this domain.

recordsarray of object
Show child attributes
Show array items
namestring

The name of the DNS record.

priorityinteger

The priority of the record (only applicable for MX records).

recordstring

The type of record (SPF for sending, DKIM for sending, Receiving for inbound emails, Tracking for click and open tracking).

one of "SPF", "DKIM", "Receiving", "Tracking"

statusstring

The status of the record.

one of "pending", "verified", "failed", "temporary_failure", "not_started"

ttlstring

The time to live for the record.

typestring

The DNS record type.

one of "MX", "TXT", "CNAME"

valuestring

The value of the record.

regionstring

The region where the domain is hosted.

statusstring

The status of the domain.

tracking_subdomainstring

The subdomain used for click and open tracking.

Example response
{
  "capabilities": {
    "receiving": "disabled",
    "sending": "disabled"
  },
  "click_tracking": true,
  "created_at": "2026-06-09T00:00:00Z",
  "id": "string",
  "name": "string",
  "open_tracking": true,
  "records": [
    {
      "name": "string",
      "priority": 0,
      "record": "DKIM",
      "status": "failed",
      "ttl": "string",
      "type": "CNAME",
      "value": "string"
    }
  ],
  "region": "string",
  "status": "string",
  "tracking_subdomain": "string"
}
Documentation menu