> ## Documentation Index
> Fetch the complete documentation index at: https://docs.minimo.it/llms.txt
> Use this file to discover all available pages before exploring further.

# Brand widget and tenant branding

> Each restaurant sets its own logo, color, contacts and legal details once; every email it sends follows. Who wins between your values and the restaurant's

Each restaurant sets its own logo, color, contacts and legal details once, and every email it sends follows. This page also says whose value wins: yours or the restaurant's.

## Mount it

The Brand widget is **not** in the default permissions, because the restaurant can change the logo, colors and the identity line of every email. Ask for it explicitly, and lock the fields you want to keep:

```bash theme={null}
curl -X POST https://api.minimo.it/public/v1/widgets/sessions \
  -H "Authorization: Bearer YOUR_MINIMO_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "tenant": "restaurant_4812",
    "tenantName": "Trattoria da Mario",
    "permissions": ["templates", "campaigns", "contacts", "history", "stats", "brand"],
    "brand": { "locked": ["legalName", "privacyUrl"] }
  }'
```

```html theme={null}
<div id="minimo-brand"></div>
<script src="https://api.minimo.it/public/v1/embed/widgets/widgets.js"></script>
<script>
  Minimo.mountWidget({
    url: session.urls.brand,
    container: '#minimo-brand',
    minHeight: 900,
    onEvent: function (event) {
      if (event.type === 'brand.saved') console.log('saved', event.data.fields, event.data.appliedTo);
    },
  });
</script>
```

* `brand.locked`: any of `displayName`, `legalName`, `logoUrl`, `brandColor`, `address`, `phone`, `email`, `website`, `privacyUrl`, `socials` (the six links). A locked field is read-only in the widget ("Set by your management app") and a save that changes it answers `422 BRAND_FIELD_LOCKED`.
* Events: `ready` with `tenant`; `brand.saved` with `tenant`, `fields` (the fields the restaurant changed) and `appliedTo` (personalized messages recolored).

## What the restaurant sees

