Skip to main content
POST
/
domains
curl --request POST \
  --url https://api.autosend.com/v1/domains \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "domain": "example.com",
    "regionKey": "us-east-1"
  }'
{
  "success": true,
  "data": {
    "id": "60d5ec49f1b2c72d9c8b2222",
    "domainName": "example.com",
    "verificationStatus": "PENDING_CONFIGURATION",
    "ownershipVerified": false,
    "dkimEnabled": false,
    "mailFromEnabled": false,
    "dmarcEnabled": false,
    "dnsRecords": {
      "ownership": {
        "name": "_autosend-verify.example.com",
        "value": "autosend-verify-d3b3f3481f3541b1b1d96e401ad89c91",
        "type": "TXT",
        "purpose": "Domain ownership verification"
      },
      "dkim": {
        "name": "autosend._domainkey.example.com",
        "value": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQ...",
        "type": "TXT",
        "purpose": "DKIM authentication"
      },
      "mailFrom": [
        {
          "name": "asend.example.com",
          "value": "feedback-smtp.us-east-1.amazonses.com",
          "type": "MX",
          "purpose": "Mail-from domain",
          "priority": 10
        },
        {
          "name": "asend.example.com",
          "value": "v=spf1 include:amazonses.com ~all",
          "type": "TXT",
          "purpose": "SPF record for mail-from domain"
        }
      ],
      "dmarc": {
        "name": "_dmarc.example.com",
        "value": "v=DMARC1; p=none;",
        "type": "TXT",
        "purpose": "DMARC policy"
      }
    },
    "createdAt": "2026-03-19T08:00:00.000Z",
    "lastCheckedAt": "2026-03-19T08:00:00.000Z",
    "regionKey": "us-east-1",
    "verificationInProgress": false
  }
}
curl --request POST \
  --url https://api.autosend.com/v1/domains \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "domain": "example.com",
    "regionKey": "us-east-1"
  }'
{
  "success": true,
  "data": {
    "id": "60d5ec49f1b2c72d9c8b2222",
    "domainName": "example.com",
    "verificationStatus": "PENDING_CONFIGURATION",
    "ownershipVerified": false,
    "dkimEnabled": false,
    "mailFromEnabled": false,
    "dmarcEnabled": false,
    "dnsRecords": {
      "ownership": {
        "name": "_autosend-verify.example.com",
        "value": "autosend-verify-d3b3f3481f3541b1b1d96e401ad89c91",
        "type": "TXT",
        "purpose": "Domain ownership verification"
      },
      "dkim": {
        "name": "autosend._domainkey.example.com",
        "value": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQ...",
        "type": "TXT",
        "purpose": "DKIM authentication"
      },
      "mailFrom": [
        {
          "name": "asend.example.com",
          "value": "feedback-smtp.us-east-1.amazonses.com",
          "type": "MX",
          "purpose": "Mail-from domain",
          "priority": 10
        },
        {
          "name": "asend.example.com",
          "value": "v=spf1 include:amazonses.com ~all",
          "type": "TXT",
          "purpose": "SPF record for mail-from domain"
        }
      ],
      "dmarc": {
        "name": "_dmarc.example.com",
        "value": "v=DMARC1; p=none;",
        "type": "TXT",
        "purpose": "DMARC policy"
      }
    },
    "createdAt": "2026-03-19T08:00:00.000Z",
    "lastCheckedAt": "2026-03-19T08:00:00.000Z",
    "regionKey": "us-east-1",
    "verificationInProgress": false
  }
}

Authorizations

Authorization
string | header
required
Bearer authentication header of the form Bearer <token>, where <token> is your API key.

Body

domain
string
required
A valid domain name to add (e.g. example.com or mail.example.com). Must not include a protocol (http://), a path, or a trailing slash. Maximum 253 characters.
regionKey
string
The AutoSend region key where your email service will be configured for this domain (e.g. us-east-1, ap-south-1, us-east-2, eu-central-1). If omitted, the project’s primary region is used.

Response

success
boolean
Indicates whether the request was successful.
data
object
The newly created domain object. The initial verificationStatus is always PENDING_CONFIGURATION. Configure the required DNS records in your DNS provider and then call POST /domains/{domainId}/verify to start verification.

Errors

400
object
Returned when the domain field is missing, empty, exceeds 253 characters, or is not a valid domain name (e.g. includes a protocol or path).
409
object
Returned when the domain has already been added to this project.