API Reference

Domains

Use your own domain for agent email addresses. Add a domain, configure DNS records, and verify ownership to start receiving emails at your custom domain.

Domain Object

FieldTypeDescription
iduuidUnique domain identifier
user_iduuidOwner user ID
domainstringDomain name (e.g. mail.yourcompany.com)
verifiedboolOverall verification status
mx_verifiedboolMX record verification status
spf_verifiedboolSPF record verification status
dkim_keystringDKIM public key for DNS configuration
created_attimestampWhen the domain was added

DNS Configuration

After adding a domain, configure these DNS records:

TypeHostValue
MX@agentemail.email (priority 10)
TXT@v=spf1 include:agentemail.email ~all
TXTagentemail._domainkeyv=DKIM1; k=rsa; p=<your_dkim_key>
POST/api/v1/domainsAPI Key

Add Domain

Register a custom domain. After adding, configure DNS records and call the verify endpoint.

Request Body

domainstring*

Domain name to add

cURL
curl -X POST https://api.agentemail.email/api/v1/domains \
  -H "X-API-Key: ak_your_key" \
  -H "Content-Type: application/json" \
  -d '{"domain":"mail.yourcompany.com"}'

Response

{
  "success": true,
  "data": {
    "id": "domain-uuid...",
    "domain": "mail.yourcompany.com",
    "verified": false,
    "dkim_key": "MIIBIjANBgkqh..."
  }
}
GET/api/v1/domainsAPI Key

List Domains

List all custom domains for the authenticated user.

cURL
curl https://api.agentemail.email/api/v1/domains \
  -H "X-API-Key: ak_your_key"
GET/api/v1/domains/{id}/verifyAPI Key

Verify Domain

Trigger DNS verification for a domain. Checks MX, SPF, and DKIM records. Call this after configuring your DNS.

Path Parameters

iduuid

Domain ID

cURL
curl https://api.agentemail.email/api/v1/domains/{id}/verify \
  -H "X-API-Key: ak_your_key"

Response

{
  "success": true,
  "data": {
    "verified": true,
    "mx_verified": true,
    "spf_verified": true
  }
}
DELETE/api/v1/domains/{id}API Key

Delete Domain

Remove a custom domain. Existing inboxes on this domain will stop receiving emails.

Path Parameters

iduuid

Domain ID

cURL
curl -X DELETE https://api.agentemail.email/api/v1/domains/{id} \
  -H "X-API-Key: ak_your_key"