Custom inbox domain

Use your own domain for disposable inboxes (e.g. qa@inbox.yourcompany.com) instead of the shared INBOX_DOMAIN hostname.

Hosted SaaS (API)

Team-scoped domains via Resend DNS. Limits: free 1, pro 10, legacy 3.

1. Add domain

curl -sS -X POST "$MAILAGENT_API_URL/v1/domains" \
  -H "Authorization: Bearer $MAILAGENT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"inbox.yourcompany.com"}' | jq .

Response includes dnsRecords — add MX/TXT in your DNS provider.

2. Verify

curl -sS -X POST "$MAILAGENT_API_URL/v1/domains/DOMAIN_ID/verify" \
  -H "Authorization: Bearer $MAILAGENT_API_KEY" | jq .status

Poll until status is verified. Console: Dashboard → Domains.

3. Create inbox on domain

curl -sS -X POST "$MAILAGENT_API_URL/v1/inboxes" \
  -H "Authorization: Bearer $MAILAGENT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"username":"qa-run-42","domainId":"DOMAIN_ID","ttlMinutes":60}' | jq .address

MCP

mailagent_add_domain
mailagent_list_domains
mailagent_verify_domain

Resend quota

Free Resend plans often allow ≤2 domains. Delete stale test domains in Resend dashboard if domain_limit_reached or contract tests skip.

Enterprise: use your own Resend account — Dedicated Resend setup (required before adding domains).

Self-host (single INBOX_DOMAIN)

For a single Worker without per-team domain API — set one receiving hostname for all inboxes:

  1. Resend Dashboard → Domains → enable Receiving + MX.
  2. Copy hostname (e.g. abc123.resend.app).
  3. npx wrangler secret put INBOX_DOMAIN
  4. Webhook: https://api.webmailagent.com/webhooks/resend

More