Appearance
SOP: Set Up a Custom Domain โ
Fresh ๐ฑSending from your own domain gives you control over sending reputation, the single most important deliverability factor. Setup is three steps: add the domain, set DNS records, verify.
1. Add the domain โ
AgentMail registers the domain and immediately returns the DNS records you need.
python
from agentmail import AgentMail
client = AgentMail()
domain = client.domains.create("your-domain.com")
print("DNS Records:", domain.records)bash
curl -X POST https://api.agentmail.to/v0/domains \
-H "Authorization: Bearer $AGENTMAIL_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "domain": "your-domain.com" }'You can also add a domain from the Console: Domains โ Add Domain โ enter the name โ Create.
2. Add the DNS records โ
Copy the returned records (SPF, DKIM, DMARC, and MX) into your DNS provider. Registrar-specific walkthroughs:
MX record conflicts
A domain already receiving mail (e.g. Google Workspace) has existing MX records. Adding AgentMail's MX can conflict. See MX record conflicts.
3. Verify โ
DNS propagation can take minutes to hours. Trigger verification once records are live:
bash
curl -X POST https://api.agentmail.to/v0/domains/your-domain.com/verify \
-H "Authorization: Bearer $AGENTMAIL_API_KEY"If it stays unverified, see Domain not verifying.
4. Warm the domain โ
New domains have no reputation. Ramp volume gradually. See Domain warming. For high-volume sending, register multiple domains and spread volume across them.
Related
Custom Domains concept ยท Domains API ยท SPF/DKIM/DMARC ยท Email deliverability