Skip to main content

Overview

If you run a SaaS on top of Minimo (one Minimo workspace for your SaaS, your customers as tenants inside it), each of your customers sends email from their own domain. Embedded domain connect lets them set that domain up without leaving your product and without a Minimo account:
  1. your backend asks Minimo for a short-lived popup session for one domain;
  2. your frontend opens the popup with one line of JavaScript;
  3. your customer sees the DNS records (copy or CSV), can configure them in one click when their DNS provider supports Domain Connect (Cloudflare, GoDaddy and others), and watches the verification happen live;
  4. your page receives events (domain.verified, …) through postMessage.
Your API key never reaches the browser.
The popup has a neutral look with a small “Powered by Minimo” line that you can turn off. It is available in English and Italian.

Before you start

  • An API key with the Domains permission (domains), kept on your server. See Authentication.
  • The origins of the pages that will open the popup, set once:
Only these origins can embed the popup in an iframe (frame-ancestors), receive its events and be used as returnUrl. Exact scheme://host[:port] values: https only, http for localhost. No wildcards, at most 20. GET on the same path reads the list.

1. Create a session (your backend)

Response:
The url is single use: it can be opened once (a reload of the same tab keeps working). To open the popup again, create a new session. Pass only the url to your frontend. Errors: 400 EMBED_ORIGINS_NOT_CONFIGURED (no allowed origin yet), 400 RETURN_URL_NOT_ALLOWED, 409 (the domain belongs to another workspace), 429 (more than 120 sessions in an hour).

2. Open the popup (your frontend)

Minimo.openDomainConnect returns { close() }. In popup mode call it from a click handler (browsers block popups opened later); if you fetch the session first, open the window synchronously and let the SDK reuse it, or use modal.

3. Events

Every event is a postMessage to your page, sent only to your allowed origins. The SDK checks the sender origin for you and calls onEvent({ type, sessionId, tenant, data }). Without the SDK, listen yourself and check the origin:
Events are a convenience for the UI. To know the real state from your backend, call GET /public/v1/domains/{id} or POST /public/v1/domains/{id}/verify.

What the user sees

  • The DNS records to publish (ownership TXT, DKIM CNAMEs, DMARC, bounce MX and SPF), each with a copy button, plus Download CSV for whoever manages their DNS.
  • Configure automatically when the domain’s DNS provider supports Domain Connect: the provider opens in its own window, the user approves, and control comes back to the popup, which checks again.
  • Live verification: the popup checks every 15 seconds and on demand, with a status per record.
  • Domain verified once the domain can send. The default sender (info@ for transactional, hello@ for marketing) is created at that moment.

Security

  • The API key stays on your server; the browser only gets a short-lived, single-use link.
  • The link token and the popup’s session token are stored hashed. A replayed link reads as “already opened”.
  • A session can only read and verify its own domain in your workspace.
  • Embedding, events and returnUrl are limited to your allowed origins.
  • Session creation and popup calls are rate limited.