Overview
If you run a SaaS on top of Minimo (one Minimo workspace for your SaaS, your customers as tenants inside it, see How embedded Minimo works), the embedded widgets give each customer a self-service area inside your product, without a Minimo account:
How it works:
- your backend asks Minimo for a widget session for one tenant;
- your frontend puts the widget URLs in iframes (one line of JavaScript);
- your page receives events (
template.saved,campaign.sent, …) throughpostMessage.
The widgets are in English and Italian, with a neutral look and a small “Email by Minimo” line (hide it with
poweredBy: false for a white-label look).Before you start
- An API key with the Widgets permission (
widgets), kept on your server. See API keys and permissions. - The origins of the pages that embed the widgets and the templates your tenants see, set once:
Each field replaces its list; omit a field to keep it.
GET on the same path reads the settings.
1. Create a session (your backend)
Response (
201):
urls to the browser. The token travels in the URL fragment, which never reaches a server log.
- Every URL is returned. A widget whose permission is not in the session loads, but its calls are refused (
403) and it shows an error: mount only the widgets you asked for. - Every session also refreshes the tenant profile from
tenantName,localeand the brand variables, except the fields the restaurant changed itself. - Revoke a session early with
DELETE /public/v1/widgets/sessions/{sessionId}(204;404once it is gone). A revoked or expired session shows “Session expired: reload the page.” - An invalid body (unknown permission, bad
tenant) answers400.
2. Embed the widgets (your frontend)
mountWidget returns { iframe, destroy() }. A plain <iframe src="…"> works too.
Events
Every message is{ source: 'minimo-widget', widget, type, data }, posted only to your allowed origins.
Events are a convenience for your UI. To know the real state from your backend, use the API (tenant profile, rules, statistics, message list).
What a tenant can and cannot do
- Automatic messages: personalize a copy of each master (texts, colors, images, subject), reset it to the standard, switch each automatic send on or off. Merge variables stay as they are. The footer with the unsubscribe link and the sender identity cannot be removed.
- Campaigns: create from a starter, edit, send now, only to their own contacts who gave marketing consent. A sent campaign cannot be edited or sent again.
- Contacts: add contacts from the campaign widget. A contact belongs to a tenant through the tag
tenant:<tenant>in your workspace. A guest already known to another tenant is linked, never modified, and shown by email only. - Brand: set its own logo, color, contacts and legal details, except the fields you lock.
- WhatsApp: connect their own number (their own WhatsApp Business account and card on Meta) and see its state. A number already connected to Minimo is refused, never moved.
- Your workspace’s sending rules apply to every tenant (consent, review of the first campaigns, daily limits for new tenants), see Protections and sending limits. The usage counts on your workspace.
Security
- The API key stays on your server; the session token is stored hashed (SHA-256) and expires.
- Every widget request is pinned to the session’s workspace and tenant; another tenant’s ids answer
404. - The editor opens through a single-use link bound to one template.
frame-ancestorsandpostMessagetargets are your allowed origins only.