Embeds
Embed a Pre-built Dashboard/Metric
Create an embed for an existing dashboard or metric that was built by your data analyst.
POST
Embed existing dashboards or metrics from your workspace. Use this endpoint when a dashboard has already been created in the DataBrain platform and you want to make it available for embedding in your application.
Use this endpoint for all new integrations. This is the recommended endpoint format.
This endpoint embeds existing dashboards/metrics from your workspace. To create a new empty dashboard for multi-tenant scenarios, use the Create an Empty Dashboard Embed endpoint instead.
Endpoint Formats
- New Endpoint (Recommended)
- Legacy Endpoint (Deprecated Soon)
Authentication
All API requests must include your API key in the Authorization header. Get your API token when creating a data app - see our data app creation guide for details. Finding your API token: For detailed instructions, see the API Token guide.Headers
Bearer token for API authentication. Use your API key from the data app.
Must be set to
application/json for all requests.Request Body
Existing dashboard ID to embed. This dashboard must already exist in your workspace.
Type of embed configuration:
dashboard or metric.Metric ID to embed. Required if embedType is
metric.The name of the workspace where the embed configuration will be created.
Optional human-readable name for the embed configuration. If not provided, the embed ID will be used as the name.
Access control settings for the embedded view. Required when
embedType is dashboard. Optional when embedType is metric.The datamart name used in the embedded environment. Required when
embedType is dashboard.Allow AI Pilot features (optional).
Allow sending email reports.
Allow managing metrics.
Allow creating dashboard views.
Allow metric creation.
Allow metric deletion.
Allow metric layout changes.
Allow updating metrics.
Allow viewing underlying data.
Recommended join strategy for table relationships.
single: single worksheet mode (tables are pre-joined into one worksheet)multi: multi-sheet mode (joins are resolved dynamically based on fields used in each chart)
Legacy join strategy flag. Prefer using
accessSettings.joinModel instead.Mode of metric creation (drag and drop or chat).
Multi-tenant table access configuration (optional).
Table name for tenancy configuration.
Column name for client-level filtering.
Response
Unique identifier for the created embed configuration.
Error object if the request failed, otherwise
null.HTTP Status Code Summary
| Status Code | Description |
|---|---|
200 | OK - Embed configuration created successfully |
400 | Bad Request - Invalid request parameters |
401 | Unauthorized - Invalid or missing API key |
404 | Not Found - Dashboard or metric not found |
500 | Internal Server Error - Server error occurred |
Possible Errors
| Error Code | HTTP Status | Description |
|---|---|---|
INVALID_WORKSPACE_NAME | 404 | Workspace not found |
INVALID_DATA_APP_API_KEY | 401 | Invalid API key |
INVALID_DASHBOARD_ID | 404 | Dashboard not found |
INVALID_METRIC_ID | 404 | Metric not found |
INTERNAL_SERVER_ERROR | 500 | Server error |
Quick Start Guide
Get your API token
For detailed instructions, see the API Token guide.
Create a dashboard in your workspace
First, create and configure your dashboard in the DataBrain workspace with all the metrics and visualizations you want to embed.
(Optional) Embed a single metric
To embed just one metric instead of the entire dashboard, use
embedType: "metric":Generate a guest token
Use the embed ID to generate a guest token for your end users. See the Guest Token API for details.
Next Steps
Generate Guest Token
Create secure tokens for your embed configurations
Create an Empty Dashboard
Create new empty dashboards for multi-tenant scenarios
Update Embed Config
Modify existing embed configurations
How to Embed
Learn how to integrate embeds in your application

