Medos Booking Docs
Theming

Auto-fetch workspace theme

Configure the theme once in the Medos dashboard and every embed picks it up.

If you leave the theme option completely out of your init() call, the widget fetches the theme configured on your workspace from the Medos API.

MedosBooking.init({
  apiKey: "mk_...",
  // no theme — the widget will fetch from the API
});

Why use it

  • Central control — change the theme in your dashboard and every embed updates without a code deploy.
  • Multi-site brand consistency — if you have several websites (marketing site, patient portal, partner site) pointing at the same workspace, all of them stay visually in sync.
  • Non-technical updates — clinic managers can change the theme without touching a codebase.

What the API returns

The API returns one of the built-in theme names — currently default or modern. If the workspace hasn't set a theme, the widget falls back to default.

Handling fetch errors

If the theme fetch fails (network error, transient API issue), the widget falls back to the default theme silently. This behavior isn't currently configurable through the CDN options — if you need to observe theme fetch failures (for logging or alerting), reach out to the platform team.

On this page