Custom domains

Addresses on a domain you own: adding the domain, publishing its DNS records automatically or by hand, verification, the days an unverified domain is kept, inboxes on the domain, and removal.

On this page
  1. A domain of your own
  2. Adding the domain
  3. The records to publish
  4. Publishing them automatically
  5. Publishing them by hand
  6. Verification
  7. 7 days to verify
  8. Inboxes on your domain
  9. Downgrades and removal
  10. When a domain call is refused

A domain of your own

Every account can issue addresses on the shared domain, doorman.example. A custom domain puts addresses on a name you own instead, such as concierge@agents.example.com: you add the domain, publish a few DNS records for it, and once they are verified you create inboxes on it exactly as on the shared domain. The shared domain keeps working beside it.

The plan
The Unlimited plan includes 10 custom domains and the Free plan none; past the plan's allowance the API answers 402 plan_limit_reached with scope: "domains". Every plan has a ceiling of 50 domains per account (409 limit_reached). See Plans, limits and errors.
The deployment
Custom domains need a mail transport on the deployment. GET /v1/me says whether it has one in features.customDomains. Where it is false, adding a domain answers 503 custom_domains_unavailable and the console says so instead of showing the form.
The DNS
Somebody has to publish records in the domain's DNS: you, or a colleague you send them to. This page is public so that they can read it without an account.
Who may manage domains
An account key or a console session. An inbox-scoped key gets 403 forbidden, and an app authorized through OAuth gets 403 insufficient_scope: no permission delegates domains. In an organization, every member can read the domains, and adding, checking, setting up or removing one from the console takes the member's domains:manage.

Adding the domain

In the console, open Domains, type the domain and choose Continue: the page then walks through the setup one step at a time (connect it, wait for the check, choose the first address). Typing a registered domain such as example.com offers a name under it first. Ask Doorman can do the same from a sentence: tell it the domain, confirm the one change it proposes, and it opens the setup for you. Through the API, POST /v1/domains takes the name:

curl

curl -s -X POST "https://api.doorman.fyi/v1/domains" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "name": "agents.example.com"
  }'

The answer is 201 with the Domain: its id, the status (pending), the records to publish, and expiresAt, the instant the domain is removed if it has not verified by then.

201 Created

{
  "id": "dom_01jc5f1a2b3c4d5e6f7g8h9j0k",
  "name": "agents.example.com",
  "status": "pending",
  "transport": "resend",
  "records": [
    {
      "record": "MX",
      "host": "agents.example.com",
      "type": "MX",
      "value": "inbound-smtp.mail.example",
      "priority": 10,
      "ttl": 300,
      "required": true,
      "status": "pending"
    },
    {
      "record": "SPF",
      "host": "send.agents.example.com",
      "type": "MX",
      "value": "feedback-smtp.mail.example",
      "priority": 10,
      "ttl": 300,
      "required": true,
      "status": "pending"
    },
    {
      "record": "SPF",
      "host": "send.agents.example.com",
      "type": "TXT",
      "value": "v=spf1 include:mail.example ~all",
      "priority": null,
      "ttl": 300,
      "required": true,
      "status": "pending"
    },
    {
      "record": "SPF",
      "host": "rsend.agents.example.com",
      "type": "CNAME",
      "value": "return-path.mail.example",
      "priority": null,
      "ttl": 300,
      "required": true,
      "status": "pending"
    },
    {
      "record": "DKIM",
      "host": "resend._domainkey.agents.example.com",
      "type": "TXT",
      "value": "p=MIGfMA0GCSqGSIb3DQEB...",
      "priority": null,
      "ttl": 300,
      "required": true,
      "status": "pending"
    },
    {
      "record": "DMARC",
      "host": "_dmarc.agents.example.com",
      "type": "TXT",
      "value": "v=DMARC1; p=none;",
      "priority": null,
      "ttl": 300,
      "required": false,
      "status": "not_started"
    }
  ],
  "connect": {
    "available": false,
    "setupType": null,
    "propagationStatus": null,
    "provider": null
  },
  "inboxes": 0,
  "verifiedAt": null,
  "expiresAt": "2026-11-12T10:05:00.000Z",
  "lastCheckedAt": null,
  "createdAt": "2026-11-05T10:05:00.000Z",
  "updatedAt": "2026-11-05T10:05:00.000Z"
}

Which names are accepted

