Custom Domains
Use your own domain for agent email addresses instead of @lobstermail.ai.
Last updated 2026-03-29
By default, inboxes use @lobstermail.ai addresses. With a custom domain, your agent's inboxes can use addresses like agent@yourdomain.com. Custom domains require Tier 2 (Builder) or above.
Domain Limits#
| Tier | Domains |
|---|---|
| Free (Tier 0) | 0 |
| Free Verified (Tier 1) | 0 |
| Builder (Tier 2) | 3 |
| Pro (Tier 3) | 5 |
| Scale (Tier 4) | 25 |
Adding a Domain#
const domain = await lm.addDomain({ domain: 'yourdomain.com' });
console.log(domain.id); // dom_abc123
console.log(domain.status); // 'pending'
console.log(domain.dnsRecords); // Array of records to configure
Or via the API:
POST /v1/domains
{ "domain": "yourdomain.com" }
How Verification Works#
Domain verification happens in two phases:
- Phase 1 — DNS verification. You add TXT, MX, and SPF records. LobsterMail checks them automatically.
- Phase 2 — DKIM setup. Once DNS is verified, LobsterMail generates three CNAME records for DKIM signing. You add those, and DKIM is verified automatically.
The domain status progresses through: pending → dns_verified → verified (or failed).
Phase 1: DNS Records#
The initial response includes three DNS records to add at your DNS provider:
1. TXT Record (Domain Verification)#
| Type | Host | Value |
|---|---|---|
| TXT | _lobstermail.yourdomain.com | lobstermail-verify=<token> |
2. MX Record (Inbound Email)#
| Type | Host | Priority | Value |
|---|---|---|---|
| MX | yourdomain.com | 10 | inbound-smtp.us-west-2.amazonaws.com |
3. TXT Record (SPF)#
| Type | Host | Value |
|---|---|---|
| TXT | yourdomain.com | v=spf1 include:amazonses.com ~all |
If you already have an SPF record, add include:amazonses.com to your existing record rather than creating a new one.
Phase 2: DKIM Records#
Once all DNS records from Phase 1 are verified, LobsterMail creates a sending identity and generates three DKIM CNAME records. These appear automatically in your domain's dnsRecords array when you check the status.
| Type | Host | Value |
|---|---|---|
| CNAME | <token1>._domainkey.yourdomain.com | <token1>.dkim.amazonses.com |
| CNAME | <token2>._domainkey.yourdomain.com | <token2>.dkim.amazonses.com |
| CNAME | <token3>._domainkey.yourdomain.com | <token3>.dkim.amazonses.com |
Add all three CNAME records at your DNS provider. LobsterMail polls for DKIM verification automatically — once the records propagate, your domain status moves to verified.
Tip: DKIM CNAME records typically verify within a few minutes, but DNS propagation can take up to 48 hours in some cases.
Checking Verification Status#
Check the current status and see which DNS records still need attention:
const domain = await lm.getDomain('dom_abc123');
console.log(domain.status); // 'pending' | 'dns_verified' | 'verified' | 'failed'
console.log(domain.dkimStatus); // 'not_started' | 'pending' | 'success' | 'failed'
console.log(domain.dnsRecords); // Each record has a 'status' field ('pending' | 'verified')
Or via the API:
GET /v1/domains/dom_abc123/status
Triggering Re-verification#
If you have updated your DNS records and want to check again without waiting for the automatic retry:
await lm.verifyDomain('dom_abc123');
POST /v1/domains/dom_abc123/verify
Using Your Domain#
Once fully verified (DNS + DKIM), create inboxes on your domain:
const inbox = await lm.createInbox({
localPart: 'agent',
domain: 'yourdomain.com',
});
console.log(inbox.address); // agent@yourdomain.com
If you omit domain, inboxes default to @lobstermail.ai.