Multi-tenant email + LinkedIn API for SaaS builders
Build SaaS products that give each customer their own provisioned inbox and connected LinkedIn account. Workspace-isolated keys, per-tenant rate limits, scoped billing structures — multi-tenancy is first-class, not an afterthought.
The problem
You're building a SaaS product where each customer needs:
- Their own email inbox (or several) — sending and receiving from real, addressable addresses
- Their own LinkedIn account connected so the agent works leads from their personal network
- Activity, quotas, and audit trails kept isolated from other customers
- Billing and usage reporting that maps cleanly to your tier structure
Most email APIs are single-tenant. Postmark has "Servers" but isolation is by convention. Resend assumes one company. SendGrid technically supports subusers, but you're building IAM on top of their primitives.
You shouldn't be writing the multi-tenancy layer. MyAgentMail's primitives ARE the multi-tenancy layer.
What MyAgentMail gives you
- Workspaces — isolation containers under your tenant. Spin up one per customer or per environment.
- Scoped API keys —
wk_...(workspace master),ak_...(per-inbox), distinct from your owntk_...master key. Customers can't access each other's data even if they get a leaked key. - Per-tenant rate limits —
burst(10/sec),sustained(200/min),llm(60/min) buckets enforced per tenant, not per global pool. One noisy customer can't starve the others. - Per-customer LinkedIn quota — sessions, daily action caps, intent-signal counts all scoped to the workspace. Tier-up = bigger bucket.
- Webhook routing per workspace — your customer's webhooks fire to their endpoint, not yours.
- Stripe-style metadata flow — webhook events carry
workspaceId, so your billing pipeline can attribute usage cleanly.
Architecture sketch
┌─────────────────────────────────────────────────┐
│ Your SaaS app │
│ Customer signs up → you provision a workspace │
│ → you store their workspace_master_key │
│ → all their actions scoped to their workspace │
└─────────────┬───────────────────────────────────┘
│
▼ POST /v1/workspaces (X-API-Key: tk_<your-master>)
│
MyAgentMail
│
├── workspace A
│ ├── inbox: [email protected]
│ ├── linkedin session 1
│ └── webhook → customerA's app
│
├── workspace B
│ ├── inbox: [email protected]
│ ├── linkedin session 2
│ └── webhook → customerB's app
│
└── ...
import { MyAgentMail } from "myagentmail";
const platform = new MyAgentMail({ apiKey: process.env.MAM_TENANT_KEY });
// On customer signup:
const ws = await platform.workspaces.create({
name: customer.companyName,
});
// ws.masterKey is the wk_... — store it on your customer row.
// Use that key to provision per-customer inboxes:
const customerMam = new MyAgentMail({ apiKey: ws.masterKey });
await customerMam.inboxes.create({ username: "agent", domain: customer.domain });
What this saves you
| You'd build | We give you |
|---|---|
| Per-customer key issuance + IAM | POST /v1/workspaces |
| Tenant-scoped rate limiting | Built into auth middleware |
| Per-customer webhook routing | Webhook endpoints scoped to workspace |
| Isolated send/receive activity logs | workspace_id on every row |
| Cross-channel quota enforcement (email + LinkedIn) | Single linkedin_actions log keyed on workspace |
| White-label custom domain support | First-class /v1/domains per workspace |
Building a real multi-tenant infrastructure costs 3-6 months. MyAgentMail's already done it.
White-label and reseller considerations
- Custom domain per customer: each workspace can verify and own its own custom domains. Customer's mail goes from
[email protected], not*.myagentmail.com. - Webhook signing per workspace: each subscribed endpoint gets its own HMAC secret so even if you proxy webhooks, the customer can verify they came from us.
- Audit trails: every API call is logged with
workspace_id, queryable via the metrics endpoint.
Where this is NOT the right fit
- You're not building multi-tenant SaaS — you're shipping internal tooling for one team. Use the simple Cold outreach shape instead.
- You need WhatsApp / Telegram / Messenger. Unipile covers more channels; we don't.
- You need a UI. We're API-first. The outreach starter is open-source if you want to fork rather than build.
Pricing
Email: $5/month per inbox provisioned. LinkedIn: $29-$199/month depending on tier (Solo / Team / Agency). Workspaces are free — you pay for the resources inside them. See /pricing for the full breakdown and /email + /linkedin for module-specific details.
Related
Other use cases
- For cold outreachBuild your own cold outreach system on MyAgentMailCold email + LinkedIn outreach infrastructure for indie hackers and small teams. Provisioned inboxes, real LinkedIn sessions, intent signals, server-side cadence engine. Drop-in alternative to Lemlist, Apollo, Instantly — with full data ownership.
- For recruiting agentsEmail + LinkedIn API for AI recruiting agentsSource candidates from LinkedIn, message them with personalized outreach, follow up over email when a connection accepts. Reply detection, multi-account quotas, and intent signals built in.
- For sales agentsEmail + LinkedIn API for AI sales agentsBuild AI sales agents that actually work leads end-to-end — connect on LinkedIn, send personalized email, detect replies, branch the cadence, and follow up at the right moment. One API key, two channels, multi-tenant ready.
- For support agentsEmail API for AI customer support agentsBuild AI customer support agents that read inbound email, draft thoughtful replies, and learn from human edits before sending. Real inbox per agent, full thread state, drafts API for human-in-the-loop.
- For transactional emailTransactional email API for AI-powered appsSend password resets, receipts, and notifications from AI-built apps. Provisioned inbox, custom domain, ZeptoMail-backed deliverability, and per-send open + click tracking with optional opt-out for privacy-sensitive sends.
Last reviewed 2026-05-02.