Skip to main content
Ark is built around a four-level hierarchy: Platform → Tenant → Domain → Email. This architecture lets your SaaS platform give each customer their own sending domains and independent configuration — without building email infrastructure from scratch.

Hierarchy

LevelWhat It RepresentsExample
PlatformYour Ark account. The top-level container for all resources.Your SaaS company
TenantOne of your customers. Gets isolated domains, credentials, webhooks, suppressions, and usage tracking.”Acme Corp” — a customer of your platform
DomainA sending domain belonging to a tenant. Configured with , , and .acme.com or mail.acme.com
EmailA single email sent from a verified domain.Welcome email from hello@acme.com

When to Use Tenants

Use tenants whenever your platform sends email on behalf of distinct customers or organizational units:
  • SaaS platforms — each customer sends from their own domain (@customer.com)
  • Agencies — each client has separate sending domains and deliverability
  • Marketplaces — sellers send order confirmations from their brand
  • Internal teams — departments with separate sending requirements
If you’re building a single product that sends email from one domain, you can use the default tenant that comes with your account. Tenants become essential when you need per-customer isolation.

Creating a Tenant

from ark import Ark

client = Ark()

tenant = client.tenants.create(
    name="Acme Corp",
    metadata={"plan": "enterprise", "customer_id": "cust_123"}
)

print(f"Tenant created: {tenant.data.id}")

Isolation Model

Each tenant is fully isolated. Nothing leaks between tenants:
ResourceIsolation
DomainsEach tenant has its own verified sending domains
ReputationSending reputation is per-domain. One tenant’s bad practices don’t affect another.
CredentialsPer-tenant API keys and SMTP credentials
WebhooksEach tenant can have its own webhook endpoints and subscribed events
SuppressionsBounce and complaint suppressions are tenant-scoped
UsageEmail volume and analytics tracked independently per tenant
Per-tenant domains are the key benefit. Each customer sends from their own authenticated domains with full DKIM, SPF, and DMARC configuration.

Sending as a Tenant

Once a tenant has a verified domain, send email on their behalf using tenant-scoped credentials:
from ark import Ark

# Use tenant-scoped credentials
client = Ark(api_key="ark_live_tenant_...")

email = client.emails.send(
    from_="hello@acme.com",
    to=["user@example.com"],
    subject="Welcome to Acme",
    html="<h1>Welcome!</h1><p>Thanks for signing up.</p>",
    metadata={"user_id": "usr_456"}
)

Per-Tenant Analytics

Track sending volume, deliverability, and engagement per tenant:
# Get usage for a specific tenant
usage = client.tenants.usage.retrieve("tenant_abc123")

print(f"Emails sent: {usage.data.emails_sent}")
print(f"Bounces: {usage.data.bounces}")
print(f"Complaints: {usage.data.complaints}")

# Get usage timeseries
timeseries = client.tenants.usage.timeseries("tenant_abc123")
for point in timeseries.data:
    print(f"{point.date}: {point.emails_sent} sent")

Next Steps

Tenant Management

Full CRUD operations for tenants, credentials, and configuration

Domain Onboarding

Build domain setup flows for your customers

Domain Setup

Configure DKIM, SPF, and DMARC for sending domains

Sending Email

Send transactional email via API or SMTP