Skip to main content
The widgets give each restaurant its own email area inside your app, without a Minimo account. Your backend creates a session for one restaurant; your page shows the widgets in iframes.

Example

The widgets: Your API key never reaches the browser. Every widget call is limited to the restaurant of the session: a restaurant never sees another restaurant’s templates, guests or sends.
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. Set them before your first send, booking event or contact with tenant: until then Minimo does not keep restaurants apart (see Contacts and the API).
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):
Mint a session when your customer opens the page and pass only the 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, locale and the brand variables, except the fields the restaurant changed itself.
  • Revoke a session early with DELETE /public/v1/widgets/sessions/{sessionId} (204; 404 once it is gone). A revoked or expired session shows “Session expired: reload the page.”
  • If the call fails: 400 INVALID_PARAMETERS (a field is wrong, or no allowed origin is set yet: the userMessage says which), 422 SENDER_NOT_ALLOWED (from is not under a verified domain of your workspace), 429 (more than 600 sessions in an hour). Reference: Create Widget Session.

2. Embed the widgets (your frontend)

mountWidget returns { iframe, destroy() }. A plain <iframe src="…"> works too.

Events

Your page gets an event for what happens inside a widget (template.saved, campaign.sent, …). The full list: Widget events.

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: manage their own guests in the Contacts widget, or add them from the campaign widget. Every guest belongs to exactly one tenant: the same address in your workspace or at another tenant is another contact, never read or changed from here.
  • Brand: set its own logo, color, contacts and legal details, except the fields you lock.
  • WhatsApp (coming soon): each tenant will connect its own number and see its state. It uses the tenant’s own WhatsApp Business account and its own card on Meta. Today the WhatsApp widget only explains how it works, and its button is off. A number already connected to Minimo will be refused, never moved.
  • Your workspace’s sending rules apply to every tenant (consent, daily limits for new tenants, clean lists, and the optional review of the first campaigns), 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-ancestors and postMessage targets are your allowed origins only.

If something fails

A revoked or expired session shows “Session expired: reload the page”: create a new session. A widget that is not in the session’s permissions answers 403 WIDGET_PERMISSION_DENIED. Every code: Errors and limits.

Next step

Widget events