Skip to main content

Overview

When your SaaS runs on one Minimo workspace with your customers (for example restaurants) as tenants inside it, each customer sends from their own domain. After a domain is connected and verified (via Embedded domain connect or POST /public/v1/domains), three things remain:
  1. Senders: register the addresses each domain sends as (prenotazioni@…, noreply@…).
  2. Per-send domain: choose, on every API send, which sender or domain the email goes out from.
  3. Tenant tag: record which of your customers a send belongs to, so you can read stats per customer and rebill.
The chosen domain is the one that signs DKIM and receives bounces (Return-Path on bounce.<domain>), so each customer’s mail authenticates as their own.

Before you start

  • An API key with the Domains permission (domains) for senders, and the Transactional permission (transactional) for sending. One key can have both. Keep it on your server.
  • At least one verified domain in your workspace (status: "verified" in GET /public/v1/domains).

1. Manage senders

All routes are scoped to one domain ({id} from GET /public/v1/domains). An address must live under that exact domain, and the domain must be verified.
422 when the address is not under that domain (SENDER_NOT_ON_DOMAIN) or the domain is not verified yet (SENDER_DOMAIN_NOT_VERIFIED). A domain of another workspace is 404. To move a sender to another domain, delete it and create it under the other one.
A verified domain already has a default sender, created at verification: info@ for a transactional domain, hello@ for a marketing one.

2. Choose the sender on each send

These endpoints accept the sender per call:
  • POST /public/v1/emails (one-shot HTML)
  • POST /public/v1/transactionals and POST /public/v1/templates/email/send (templates)
  • POST /public/v1/campaigns/{id}/send
Use one of:
Never a silent fallback. If the sender does not belong to a verified domain of your workspace, the send is refused with 422 and nothing goes out: Without any of these fields, nothing changes: the template’s sender or the workspace default is used, exactly as before.
For a marketing campaign, a workspace with a verified marketing domain (for example news.<domain>) sends from it, for reputation isolation.

Customers without a domain: a subdomain of yours

Verify your own domain once (for example yoursaas.com). Then from / fromAddress can use any subdomain of it with no DNS of its own, one per customer:
The email is signed with your domain’s DKIM and bounces go to bounce.yoursaas.com, so it authenticates (SPF, DKIM, DMARC) without any record for trattoriadamario.yoursaas.com. A subdomain that is registered as a domain of its own (in any workspace, verified or not) is refused with SENDER_NOT_ALLOWED: connect and verify it like any domain instead.

Replies to your customer’s mailbox

Add replyTo to POST /public/v1/transactionals or POST /public/v1/templates/email/send to choose where replies go, for example your customer’s own Gmail. Any mailbox, "Name <address>" or a bare address:
Without it, the Reply-To is your workspace’s inbox address when it is set as reply-to, otherwise none. A malformed value is refused with 422 INVALID_REPLY_TO.

3. Tag the send with your tenant

Add tenant to POST /public/v1/emails, /public/v1/transactionals or /public/v1/templates/email/send: your own reference for the customer, up to 64 characters among letters, digits, ., _, : and -, starting with a letter or digit. It is stored on the message. Read it back:
Each item carries tenant, and GET /public/v1/emails/{id}/stats returns it too. Count the items per tenant to meter and rebill your customers.

Putting it together

  1. Customer connects trattoriadamario.it in the popup → domain.verified.
  2. Your backend adds prenotazioni@trattoriadamario.it → keeps the returned id with the customer.
  3. Every email for that customer is sent with senderId and tenant.
  4. At month end, GET /public/v1/messages/list?tenant=… per customer.