Domains and DNS

Before you can send live email from an address, you verify the domain it belongs to by adding a few DNS records. This page covers the records, verification, and which From addresses a domain covers.

Why verify a domain

Mailbox providers check that an email really comes from the domain in its From address. The records Sendfern gives you prove that: DKIM signs every message with a key published under your domain, and SPF and MAIL FROM let receivers check the server that handed the message over. Mail that passes these checks is far less likely to land in spam.

Live sending needs a verified domain that covers the From address. Without one, POST /v1/emails answers 403 with the code domain_not_verified. Test keys need no domain at all, so you can build your integration first. See Test mode.

  • Send from a subdomain, such as mail.acme.com, rather than acme.com itself. Mailbox providers build a reputation for each domain, so a bounce spike or spam complaints from your app then don't hurt the mail your team sends from acme.com. You can use separate subdomains for separate kinds of mail, for example mail.acme.com for account emails and news.acme.com for newsletters.
  • Start DMARC at p=none. That policy asks receivers to report failures without rejecting anything. Once you are sure all your mail passes, you can tighten it to p=quarantine or p=reject.

Add a domain

POST/v1/domains

Add a domain in the dashboard under Domains, or with the API. Use a live key with full access: a test key can read domains but not add or change them, and a send-only key can only send.

Body

namestringrequired
The domain or subdomain you send from, for example mail.acme.com. It is stored in lower case, and a trailing dot is removed.
curl https://api.sendfern.com/v1/domains \
  -H "Authorization: Bearer $SENDFERN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "mail.acme.com"}'

The response is the domain object. Its records list is what you add at your DNS provider.

Response · 201 Created
{
  "id": "dom_4kXq9TzPaL2mWc7RbN1sVe",
  "name": "mail.acme.com",
  "status": "pending",
  "region": "us-east-1",
  "records": [
    {
      "record": "DKIM",
      "type": "CNAME",
      "name": "q3x7lmd2yv5ok4cbtz6hgw9rfnaj1eus._domainkey.mail.acme.com",
      "value": "q3x7lmd2yv5ok4cbtz6hgw9rfnaj1eus.dkim.amazonses.com"
    },
    {
      "record": "DKIM",
      "type": "CNAME",
      "name": "h8pzr2kwq6tdn3vmxf5cyg7bsaeo4lji._domainkey.mail.acme.com",
      "value": "h8pzr2kwq6tdn3vmxf5cyg7bsaeo4lji.dkim.amazonses.com"
    },
    {
      "record": "DKIM",
      "type": "CNAME",
      "name": "v2nc8ejt5qyw4kamr7dhzx3bpfuls6go._domainkey.mail.acme.com",
      "value": "v2nc8ejt5qyw4kamr7dhzx3bpfuls6go.dkim.amazonses.com"
    },
    {
      "record": "MAIL FROM",
      "type": "MX",
      "name": "send.mail.acme.com",
      "value": "feedback-smtp.us-east-1.amazonses.com",
      "priority": 10
    },
    {
      "record": "SPF",
      "type": "TXT",
      "name": "send.mail.acme.com",
      "value": "v=spf1 include:amazonses.com ~all"
    },
    {
      "record": "DMARC (recommended)",
      "type": "TXT",
      "name": "_dmarc.mail.acme.com",
      "value": "v=DMARC1; p=none;"
    }
  ],
  "track_opens": true,
  "track_clicks": true,
  "tracking_domain": "",
  "verified_at": null,
  "created_at": "2026-11-28T10:19:04Z"
}

The domain object

idstring
Starts with dom_.
namestring
The domain name.
statusstring
pending, verified or failed. See Verification.
regionstring
The sending region, for example us-east-1.
recordsarray
The DNS records to add. Each has record, type, name and value; the MX record also has priority.
track_opens, track_clicks, tracking_domainboolean, boolean, string
Open and click tracking settings. See Open and click tracking.
verified_atstring | null
When the domain was first verified.
created_atstring
When the domain was added.

Errors when adding

  • A name that isn't a valid domain is a 400 invalid_parameter on name.
  • A domain you already added is a 400 telling you to use verify instead.
  • A domain another Sendfern account holds is a 400 with "This domain is already registered." See A domain another account holds.

The DNS records

