# Email for platforms (https://coss.com/products/subaccounts)

> coss.com Email for platforms gives each of your users a sub-account with its own domains, sending reputation, quotas and suppression list, all on your API key.

## How it works

Create a sub-account per user, give it a domain, and name it on each send. coss.com keeps its reputation, quotas and suppressions apart from everyone else's.

```ts twoslash
import { Coss } from "coss";
const coss = new Coss();
// ---cut---
// 1. One sub-account per user, addressed by your own id.
await coss.email.subaccounts.create({
  name: "Acme Bakery",
  uid: "user_8812",
  quotas: { recipients_per_day: 5000 },
});

// 2. The user's own domain: only this sub-account can send from it.
const { data: domain } = await coss.domains.create({
  name: "acmebakery.com",
  subaccount: "user_8812",
});

// 3. Send for the user.
await coss.email.send({
  subaccount: "user_8812",
  from: "Acme Bakery <orders@acmebakery.com>",
  to: "customer@example.com",
  subject: "Your order is ready",
  html: "<p>Come and pick it up.</p>",
});
```

The email's `subaccount_id`, and the one in its webhook events and log lines, tell you which user
it was for. The [API reference](/docs/api-reference/sub-accounts/create-subaccount) lists every field.

## Built for multi-tenant sending

One user's bounces, complaints or bad content never stop another's email.

### A sub-account per user
Create one per customer of your platform and address it by its `sub_…` id or your own `uid`. Sub-accounts belong to an environment: sandbox keys see sandbox ones, live keys live ones.

### Their own domains and tenant
A sub-account's [domains](/docs/email/subaccounts#domains) send through its own Amazon SES tenant, so its sending reputation at the mail provider is its own. They don't count toward your plan's domain limit.

### Shared domains
Users without a domain of their own send from one of yours that you mark `shared_with_subaccounts`, through your organization's reputation and your dedicated IPs if you have them.

### Quotas
Set recipients per day, per second, or both on each sub-account. A send over one is refused with `429` `quota_exceeded`, and your other sub-accounts go on sending.

### Reputation per sub-account
Bounce and complaint rates are measured per live sub-account. Past your thresholds, or when screening blocks one of its emails, only that sub-account is `paused`, with `subaccount.paused` and `subaccount.reputation_warning` [webhooks](/docs/webhooks).

### Suppressions and stats
Its bounces, complaints and unsubscribes go on its own suppression list only. `coss.email.subaccounts.stats()` returns its recipients per day: sent, delivered, bounced, complained, failed and suppressed.

Every new sub-account's first emails are screened for spam and phishing, so a bad actor who signs up
to your platform is caught early. Over [SMTP](/products/smtp), name the sub-account with the
`X-Coss-Subaccount` header; in a batch, each email can name its own.

## Specifications

The limits of a sub-account. The docs list each one in context.

- Plans with live sub-accounts: Scale and Enterprise
- Live sub-accounts on Scale: 1,000
- Live sub-accounts on Enterprise: Unlimited
- Sandbox sub-accounts: 100 per environment, free
- Domains per sub-account: 10
- Domains awaiting verification: 5 at once
- Stats history: 45 days
- Streams: transactional email
- Addressed by: id or your uid

## Plans

Live sub-accounts are part of the larger plans. Sandbox ones are free everywhere.

Email for platforms is included on Scale and Enterprise, with up to
1,000 live sub-accounts on Scale. Email your sub-accounts send is
billed to your organization per recipient, like any email.

| Product | Rate | |
| --- | --- | --- |
| Email | $0.40 per 1,000 recipients for the first 1,000,000; $0.30 per 1,000 recipients from 1,000,001 to 10,000,000; $0.22 per 1,000 recipients beyond 10,000,000 | |

See [pricing](/pricing) for the plans.

## Frequently asked questions

### What is a sub-account?

One of your platform's users, inside your coss.com environment. It has its own sending domains, its own reputation at the mail provider and at coss.com, quotas you set, its own suppression list and stats, and you send for it with the same API key by naming it on each send.

### How do I send email on behalf of my customers?

Create a sub-account per customer with coss.email.subaccounts.create(), giving it your own id for that customer as uid. Then pass subaccount on each send, or the X-Coss-Subaccount header over SMTP, and the email counts toward that customer's quotas, reputation and suppressions.

### Can my users send from their own domains?

Yes. Add a domain with subaccount set and the user publishes its DNS records like any domain. Only that sub-account can send from it, through its own Amazon SES tenant, so a pause there stops only that user. Users without a domain can send from one of yours that you share with sub-accounts.

### What happens when one of my users sends spam?

coss.com measures each live sub-account's bounce and complaint rates on its own. Past the warning threshold its reputation becomes warning; past the suspension threshold, or when content screening blocks one of its emails, it is paused and only its sends are refused. Your other users keep sending, and you reinstate it once you've dealt with the cause.

### Which plans include sub-accounts?

Live sub-accounts need a plan with Email for platforms, and each plan sets how many you can have. Sandbox sub-accounts are free on every plan, so you can build the integration first. The pricing page lists the plans.

### Is my organization still responsible for its sub-accounts?

Yes. Sub-accounts are billed to you, your own reputation still counts everything they send, and if your organization is suspended all of them stop.
