Skip to main content

Users and workspaces

Enterprise feature

Embedding is an Enterprise feature that Mitzu support switches on for your organisation. See Embedded analytics for setup, and send the authentication headers with every call.

Method and pathWhat it does
PUT /embed/users/{email}Create the user, or change their licence. Body: {"license": "viewer" | "editor", "send_invite_email": false}
GET /embed/usersUsers the API added, with their workspaces
PUT /projects/{workspace_id}/embed/users/{email}Add the user to a workspace, or change their role. Body: {"role": "viewer" | "member", "license": "viewer" | "editor"} (licence optional)
DELETE /projects/{workspace_id}/embed/users/{email}Remove the user from the workspace
POST /embed/users/assignmentsBulk: {"assignments": [{"email", "workspace_id", "role", "license"}]}, up to 500 per call
GET /embed/workspacesAs the user: the workspaces they can open

Saving in the explore iframe needs an Editor licence and the Member role in the workspace. Viewers can explore but not save. Workspaces open to the whole organisation are visible to every member, API users included, so keep tenant workspaces restricted. Adding a user to an open workspace returns 400: everyone already has access there, so restrict it first.

Each user is returned as {"email", "license", "added_by_api", "workspaces": [{"workspace_id", "name", "role"}]}.