Embedded analytics
The Embed API lets your backend show Mitzu analytics inside your own product. Your users become regular Mitzu users; your server adds them to the workspaces they may see, and every embed call runs as one of them, with exactly the access that user has in Mitzu. Insights, dashboards, cohorts and chats created through the API belong to that user, as if they had made them in the app.
Embedding is part of the Enterprise package and isn't switched on by default, not even on
Enterprise. To use it, email support@mitzu.io and we'll enable it for
your organisation. Until then, Embed API calls return 403 embedding_not_enabled and the
Embedding permission doesn't appear on API keys.
The API key is a secret. Call the Embed API from your backend only. Requests sent from a browser
(with an Origin header) are refused. The only thing that reaches a browser is the one-time
explore iframe link.
What you can build
| Page | What it covers |
|---|---|
| Onboard tenants | One workspace per tenant, cloned from a template and limited to the tenant's rows. Uses the Mitzu API, not the Embed API |
| Users and workspaces | Add your users to Mitzu and to the workspaces they may see |
| Analytics API | Read dashboards, insights, cohorts and annotations, and their data as chart-ready JSON |
| AI agent chats | Ask Mitzu's AI agent questions as the user and show its answers and charts |
| Scheduled agents | Agents that answer a question on a schedule and keep each run's findings |
| Explore iframe | Put Mitzu's explore editor in your product |
| Errors and limits | Error codes and rate limits |
Your users are regular Mitzu members, so they can also connect Claude or another MCP client through the MCP server by signing in, with the same access.
To share a dashboard without users or an API, publish it as a public link or iframe instead. That is available on Pro and Enterprise and needs no setup from Mitzu.
Who can use it
- Your organisation needs the Enterprise package, API access and embedding switched on by Mitzu support.
- Org Admins create and manage the API keys. Only a key with the Embedding permission can call the Embed API.
- Your users are the people the calls run as. They are ordinary members of your organisation
with a Viewer or Editor licence, and they see only the workspaces you add them to. Org Admins
can't be used: calls naming one fail with
403 forbidden.
Set it up
- Email support@mitzu.io to switch on embedding for your organisation.
- Create an API key with the Embedding permission under Settings → API keys. Keep it on your server.
- Create the workspaces your users will see, for example one per tenant with Onboard tenants, and keep them restricted rather than open to the whole organisation.
- Add your users to their workspaces.
- To show the explore editor, add your site under Allowed iframe sites on the key (see Explore iframe).
- From your backend, read data with the Analytics API, start AI agent chats, or mint iframe links.
Authentication
Every request carries two headers:
| Header | Value |
|---|---|
X-Mitzu-Api-Key | An API key with the Embedding permission |
X-Mitzu-User | The email of the user the call runs as (not needed for the user management calls) |
All paths are relative to https://<your Mitzu host>/api/v1.
The first call that names an email Mitzu doesn't know creates that user in your organisation:
org role member, Viewer licence, no invite email. If the email already belongs to a member of
your organisation, the call runs as that member, with that member's access. The API never acts as
an Org Admin: calls naming one fail with 403 forbidden, and open iframes for a member who becomes an
Org Admin end. Keep an Embedding key on your server and rotate it if it leaks; see Scheduled agents for what rotation means for agents.
API users count against your editor seats and
viewer licences like invited users, and they can sign in to the Mitzu app with their email.