Create a new empty dashboard in your data app. This endpoint is designed for multi-tenant scenarios where each client needs their own dashboard instance to build upon. Use templateDashboardId to clone filters and settings from an existing dashboard.
Endpoint Migration Notice: We’re transitioning to kebab-case endpoints. The new endpoint is /api/v2/data-app/dashboard-embeds. The old endpoint /api/v2/dataApp/dashboard-embeds will be deprecated soon. Please update your integrations to use the new endpoint format.
POST https://api.usedatabrain.com/api/v2/data-app/dashboard-embeds
Use this endpoint for all new integrations. This is the recommended endpoint format.POST https://api.usedatabrain.com/api/v2/dataApp/dashboard-embeds
This endpoint still works but will be deprecated. Please migrate to the new endpoint format.
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 .
Bearer token for API authentication. Use your API key from the data app. Authorization: Bearer dbn_live_abc123...
Must be set to application/json for all requests. Content-Type: application/json
Request Body
Unique identifier for the new dashboard. Must be unique within the data app.
Client ID for the dashboard owner. Used for multi-tenant isolation and row-level security.
The name of the workspace where the dashboard will be created.
Dashboard ID to clone filters, grid margins, and layout settings from (optional).
Custom metadata for the dashboard (optional).
isAllowPrivateMetricsByDefault
Allow users to create private metrics visible only to them (optional).
Optional human-readable name for the embed configuration. If not provided, the dashboard ID will be used as the name.
Access control settings for the dashboard.
accessSettings.datamartName
The datamart name used in the embedded environment.
accessSettings.isAllowAiPilot
Allow AI Pilot features (optional).
accessSettings.isAllowEmailReports
Allow sending email reports.
accessSettings.isAllowManageMetrics
Allow managing metrics.
accessSettings.isAllowMetricCreation
Allow metric creation.
accessSettings.isAllowMetricDeletion
Allow metric deletion.
accessSettings.isAllowMetricLayoutChange
Allow layout changes to metrics.
accessSettings.isAllowMetricUpdate
Allow updating metrics.
accessSettings.isAllowUnderlyingData
Allow viewing of underlying data.
accessSettings.isAllowCreateDashboardView
Allow creating dashboard views.
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)
accessSettings.isIncrementalJoin
Legacy join strategy flag. Prefer using accessSettings.joinModel instead.
accessSettings.metricCreationMode
'DRAG_DROP' | 'CHAT'
required
Mode of metric creation (drag and drop or chat).
accessSettings.tableTenancySettings
List of allowed tables in embed (optional).
accessSettings.tableTenancySettings[].clientColumn
Client-level column for table tenancy.
accessSettings.tableTenancySettings[].name
Table name.
Response
The ID of the created dashboard embed configuration.
Error object if the request failed, otherwise null.
HTTP Status Code Summary
Status Code Description 200OK - Dashboard created successfully400Bad Request - Invalid request parameters401Unauthorized - Invalid or missing API key500Internal Server Error - Server error occurred
Possible Errors
Code Message HTTP Status WORKSPACE_ID_ERRORInvalid workspace name 400 INVALID_DATA_APP_API_KEYInvalid Data App API key 401 CLIENT_ID_ERRORInvalid client id 400 INVALID_DASHBOARD_IDDashboard already exists 400 TEMPLATE_DASHBOARD_ERRORInvalid template dashboard id 400 DASHBOARD_CREATE_ERRORFailed to create client dashboard 500 INTERNAL_SERVER_ERRORInternal server error 500
Quick Start Guide
Create a new dashboard for your client
Make a POST request with the required parameters: curl --request POST \
--url https://api.usedatabrain.com/api/v2/data-app/dashboard-embeds \
--header 'Authorization: Bearer dbn_live_abc123...' \
--header 'Content-Type: application/json' \
--data '{
"dashboardId": "client-acme-analytics",
"clientId": "acme-corp-123",
"workspaceName": "my-workspace",
"accessSettings": {
"datamartName": "my-datamart",
"isAllowEmailReports": false,
"isAllowManageMetrics": true,
"isAllowCreateDashboardView": true,
"isAllowMetricCreation": true,
"isAllowMetricDeletion": false,
"isAllowMetricLayoutChange": true,
"isAllowMetricUpdate": true,
"isAllowUnderlyingData": false,
"joinModel": "multi",
"metricCreationMode": "DRAG_DROP"
}
}'
(Optional) Use a template
To clone settings from an existing dashboard, add templateDashboardId: {
"dashboardId" : "client-acme-analytics" ,
"clientId" : "acme-corp-123" ,
"templateDashboardId" : "template-dashboard-001" ,
// ... rest of the configuration
}
Generate a guest token
Use the created dashboard ID to generate a guest token for your end users. See the Guest Token API for details.
Embed in your application
Use the dashboard ID and guest token in your web component: < dbn-dashboard
token = "guest-token-here"
dashboard-id = "client-acme-analytics"
/>
Use Cases
Multi-Tenant SaaS Create isolated dashboards for each customer in your SaaS application.
Template-Based Creation Use templateDashboardId to clone filters and settings from a master template.
Dynamic Provisioning Automatically create dashboards during customer onboarding or upgrades.
Client Isolation Ensure data isolation with clientId and row-level security settings.
Next Steps