Create a real mailbox for each customer with one API call: acme@inbox.yourapp.com, or an address on the customer's own domain. Your app gets their mail by webhook and sends from their address; the customer can open it in any mail app. Unlimited mailboxes on Starter.
Help desks and CRMs: every customer gets an address that feeds their tickets or deals.
AI assistants: each user's assistant has its own inbox it reads and answers from.
Booking and order systems: confirmations go out from the business's own address, and replies come back into the app.
Website builders and agencies: mail for every site you host, without a second provider.
Provision a mailbox at sign-up
// When a customer signs up: give them an address on your domain
const res = await fetch("https://api.usemektup.com/v1/domains/inbox.yourapp.com/mailboxes", {
method: "POST",
headers: { Authorization: `Bearer ${process.env.MEKTUP_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ localPart: customer.slug }), // acme@inbox.yourapp.com
});
const { address, password } = await res.json(); // IMAP/SMTP login, shown once
// Route its mail to your app
await fetch(`https://api.usemektup.com/v1/domains/inbox.yourapp.com/mailboxes/${customer.slug}/webhook`, {
method: "PUT",
headers: { Authorization: `Bearer ${process.env.MEKTUP_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ url: `https://yourapp.com/hooks/mail?customer=${customer.id}` }),
});
How the pieces fit
Your app holds one Mektup API key on the server.
At sign-up it creates a mailbox and sets the mailbox's webhook to your app.
Mail to the customer's address is stored in their mailbox and posted to your app.
Your app sends as the customer with POST /v1/emails, and reads history with GET /v1/messages.
If the customer wants their mail in Apple Mail or Outlook, give them the mailbox's login.
When they leave, DELETE the mailbox.
Things to decide early
Subdomain or customers' own domains: a subdomain is instant; customers' domains need them to add DNS records.
Limits: sending limits are per Mektup account, so one noisy customer counts for everyone. Put your own per-customer limit in front.
Untrusted mail: anyone can email a customer's address. Sanitise HTML before you show it and keep it out of agent instructions.
Questions
How do I give every customer of my SaaS their own email inbox?
Use a domain or subdomain for it, for example inbox.yourapp.com, and create a Mektup mailbox per customer through the API when they sign up. Each mailbox receives and sends real email, notifies your app by webhook, and has its own IMAP/SMTP login if the customer should use it in a mail app.
Can customers use their own domains?
Yes. Add the customer's domain through the API, show them the DNS records Mektup returns, and check with POST /v1/domains/:domain/verify. Mektup never changes anyone's DNS itself.
Is each customer's mail kept apart?
Each mailbox has its own login that only reaches its own mail. Your API key can reach every mailbox on your account, so keep it on your server.
How many mailboxes can I create?
Unlimited on Starter, across 25 domains, within 50,000 sent emails a month. Larger set-ups and resellers use Enterprise, quoted per account.