![The brand widget: logo, color and legal details on the left, a live preview of the booking confirmation on the right](https://mintcdn.com/minimo/9ObazzQQNYTDa_5r/images/embedded/widget-brand.png?fit=max\&auto=format\&n=9ObazzQQNYTDa_5r\&q=85\&s=2837c75fc2fd56044e113417bff25b31)

*Shown in Italian. The widget follows the session `locale`.*

The restaurant can set:

* **Logo**: upload a PNG, JPG, WEBP or GIF up to 1 MB (stored by Minimo, served over https) or paste an `https` link.
* **Color**: a hex color, with a readability check. Used for the title band and the buttons of your standard messages.
* **Name and legal details**: business name, legal name (data controller), address, privacy policy link.
* **Contacts and social links**: phone, email, website and the six social links of the footer (Facebook, Instagram, LinkedIn, X, YouTube, TikTok). Only the ones filled in show.

A live preview shows one of your standard messages as the restaurant's guests will get it, rendered exactly like a real send, with sample guest data. **Save** applies the brand to the next emails; ticking "Also apply the color to the messages I already personalized" recolors its existing copies too.

## Tenant profile

Everything the widget saves lives on the **tenant profile**, which you read and write too. Minimo uses it for the restaurant's emails (logo, color, footer, identity line) and for its unsubscribe and preferences pages (name, logo, color, data controller).

```bash theme={null}
curl -X PUT https://api.minimo.it/public/v1/tenants/restaurant_4812 \
  -H "Authorization: Bearer YOUR_MINIMO_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "displayName": "Trattoria da Mario",
    "logoUrl": "https://cdn.example.com/mario/logo.png",
    "brandColor": "#1F5E5B",
    "locale": "it",
    "legalName": "Trattoria da Mario S.r.l.",
    "address": "Via Roma 1, 20121 Milano",
    "privacyUrl": "https://trattoriadamario.example.com/privacy",
    "website": "https://trattoriadamario.example.com",
    "socials": { "instagram": "https://instagram.com/trattoriadamario" }
  }'
```

```json theme={null}
{
  "data": {
    "tenant": "restaurant_4812",
    "displayName": "Trattoria da Mario",
    "logoUrl": "https://cdn.example.com/mario/logo.png",
    "locale": "it",
    "legalName": "Trattoria da Mario S.r.l.",
    "address": "Via Roma 1, 20121 Milano",
    "privacyUrl": "https://trattoriadamario.example.com/privacy",
    "website": "https://trattoriadamario.example.com",
    "phone": null,
    "email": null,
    "socials": {
      "facebook": null,
      "instagram": "https://instagram.com/trattoriadamario",
      "linkedin": null,
      "x": null,
      "youtube": null,
      "tiktok": null
    },
    "brandColor": "#1F5E5B",
    "editedByTenant": [],
    "updatedAt": "2026-11-08T14:58:15.891Z"
  }
}
```

* Permission **Widgets**. `GET /public/v1/tenants/{tenant}` reads it (`404` if none). Reference: [Save Tenant Profile](https://docs.minimo.it/api-reference/embedded/tenants/save-profile.md).
* Only the fields you send are written, `null` clears one.
* URLs must be public `https` (`422 INVALID_TENANT_PROFILE`, `INVALID_TENANT_URL`); social links must be on their own network. `brandColor` is hex and not near-white (`422 INVALID_BRAND_COLOR`). Phone and email are checked (`422 INVALID_TENANT_CONTACT`).
* `editedByTenant` lists the fields the restaurant changed itself in the widget.
* Every [widget session](https://docs.minimo.it/embedded/widgets.md) also refreshes the profile from `tenantName`, `locale` and these variables: `RESTAURANT_NAME`, `LOGO_URL`, `BRAND_COLOR`, `RESTAURANT_ADDRESS`, `RESTAURANT_PHONE`, `RESTAURANT_EMAIL`, `LEGAL_NAME`, `PRIVACY_URL`, `WEBSITE_URL`, `FACEBOOK_URL`, `INSTAGRAM_URL`, `LINKEDIN_URL`, `X_URL`, `YOUTUBE_URL`, `TIKTOK_URL` (invalid values are skipped).

## Who wins

| Situation | Result |
| - | - |
| You send a 1:1 email with `tenant` (`/transactionals`, `/templates/email/send`, `sendAt`, automatic rules) | What you pass in `customFields` (or the event payload) always wins. Every brand value you leave out (`RESTAURANT_NAME`, `LOGO_URL`, `BRAND_COLOR`, `RESTAURANT_ADDRESS`, `RESTAURANT_PHONE`, `LEGAL_NAME`, `PRIVACY_URL`…) comes from the tenant profile: stop passing them and the restaurant's own values are used. |
| The restaurant changed a field in the widget | Its value wins over your **session** variables (previews, broadcasts, editor). |
| A field the restaurant never changed | Your session value wins; the profile fills what you leave out. |
| You write the field with `PUT /public/v1/tenants/{tenant}` | Your value is stored and the field is yours again (out of `editedByTenant`). |
| You lock the field (`brand.locked` on the session) | Read-only in the widget; the session variables refresh it even if the restaurant had changed it. |

> [!TIP]
>
> The simplest setup: let the restaurant own its brand in the widget, lock only what your app must control (often
> `legalName` and `privacyUrl`), and stop passing brand values on each send.

## What changes in the emails

* Your standard messages sent for the restaurant (master + `tenant`) use its color for the title band and the buttons, its logo and its footer. `{BRAND_COLOR}` and `{BRAND_TEXT_COLOR}` (readable text on it) are available as merge values in custom HTML.
* New personalized copies and new campaigns start in the restaurant's color. Copies it already personalized keep their colors, unless it ticks "apply to the messages I already personalized" when saving.
* The unsubscribe and preferences pages of the restaurant show its name, logo and color.
* The emails never carry a Minimo badge. Fonts follow your workspace's branding kit.

## If something fails

A save that changes a locked field answers `422 BRAND_FIELD_LOCKED`. A wrong profile value answers `422 INVALID_TENANT_PROFILE`, `INVALID_TENANT_URL`, `INVALID_BRAND_COLOR` or `INVALID_TENANT_CONTACT`. Every code, with what to do: [Errors and limits](https://docs.minimo.it/embedded/errors.md).

## Next step

[WhatsApp widget](https://docs.minimo.it/embedded/widget-whatsapp.md) (coming soon), or [Consent, unsubscribe and preferences](https://docs.minimo.it/embedded/consent.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.