Email API subaccounts are a way to split one provider account into many smaller ones, usually one per customer of a SaaS platform or one per client of an agency. They exist to answer four needs: separate credentials, separate reporting, separate reputation and, sometimes, separate billing. Mailcandor does not have a subaccount object. This page shows how each of those needs is met with domains, domain-locked keys, tags and teams, and where the limits are.
What subaccounts are for
Some providers offer a parent account with child accounts underneath. SendGrid calls them subusers, and its documentation uses them to pin data to the EU (SendGrid data residency FAQ). Whatever the name, the platform builder is usually after one or more of these:
| Need | Why it matters |
|---|---|
| Separate credentials | A leaked key for one tenant must not send for others |
| Separate sending identity | Tenant A must never send as tenant B’s domain |
| Per-tenant reporting | You need sends, bounces and complaints per customer, for support and billing |
| Reputation isolation | One tenant’s bad list should not hurt the rest |
| Separate billing and limits | Some customers pay you per email, or need their own quota |
It is worth deciding which of these you actually need before picking a provider. Most platforms need the first three for every tenant, and the last two only for a few.
How Mailcandor covers each need
| Need | Mailcandor feature |
|---|---|
| Separate credentials | One sending-only API key per tenant |
| Separate sending identity | Key locked to the tenant’s domain |
| Per-tenant reporting | A tenant tag on every email, returned in webhooks; log filter by domain |
| Reputation isolation | One domain per tenant; a separate team for tenants you cannot vouch for |
| Separate billing and limits | A separate team, with its own plan, bill and rate limit |
Domains are unlimited on every plan, and there are no seat or domain fees, so adding a tenant costs nothing on its own.
Step 1: add the tenant’s domain
When a tenant connects their domain, add it by API and show them the DNS records to publish:
curl https://api.mailcandor.com/v1/domains \
-H "Authorization: Bearer $MAILCANDOR_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "mail.tenant-a.com" }'
The response lists three DKIM CNAMEs plus SPF and a bounce MX on send.mail.tenant-a.com. Poll POST /v1/domains/{id}/verify until the domain is verified. The full flow, including what to send while the tenant’s DNS is pending, is in sending from customer domains.
Step 2: create a key locked to that domain
curl https://api.mailcandor.com/v1/api-keys \
-H "Authorization: Bearer $MAILCANDOR_KEY" \
-H "Content-Type: application/json" \
-d '{ "name": "tenant-a sending", "permission": "sending", "domain_id": "DOMAIN_ID" }'
The token in the response is shown once. Store it encrypted against the tenant. This key can only send, and only from mail.tenant-a.com. A send from any other domain answers 403 restricted_api_key, and the key cannot read logs, add domains or create keys. The domain-locked keys help page covers the details.
Step 3: tag every email with the tenant
async function sendForTenant(tenant, email) {
const res = await fetch('https://api.mailcandor.com/v1/emails', {
method: 'POST',
headers: {
Authorization: `Bearer ${tenant.mailcandorKey}`, // locked to tenant.domain
'Content-Type': 'application/json',
'Idempotency-Key': email.idempotencyKey,
},
body: JSON.stringify({
from: `${tenant.name} <notifications@${tenant.domain}>`,
to: email.to,
subject: email.subject,
html: email.html,
tags: [{ name: 'tenant', value: tenant.id }],
}),
});
if (!res.ok) {
const { error } = await res.json();
throw new Error(`${error.type}: ${error.message}`);
}
return res.json(); // { id, status }
}
Tags come back in every webhook for that email. Store email.delivered, email.bounced and email.complained events against the tenant id, and you have per-tenant reporting, per-tenant bounce rates and the numbers you need if you bill tenants for email. See tags and headers.
Step 4: decide who gets their own team
A Mailcandor team is the hard boundary. Everyone on a team shares its domains, keys, log and bill, and the per-second rate limit is per team. A person can belong to several teams and create new ones from the dashboard, and each team has its own plan and invoice.
Put a tenant in its own team when:
- they pay for email separately and you want their usage on its own invoice,
- they need their own rate limit or plan,
- their own staff need dashboard access without seeing other tenants, or
- you cannot vouch for their lists, so you want their bounce and complaint rates kept apart.
Teams are created in the dashboard; there is no API endpoint to create one. For most platforms that is fine, because only a handful of tenants need a team of their own.
Reputation: be clear about the limits
Within one team, bounce and complaint rates are measured across the team. If one tenant’s sending pushes those rates past Mailcandor’s fair review lines (4% hard bounces or 0.08% complaints over 24 hours), a review opens for the team. A review can name the domain it concerns, and sending carries on while a person looks, but if sending has to be paused, the pause applies to the whole team.
That is the main trade-off against a true subaccount model. It is also why per-tenant tags matter: with bounce and complaint rates per tenant in your own data, you can spot the tenant that is causing trouble and act before the team-wide rate moves.
Practical rules for platform builders
- Require each tenant to verify a domain before they send from it. Until then, send from your own domain with the tenant’s name in the From field and their address in Reply-To.
- Never share a key across tenants. Rotate a tenant’s key when they leave.
- Watch per-tenant rates daily and pause a tenant’s sending in your app when their bounce rate jumps.
- Stop sends to bounced addresses for every tenant. Mailcandor adds hard bounces and complaints to the team’s suppression list automatically.
- Use a subdomain such as
mail.tenant-a.comso the tenant’s own mailbox setup is untouched.
Agencies with many client sites follow the same pattern; see email for agencies. Plans and access requests are on the pricing page.