RecordTypeNameWhat it does
DKIMCNAME<token>._domainkey.<domain>Three records. They point at the public keys that sign your mail.
MAIL FROMMXsend.<domain>The bounce address domain. Bounces and complaints come back to it so Sendfern can process them.
SPFTXTsend.<domain>Allows Amazon SES, which Sendfern sends through, to send for the MAIL FROM domain.
DMARC (recommended)TXT_dmarc.<domain>Tells receivers what to do with mail that fails the checks. Not needed for verification.

Copy the exact names and values from the response or the domain page in the dashboard. The DKIM tokens are different for every domain.

If your domain already has a DMARC record, keep it rather than adding a second one: a domain can have only one. The same goes for SPF on send.<domain>, which is normally unused before you add it.

Add the records at your DNS provider

  1. Open your DNS settings

    Sign in where your domain's DNS is hosted (your registrar, Cloudflare, Route 53 and so on) and open the records for the domain.

  2. Create each record

    Create every record in records with its type, name and value, and priority 10 for the MX record. Some providers add the domain to the name for you: if yours does, enter only the part before it, for example send.mail instead of send.mail.acme.com.

  3. Turn off proxying

    The records must resolve to exactly the values given. On Cloudflare, set each one to DNS only (grey cloud), not Proxied.

  4. Pick a TTL

    Any TTL works. The provider's default (often one hour, or Auto) is fine. A shorter TTL only helps if you need to fix a typo quickly.

Verification

StatusMeaning
pendingWaiting for the DNS records. Sendfern checks automatically.
verifiedThe records were found. The domain can send live email.
failedThe records were not found within 72 hours. Checks have stopped.

Sendfern checks every pending domain every 5 minutes and marks it verified as soon as the records are found. DNS changes usually show up within minutes, but can take longer. A domain whose records are not found within 72 hours of being added becomes failed and is no longer checked. Only verified domains can send.

There is no webhook for domain status changes. Poll the domain, or check its page in the dashboard.

Check now

POST/v1/domains/{id}/verify

Checks the records right away and returns the domain with its updated status. On a failed domain whose records still aren't found, the status goes back to pending and a new 72-hour window starts, so fixing your DNS and calling verify is how you restart a failed domain.

curl -X POST https://api.sendfern.com/v1/domains/dom_4kXq9TzPaL2mWc7RbN1sVe/verify \
  -H "Authorization: Bearer $SENDFERN_API_KEY"

If the check can't run, the answer is a 400 with the code provider_error. Try again in a few minutes.

List and get domains

GET /v1/domains lists your domains, newest first (see Pagination), and GET /v1/domains/{id} returns one.

curl https://api.sendfern.com/v1/domains \
  -H "Authorization: Bearer $SENDFERN_API_KEY"

curl https://api.sendfern.com/v1/domains/dom_4kXq9TzPaL2mWc7RbN1sVe \
  -H "Authorization: Bearer $SENDFERN_API_KEY"

Which From addresses a domain covers

A verified domain covers addresses on the domain itself and on any of its subdomains. Parent domains are not covered.

Verified domainFrom addressCan send live
acme.comhello@acme.comYes
acme.comhello@mail.acme.comYes
mail.acme.comhello@mail.acme.comYes
mail.acme.comhello@acme.comNo

If you verify both a domain and one of its subdomains, an address is covered by the most specific one. With acme.com and mail.acme.com both verified, hello@mail.acme.com and hello@news.mail.acme.com use mail.acme.com and its settings (such as tracking), while hello@acme.com and hello@news.acme.com use acme.com. A subdomain that is not verified yet doesn't count, so its addresses keep using the parent domain until it is.

A domain another account holds

A domain name belongs to one Sendfern account at a time. Adding a name another account holds fails with:

Response · 400 Bad Request
{
  "error": {
    "type": "invalid_request_error",
    "code": "invalid_parameter",
    "message": "This domain is already registered.",
    "param": "name"
  }
}

The other account keeps the name while its domain is:

  • pending or verified, or
  • failed after having been verified at least once.

A claim that never verified and has become failed is released when you add the name: the old claim is removed and you get fresh DKIM records. If you own a domain that is held by an account you can't reach, contact Sendfern support.

Delete a domain

DELETE/v1/domains/{id}

Returns 204 with no body. You can also delete a domain from its page in the dashboard.

curl -X DELETE https://api.sendfern.com/v1/domains/dom_4kXq9TzPaL2mWc7RbN1sVe \
  -H "Authorization: Bearer $SENDFERN_API_KEY"

You can remove the DNS records once the domain is deleted.

Next steps

Turn tracking on or off in Open and click tracking, read Going live for the rest of the live checklist, and see every field in the API reference.