The name is trimmed and lowercased, and a trailing dot is dropped. It is at most 253 characters of lowercase letters, digits and hyphens in labels separated by dots, with at least two labels; an internationalized name goes in its punycode form. These are refused with 400 validation_error, because nobody who asks could publish their records:

  • an IP address;
  • a name that does not resolve on the public internet: anything ending in .arpa, .internal, .invalid, .local, .localhost, .onion;
  • a bare registry suffix such as co.uk or com.au (a domain registered under one, such as acme.co.uk, is fine);
  • a shared hosting platform's domain and every name under it, such as github.io or vercel.app: its customers get a host name there, never its DNS;
  • the shared domain doorman.example, the hosts this service itself answers on, and every name under them.

A domain belongs to one account at a time. A name another account holds answers 409 already_exists, and so does a name that is registered at the mail transport under another of its accounts: remove it there first, or add a subdomain of it. An account may add 20 domains every 24 hours, removed ones included (429 rate_limit_exceeded with Retry-After); a refused name or a plan limit does not count.

The records to publish

A domain's records are everything its DNS needs. Each one has the host to publish on as a full name, the DNS type (MX, TXT or CNAME), the value, a priority on the MX records, a ttl in seconds, whether it is required, and its own status. record says what it is: MX for receiving, SPF for every record of the return path, DKIM or DMARC. The console names them as below.

RecordPublished onWhat it is for
Receiving, an MX record, requiredthe domain itselfMail for the domain is delivered to the inbox platform.
Return path, an MX or a CNAME record, requiredsend.<domain>, and for a CNAME also a sibling name such as rsend.<domain>Where bounces of the mail you send are reported. A CNAME hands the whole name to the mail transport, which then answers for it.
SPF, a TXT record, requiredsend.<domain>Says which servers may send for the return path.
DKIM, a TXT record, requireda selector under _domainkey.<domain>The public key your outbound mail is signed with.
DMARC, a TXT record, recommended_dmarc.<domain>The policy receivers apply. The suggested value only observes (p=none), so a wrong record never blocks the domain's other mail.

How many return-path records a domain has is the mail transport's to say, and it differs between domains: an MX and a TXT, CNAME records in their place, or both kinds at once. Publish every record the domain lists. Each required one counts, and the domain verifies when all of them are found.

The values are particular to your domain. Copy them from the answer, or from the domain's page in the console, where every row has a copy control and Copy all records gives the whole set as text for whoever manages your DNS.

Look at what the name already has before adding them. An existing MX on the same name competes with the receiving record, so mail would go to either server: remove it unless you mean to keep the old one. A host takes one SPF record; send.<domain> normally has none. A name that holds a CNAME can hold nothing else, so the name a CNAME goes on has to be free of other records. If _dmarc.<domain> already holds a policy, keep yours: the domain verifies without the suggested one.

Publishing them automatically

Where the deployment offers it (features.domainConnect in GET /v1/me), the second step of the domain's setup in the console is Connect automatically. It opens a window from a third-party DNS setup service, in which you sign in to your DNS provider and approve the records. They are added for you where the provider supports it; where it does not, the same window shows where to enter them.

  • You sign in to your DNS provider inside that window, not in the console. The console never sees or stores that sign-in.
  • The window is given this domain's records and a token that is valid for one hour. The service's secret never leaves the API.
  • When the window closes, the console asks for a verification check. What the setup service reports is advisory: only the mail transport's own check of the records makes the domain verified.
  • It is a console feature. Through the API, publish the records yourself and ask for a check.

Publishing them by hand

  1. Open the DNS settings of the domain at the provider that manages it. That is where its name servers point, which is not always where the domain was bought.
  2. Add each record with its type, host and value, and the priority on the MX records. Enter every value whole; the DKIM key is one long string. Where the provider offers to proxy a CNAME record, leave that off.
  3. Leave the TTL at the provider's default, or use 300 seconds while you are setting up.
  4. Save, then ask for a check: I added the records, check now on the domain's page, or the call below.

curl

curl -s -X POST "https://api.doorman.fyi/v1/domains/dom_01jc5f1a2b3c4d5e6f7g8h9j0k/verify" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

Verification

Verification is asynchronous. POST /v1/domains/{domainId}/verify asks the mail transport to look at the records and answers 202 with the domain as it stands; the outcome arrives later. One request per domain every 30 seconds; a sooner one answers 429 rate_limit_exceeded with Retry-After.

You do not have to ask. The transport reports changes as it sees them, pending domains are read again every 15 minutes as a safety net, and the domain's page in the console refreshes while it waits. DNS changes can take up to an hour to show.

