Platform
Client domains (sub-tenancy)
Send on behalf of your own customers, each from their verified domain.
If you're an agency or a platform, client domains let each of your customers send from their own address with their own reputation — isolated from one another and from you. Provision a client, hand back the DNS records, verify them, then send scoped to that client.
/v1/sub-tenants/v1/sub-tenants/v1/sub-tenants/:id/v1/sub-tenants/:id/verifySend as a client
Scope any request to a client with mail.withSubTenant(id) (SDK) or the X-Rootmail-Subtenant header (HTTP). The client's contacts, suppression list, audit trail, and reputation all stay their own.
const client = await mail.subTenants.create({
name: "Sunset Villas",
sendingDomain: "sunsetvillas.com",
});
// hand client.dns_records to your customer, then:
await mail.subTenants.verify(client.id);
await mail.withSubTenant(client.id).messages.create({
to: "guest@example.com",
subject: "Your booking is confirmed",
html: "<h1>See you soon!</h1>",
});The scope applies to READS as well as sends. With the header set, listing messages, or asking for analytics or deliverability, returns that client's numbers alone — so you can build a per-client view without filtering client-side. Leave it off and you get the whole workspace, every client included.
const acme = mail.withSubTenant(client.id);
await acme.messages.list(); // only Acme's mail
await acme.analytics.get(); // only Acme's funnel
await acme.deliverability.get(); // only Acme's reputation
await mail.messages.list(); // everything, all clientsIn the dashboard this is the client switcher in the top bar: pick a client and every section narrows to them until you leave.
- One client's bounce or complaint never touches another's deliverability.
- Everything rolls up to you for billing and oversight.
- Client domains are sold per-domain — buy them with a plan or on their own.