Domains API

Register custom domains, configure DNS, and verify ownership.

GET /v1/domains

GET/v1/domains

List all registered domains. Requires full-access key.

response — 200 OK
{
  "domains": [
    {
      "id": "f6a7b8c9-abcd-4ef0-1234-666666666666",
      "domain": "example.com",
      "status": "VERIFIED",
      "mxVerified": true,
      "spfVerified": true,
      "dkimVerified": true,
      "dmarcVerified": true,
      "createdAt": "2026-03-11T00:00:00.000Z"
    }
  ]
}

POST /v1/domains

POST/v1/domains

Register a new custom domain. Requires full-access key and paid plan. Returns the DNS records to add at your DNS provider.

Request body

NameTypeDescription
domain*stringDomain name (e.g. example.com)
response — 201 Created
{
  "domain": {
    "id": "f6a7b8c9-abcd-4ef0-1234-666666666666",
    "domain": "example.com",
    "status": "PENDING_VERIFICATION"
  },
  "dnsRecords": {
    "mx": { "type": "MX", "host": "example.com", "value": "mail.robotomail.com", "priority": 10 },
    "sendMx": { "type": "MX", "host": "send.example.com", "value": "feedback-smtp.us-east-1.amazonses.com", "priority": 10 },
    "spf": { "type": "TXT", "host": "send.example.com", "value": "v=spf1 include:amazonses.com ~all" },
    "dkim": [
      { "type": "TXT", "host": "resend._domainkey.example.com", "value": "p=MIGfMA0GCSq..." }
    ],
    "dmarc": { "type": "TXT", "host": "_dmarc.example.com", "value": "v=DMARC1; p=quarantine; rua=mailto:dmarc@robotomail.com" },
    "sending": [
      { "record": "SPF", "type": "MX", "host": "send.example.com", "value": "feedback-smtp.us-east-1.amazonses.com", "priority": 10, "status": "not_started" },
      { "record": "SPF", "type": "TXT", "host": "send.example.com", "value": "v=spf1 include:amazonses.com ~all", "status": "not_started" },
      { "record": "SPF", "type": "CNAME", "host": "rsend.example.com", "value": "send.forge.rmta.net", "status": "not_started" },
      { "record": "DKIM", "type": "TXT", "host": "resend._domainkey.example.com", "value": "p=MIGfMA0GCSq...", "status": "not_started" }
    ]
  }
}

Which records to add

Add mx, every record in sending, and dmarc, exactly as returned. mx routes inbound mail to Robotomail. sending is the full list of SPF and DKIM records from our sending provider, Resend. dmarc is recommended but not required.

Do not hard-code this list. The sending records can differ from one domain to the next and can change over time: the type can be MX, TXT or CNAME, and the number of records varies. The example above is one possible set. Always read the records from the response.

Fields of a sending record

NameTypeDescription
recordstringWhat the record is for: SPF or DKIM
typestringDNS record type: MX, TXT or CNAME
hoststringFully qualified host name of the record
valuestringRecord value
prioritynumberPriority. Present on MX records only
statusstring | nullResend's status for this record: not_started, pending, verified, failed or temporary_failure. null when the status is not known

sendMx, spf and dkim are kept for older clients. They repeat part of sending and can miss records. New code should read sending.

Errors

  • 400 — Invalid domain format
  • 403 — Email not verified, or custom domains not included in your current plan
  • 409 — Domain already registered

GET /v1/domains/:id

GET/v1/domains/:id

Get domain details including current verification status and DNS records. Requires full-access key.

The response has the same dnsRecords object as POST /v1/domains. The sending list is read from Resend when you call this endpoint, so it shows the current records and the current status of each one. One record with a status other than verified does not change the status of a domain that is already VERIFIED. That domain follows Resend's status for the whole domain (see verify).

If Resend cannot be reached, sending holds the last list Resend returned for the domain, and every status is null. Read the domain again later for the current status.

POST /v1/domains/:id/verify

POST/v1/domains/:id/verify

Trigger a DNS verification check. A background job also runs every 5 minutes, but you can call this to verify immediately after configuring DNS.

On a domain that is already VERIFIED, this also reads Resend's status for the domain. The domain stays VERIFIED while Resend reports it as verified or partially verified. It moves to FAILED when Resend reports it as failed or partially failed, or no longer has it. While Resend re-checks the domain, or when Resend cannot be reached, the status does not change. The background job makes the same check about once an hour.

If the sending check is not running (it never started, or it failed), this also starts it again. A FAILED domain moves back to VERIFIED when the sending check passes and the inbound MX record is in place. The sending check can take a few minutes: call this again later, or let the background job read the result (about once an hour).

response — 200 OK
{
  "domain": { "id": "f6a7b8c9-abcd-4ef0-1234-666666666666", "status": "VERIFIED" },
  "verification": {
    "mx": true,
    "spf": true,
    "dkim": true,
    "dmarc": true,
    "allVerified": true
  }
}

See Custom domain guide for a step-by-step walkthrough.

DELETE /v1/domains/:id

DELETE/v1/domains/:id

Remove a domain. Mailboxes on this domain will stop receiving email. Requires full-access key.

response — 200 OK
{ "deleted": true }