AhaSend

Email API sub-accounts for platforms

Email API sub-accounts give each of your customers their own AhaSend account, with its own domains, API keys and sending. You see usage and cost for each customer through the API, and you pay one invoice.

What a sub-account includes

A sub-account is a full AhaSend account under your parent account. Other providers call them subaccounts or subusers. Sub-accounts are for SaaS platforms, agencies, resellers, cloud and hosting providers and managed service providers that send email for their customers. Do you only send your own email? Then one account with several domains is the simpler fit.

Own domains and sending

Each customer gets their own sending domains and their own sending activity.

Own API keys

A sub-account's API key works on every regular API v2 endpoint: domains, messages, webhooks, routes and more.

Own webhooks and routes

Each customer has their own webhooks for email events and their own routes for inbound email.

Own members and suppressions

Each customer has their own team members and their own suppression list.

Usage and cost per customer

One API call gives you this billing period's message volume and allocated cost for your parent account and for each active sub-account. Use it to bill each customer for what they send.

Message volume per customer

See how many emails each sub-account sent in the current billing period, next to your parent account.

Allocated cost per customer

Each sub-account's cost is its share of your invoice, split by message volume. It is not what the customer would pay on a plan of its own.

Deliveries and bounces per customer

Each sub-account's own statistics show its delivered emails and its bounces.

One invoice

Every sub-account's emails count on your plan. You pay one invoice, with no charge per sub-account.

Removed sub-accounts in one total

Usage from sub-accounts you removed this period stays on your invoice and shows as one total.

Read it with a scoped key

A parent API key with the sub-accounts:usage scope can read usage and cost. See the usage endpoint in the docs.

Learn more

Set up a customer in two API calls

Create the sub-account, then its first API key. The secret key is shown only once.

✓
Install dependencies
$ npm install @ahasend/sdk
import { AhaSendClient } from "@ahasend/sdk";

// A parent API key with sub-accounts:write and sub-account-api-keys:write
const parent = new AhaSendClient({
  apiKey: process.env.AHASEND_API_KEY!,
  accountId: process.env.AHASEND_ACCOUNT_ID!,
});

// 1. Create the sub-account
const child = await parent.subAccounts.create(
  { name: "Acme Subsidiary", website: "acme.example.com" },
  { idempotencyKey: "subacct-20240101-acme" },
);

// 2. Create its first API key (the secret is shown only once)
const key = await parent.subAccounts.apiKeys.create(
  child.id,
  {
    label: "Bootstrap key",
    scopes: ["domains:read", "domains:write", "messages:send:all"],
  },
  { idempotencyKey: "child-bootstrap-key-20240101-acme" },
);

// 3. Use the new key with the sub-account's ID on the regular API v2 endpoints
const customer = new AhaSendClient({
  apiKey: key.secret_key,
  accountId: child.id,
});

Central control

Run every customer from your parent account

Manage each sub-account in the dashboard, through the API, with the CLI or with the TypeScript and Go SDKs.

Create, update and remove

Create a sub-account for each new customer, update it as they grow, and remove it when they leave.

Pause and resume

Pause sending for one customer and resume it when you are ready.

Monthly sending cap

Set an optional monthly sending cap on each sub-account. A cap of 0 means no cap.

Scoped parent keys

Give each parent API key only the sub-account scopes it needs, such as sub-accounts:usage to read usage and cost.

Dashboard and CLI

Manage sub-accounts under Settings, Sub-accounts in the dashboard, or with the AhaSend CLI.

TypeScript and Go SDKs

Manage sub-accounts and read their usage from your own code with the TypeScript and Go SDKs.

Plans and billing

Sub-accounts come with Pro and Max. Support switches them on for your account.

Pro: up to 9 sub-accounts, from
a month
Max: no limit on sub-accounts, from
a month
No charge per sub-account
Billed to your parent account

One bill for all the customers you send for.

One invoice for all your customers
Every sub-account's emails count on your plan
Message volume per sub-account for the billing period
Allocated cost per sub-account, to bill each customer back
Usage of removed sub-accounts kept as one total
An optional monthly sending cap on each sub-account
Usage and cost through the API, with a scoped key

Where your data lives

Your customers' email stays in Europe

Message data is stored in the EU, in Germany and Finland, and AhaSend is ISO 27001 certified. If you process data for your own customers, our DPA makes AhaSend your sub-processor.

  • ISO27001CertifiedISO 27001 certified
  • GDPRCompliantGDPR compliant
  • HOSTED INEUROPEHosted in Europe
  • CSA Certified Sender

Questions about sub-accounts

AhaSend does. One API call returns the message volume and the allocated cost of each sub-account for the current billing period. Each sub-account's own statistics also show its delivered emails and its bounces. So you get a cost for each customer, and you can bill them back.

Give every customer their own sub-account

Start for free, then move to Pro or Max and ask support to switch on sub-accounts.

Sub-accounts come with Pro and Max