Skip to main content

What you build

A page in your app where a restaurant (a tenant) sees and personalizes the emails its guests get, then a first email sent for that restaurant. You need a backend that can make an HTTPS call and a page you control.
1

Have a key and a template

  • A Minimo API key with the widgets and transactional permissions (see API keys and permissions). It stays on your server.
  • At least one email template in your workspace, for example “Booking confirmation”, with merge fields such as {GUEST_NAME} and {BOOKING_TIME}. Set its category to utility (a confirmation is a service email, not marketing).
  • Its two ids: the numeric id (e.g. 891) for the widget settings, and the uid (7 characters, e.g. TRF4MS9, the id that GET /public/v1/templates/email returns) for sending. Minimo gives you both for the templates it prepares with you.
2

Tell Minimo where the widgets live (once)

allowedOrigins are the pages allowed to show the widgets. masterTemplateIds are the templates every restaurant sees. GET on the same path reads them back.
3

Mint a session from your backend

When a restaurant opens the page, your backend asks Minimo for a session for that restaurant and gives only the URLs to the browser.
server/minimo-widgets.js
Expose it to your page with your usual auth, for example GET /api/minimo/widgets that returns createWidgetSession(currentRestaurant).
4

Embed the widget in your page

The restaurant now sees its automatic messages, can preview them and press Personalize to edit its own copy in the Minimo editor. Your console logs templates ready.
5

Send the first email for the restaurant

Send the master template (its uid) with the restaurant as tenant. If the restaurant personalized it, Minimo uses its copy.
Mount urls.history (or urls.stats) the same way to see the send from the restaurant’s side.
Mint a new session every time the page opens (sessions last 60 minutes by default, up to 720). Never cache the URLs in the browser or share them between restaurants: each one carries a token for one restaurant only.

Next steps