Skip to main content
Before you can send email, the sending domain must be verified in Lettr. The $lettr->domains() service lets you manage domains programmatically — useful for multi-tenant apps that onboard customer domains, or for automating DNS verification checks. For the concepts behind domain setup (SPF, DKIM, DMARC, tracking domains), see Sending Domains.

List Domains

API Reference

GET /domains

Add a Domain

Adding a domain returns the DNS records you need to publish. Once published, call verify() to check them.

API Reference

POST /domains

Get Domain Details

API Reference

GET /domains/

Verify Domain DNS

After publishing the DNS records, trigger a verification check:
DNS changes can take time to propagate. If verification fails immediately after publishing records, wait a few minutes and try again. See Domain Verification troubleshooting for common issues.

API Reference

POST /domains//verify

Delete a Domain

Deleting a domain stops all sending from that domain immediately. Emails sent from a deleted domain will fail with a validation error.

API Reference

DELETE /domains/

What’s Next

Sending Domains

DNS setup: SPF, DKIM, DMARC

Webhooks

Receive delivery and engagement events