pending
The required records have not all been found yet. Every domain starts here.
verified
Every required record checks out. The domain receives and sends, and inboxes can be created on it.
failed
A required record could not be found, or does not match. Compare each record's status and value with what your DNS provider shows, correct it, and check again.

Each record carries its own status: not_started, pending, verified or failed. The domain verifies when the receiving record, every return-path record and the DKIM key are found; the DMARC record is recommended, never required. No event announces it yet: read the domain with GET /v1/domains/{domainId} until its status changes.

curl

curl -s "https://api.doorman.fyi/v1/domains/dom_01jc5f1a2b3c4d5e6f7g8h9j0k" \
  -H "authorization: Bearer $DOORMAN_API_KEY"

7 days to verify

A domain that has never verified is removed 7 days after it was added; its expiresAt says when. It is removed here and at the mail transport, and its name is free again for whoever can publish its records, you included. A domain can hold inboxes only once it has verified, so an expiry takes no inbox with it.

A domain that has verified once is never removed this way, whatever its records do later, and its expiresAt is null. If its records stop checking out, its status goes back to pending or failed and its inboxes stay: sending from them answers 503 sending_unavailable and creating new ones answers 409 domain_not_verified until the records verify again.

Inboxes on your domain

Once the domain is verified, POST /v1/inboxes takes its id as domainId and issues the address on it. Everything else about the inbox is the same: it receives as soon as it exists, and its threads, keys, webhook and events work as on the shared domain. In the console, the domain's page offers the first inbox, and the New inbox sheet lists every verified domain.

curl

curl -s -X POST "https://api.doorman.fyi/v1/inboxes" \
  -H "authorization: Bearer $DOORMAN_API_KEY" \
  -H "content-type: application/json" \
  -d '{
    "mailboxName": "concierge",
    "displayName": "Acme concierge",
    "domainId": "dom_01jc5f1a2b3c4d5e6f7g8h9j0k"
  }'
Names
On your own domain only the mail-infrastructure names are reserved, such as postmaster, abuse and no-reply: the list reserved everywhere. Role names such as support and billing are yours to use, and a display name may be a bare role.
Allowance
An inbox on a custom domain counts toward the plan's inbox allowance and the account ceiling like any other.
Unknown names
Mail to a name on your domain that is not an inbox cannot be refused at the mail server, because the transport has already accepted it: it is dropped without a bounce. The shared domain refuses unknown names at once.
Sending
Messages leave from the address on your domain, signed with the domain's DKIM key. The per-inbox limits apply; the account's daily cap on the shared domain does not. See Sending and replying.
Apps
An app authorized through OAuth cannot create an inbox on a custom domain. It reads and operates the inboxes that live there through its mail permissions.

Downgrades and removal

After a downgrade to a plan without custom domains, the domains and their inboxes stay and keep receiving. Sending from them, adding domains and creating inboxes on them answer 402 plan_limit_reached with scope: "domains" until the plan covers them again.

DELETE /v1/domains/{domainId} answers 204 and removes the domain with every inbox on it, exactly as deleting each inbox would: the addresses stop receiving and stay held for your account, their keys are revoked, their webhooks removed and their streams closed. The domain is removed at the mail transport afterwards. The records at your DNS provider are not touched; remove them yourself.

When a domain call is refused

StatusErrorMeaning
400validation_errorA field is missing or invalid; the message names it.
402plan_limit_reachedThe plan's allowance is used up; scope says whether it is the inbox count, the monthly sends or the custom domains. Upgrade rather than wait.
409limit_reachedThe abuse ceiling for inboxes, custom domains, keys, endpoints, services, relying parties, the services an address signs in to, the sends an inbox has waiting for its owner or the invitations an organization has open; delete, revoke or decide one first.
409already_existsThe mailbox name or the externalId is already in use (field says which), or another account holds the custom domain, here or at the mail transport.
409domain_not_verifiedThe custom domain has not verified its required DNS records.
429rate_limit_exceededA per-inbox or per-account rate limit; Retry-After and resetsAt say when to try again.
502provider_unavailableThe mail transport, the DNS setup provider or the payment provider did not answer, or refused this deployment's credentials.
503custom_domains_unavailableThe custom-domain mail transport and inbound webhook are not fully configured.
503connect_unavailableAutomatic DNS setup is not configured; publish the records manually.

A 502 provider_unavailable is never about the request: the transport or the setup service did not answer, or refused the deployment's own credentials, which only the operator can fix. The reference lists every code each route answers, starting with POST /v1/domains.

Up Down to move, Enter to open, Esc to close