Skip to main content

Sending domains

A verified sending domain configures SPF and DKIM for your hosted mailboxes. Domain ownership alone does not create a sender: sending selects an active hosted mailbox or connected Gmail mailbox. An omitted or unmatched content.from uses the first eligible mailbox, or the platform sender if none is available. See Sending email for the selection rules. Business and Enterprise include domain-specific API keys, which restrict mailbox selection to one verified domain.

1. Add the domain

Pass "useRootDomain": true when you want the exact domain you typed to be used without an automatic send. prefix. This is useful for real mailboxes on the root domain, such as ade@example.com. Use hostInboxesOnMainDomain: false to keep existing mail routing on the main domain and host inboxes on the sending host. sendingSubdomain chooses its label (for example, mta). createDefaultInboxes: false skips optional default inboxes; the admin inbox is still created.

2. Publish the DNS records

Add the returned SPF, DKIM and tracking records at your DNS provider.

3. Verify

Cloudflare shortcut

If your DNS lives on Cloudflare, GET /sending/domains/cloudflare/connect returns an authorization URL. After approval, POST /sending/domains/cloudflare/sync publishes the records for you; GET /sending/domains/cloudflare/status shows the connection, and DELETE /sending/domains/cloudflare/disconnect removes it.

Managing domains

List with GET /sending/domains, read one with GET /sending/domains/{domain_id}, rename with PUT, remove with DELETE. Removing a domain stops future sends from its addresses.

TypeScript, PHP, Rust and Python

The same domain workflow is available in TypeScript, Python, PHP, Rust, Go, C# and Java. These examples add a domain; use the DNS-record and verify paths above after adding it.