Docs · Guides

Custom domains

Send and receive from your own domain, such as ops@mail.yourcompany.com, with its own DKIM key.

By default inboxes live on agents.agentboxd.com. Connect a domain you own and your agents can use addresses on it instead. Mail to it arrives at our MX; mail from it is DKIM-signed with the domain’s own key.

#Use a subdomain

Connect something like mail.yourcompany.com, not yourcompany.com. To receive mail, a domain’s MX record has to point to us. On your main domain that would replace the MX your current email provider uses, so every email to @yourcompany.com, your team’s included, would come to Agentboxd, and addresses without an inbox here would bounce. A subdomain has its own MX, so nothing changes for the mail you already get.

#Add the domain

In the dashboard go to Domains and choose Add domain, or call the API. Leave receiving on (the default) if inboxes on the domain should get mail.

POST /v1/domains
curl -s https://api.agentboxd.com/v1/domains \
  -H "Authorization: Bearer $MAILROOM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"domain":"mail.yourcompany.com","receiving":true}'

The response has status: "pending" and the records to publish.

#DNS records

RecordTypeNameValueNeeded
verificationTXT_agentboxd.<domain>agentboxd-verify=<token>Required
mxMX<domain>10 mx.agentboxd.comRequired while receiving is on
spfTXT<domain>v=spf1 include:agents.agentboxd.com -allRequired
dkimTXTcm1._domainkey.<domain>v=DKIM1; k=rsa; p=<key>Required
dmarcTXT_dmarc.<domain>v=DMARC1; p=none; rua=mailto:dmarc@agentboxd.comRecommended

The exact token and key are on the domain’s page in the dashboard, with copy buttons. Each record in the API looks like { key, type, name, value, required, status, found? }, where status is ok, missing or mismatch and found lists what we saw instead.

  • SPF: a name can have only one SPF record. If yours already has one, add include:agents.agentboxd.com to it instead of adding a second.
  • DKIM: the p= value must match exactly. Paste it in one piece; if your provider splits long TXT values into several strings, that’s fine.
  • MX: the check passes when the lowest-priority MX host is mx.agentboxd.com.

#At your DNS provider

Every provider has an “add record” form with a type, a name (or host) and a value. Many of them append your domain to the name automatically: then enter only the host part. For mail.yourcompany.com, the verification record’s host part is _agentboxd.mail and the MX host part is mail. Paste the full name into a field like that and the record ends up at _agentboxd.mail.yourcompany.com.yourcompany.com, which our check reports as missing.

GoDaddy

  • Open your domain’s DNS settings (DNS or Manage DNS).
  • Add record → type TXT → name _agentboxd.mail → value from the dashboard. Leave TTL at its default. Repeat for the SPF, DKIM and DMARC records.
  • Add record → type MX → name mail → value mx.agentboxd.com → priority 10.
  • GoDaddy appends the domain itself: enter host parts only.

Cloudflare

  • Open the zone, then DNS → Records.
  • Add record → type TXT → name _agentboxd.mail → content from the dashboard. Repeat for SPF, DKIM and DMARC.
  • Add record → type MX → name mail → mail server mx.agentboxd.com → priority 10.
  • Cloudflare accepts the host part or the full name. TXT and MX records are never proxied.

Namecheap

  • Domain List → Manage → Advanced DNS.
  • Add new record → TXT Record → host _agentboxd.mail → value from the dashboard. Repeat for SPF, DKIM and DMARC.
  • MX records are in the mail section of the same page: host mail, value mx.agentboxd.com, priority 10. If changing the mail setting there would replace mail you already use, check with whoever runs it first.
  • Namecheap appends the domain itself: enter host parts only.

#Verification

A domain is verified once every required record checks out. Press Check now on its page (or call POST /v1/domains/:id/verify, at most once every 10 seconds per domain). We also check pending domains every 10 minutes for 7 days, and verified ones every 6 hours. DNS changes usually show up within minutes, sometimes a few hours.

StatusMeaning
pendingWaiting for the required records. Inboxes can’t use the domain yet.
verifiedAll required records pass. Create inboxes with POST /v1/inboxes { username, domain }.
failedA verified domain failed its required records 3 checks in a row. Sending from it pauses (403 domain_not_verified); receiving continues while the MX still points to us. Fix the records and check again.
disabledTurned off by us. Write to support@agentboxd.com.

#Inboxes on your domain

Pass domain when creating an inbox. Reserved usernames apply on every domain, except that on your own verified domains you may use postmaster@, abuse@ and dmarc@. Mail to addresses that have no inbox is refused during the SMTP conversation.

agent.ts
const inbox = await mr.inboxes.create({ username: 'ops', domain: 'mail.yourcompany.com' });
console.log(inbox.address); // ops@mail.yourcompany.com

#API

Method & pathNotes
POST /v1/domains{ domain, receiving? } → 201 with the records. Refused: our own domains, public suffixes, malformed names, and domains verified by another workspace (409 domain_taken). Up to 10 per workspace.
GET /v1/domainsList.
GET /v1/domains/:idThe domain with its records.
POST /v1/domains/:id/verifyRun the checks now (1 per 10 s per domain).
PATCH /v1/domains/:id{ receiving }.
DELETE /v1/domains/:id409 domain_in_use while inboxes use it. ?force=true also deletes those inboxes.

The SDKs have domains.create/list/get/verify/update/delete. There is no MCP tool for domains: setting one up is a job for a person with access to DNS.