Skip to main content
POST
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.
This endpoint creates a new empty dashboard. To embed an existing pre-built dashboard from your workspace, use the Embed a Pre-built Dashboard/Metric endpoint instead.

Endpoint Formats

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

string
required
Bearer token for API authentication. Use your API key from the data app.
string
required
Supported values:
  • application/json for pure JSON payloads
  • multipart/form-data when uploading a dashboard export JSON file via importDashboardDataFile
When using multipart/form-data, object/boolean/array fields (for example accessSettings, metadata, importDashboardData, isImportMetrics, isRenameDashboard, schemaPairs) can be sent as JSON strings. Databrain parses these before validation.
importDashboardDataFile is a multipart file field (not a JSON body field). The uploaded file must be sent with MIME type application/json and contain a top-level data object.

Request Body

string
required
Unique identifier for the new dashboard. Must be unique within the data app.
string
required
The name of the workspace where the dashboard will be created.
string
required
Client ID for the dashboard owner. Used for multi-tenant isolation and row-level security.
string
Dashboard ID to clone filters, grid margins, and layout settings from (optional).
object
Custom metadata for the dashboard (optional).
boolean
Allow users to create private metrics visible only to them (optional).
string
Human-readable name for the embed configuration (optional). If not provided, the dashboard ID is used as the name. When isRenameDashboard is true, this value is also used as the underlying dashboard’s display name.
string
Description for the embed configuration (optional).
boolean
When true and templateDashboardId is provided, metrics from the template dashboard are imported into the new dashboard (optional).
object
Full dashboard configuration to import into the newly created client dashboard (optional). This should be the data object from a dashboard export payload (for example, from the Export Dashboard API or the Export Embed Dashboard API). When importDashboardData is provided, Databrain skips templateDashboardId-based metric import and directly hydrates the new dashboard from this configuration.
file (.json)
Optional JSON file upload alternative to importDashboardData. Upload a dashboard export JSON file (the payload that contains a top-level data object). When provided, Databrain reads data from the file and uses it as importDashboardData.If both importDashboardData and importDashboardDataFile are provided, importDashboardDataFile takes precedence.
boolean
When true and name is provided, the created dashboard’s display name is set to name. When false or omitted, the dashboard name is set to {dashboardId}_{clientId} (optional). Defaults to false if omitted.
'GALLERY' | 'METRIC'
When isImportMetrics is true and templateDashboardId is provided, controls how metrics are imported: GALLERY or METRIC (optional).
array
Optional. Same shape as Import Dashboard schemaPairs: an array of objects; each object requires replaceSchema (string) and targetSchema (string). Use this when imported SQL references a schema name that should map to the target datamart schema.Typically used with importDashboardData or importDashboardDataFile. With multipart/form-data, send schemaPairs as a JSON-encoded string (see note above); the server parses it before Joi validation.
object
required
Access control settings for the dashboard.
string
required
The datamart name used in the embedded environment.
boolean
Allow AI Pilot features (optional).
boolean
required
Allow sending email reports.
boolean
required
Allow managing metrics.
boolean
required
Allow metric creation.
boolean
required
Allow metric deletion.
boolean
required
Allow layout changes to metrics.
boolean
required
Allow updating metrics.
boolean
required
Allow viewing of underlying data.
boolean
required
Allow creating dashboard views.
boolean
Optional. Enables end-user dashboard filter interactions in embedded mode.
array
Optional allowlist for dashboard filterable columns. Each item must include tableName and columns.
string
required
Fully qualified table name used in dashboard filters.
array[string]
required
Column names allowed for dashboard filter evaluation for the specified table.
boolean
Optional. Enables end-user metric filter interactions in embedded mode.
array
Optional allowlist for columns that end users can use in metric filters. Each item must include tableName and columns.
string
required
Fully qualified table name used in metric filters.
array[string]
required
Column names allowed for metric filter evaluation for the specified table.
'single' | 'multi'
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)
boolean
Legacy join strategy flag. Prefer using accessSettings.joinModel instead.
'DRAG_DROP' | 'CHAT'
required
Mode of metric creation (drag and drop or chat).
array
List of allowed tables and client columns for table tenancy (optional). When provided, each item must include name and clientColumn.
string
Table name. Required when the parent tableTenancySettings array is provided.
string
Client-level column for table tenancy. Required when the parent tableTenancySettings array is provided.

Response

string
The ID of the created dashboard embed configuration.
null | object
Error object if the request failed, otherwise null.
string
The name of the embed configuration. Matches the request body name if provided, otherwise the dashboardId. Returned by the new endpoint (/api/v2/data-app/dashboard-embeds); the legacy endpoint returns only id and error.

HTTP Status Code Summary

Possible Errors

Quick Start Guide

1

Get your API token

For detailed instructions, see the API Token guide.
2

Create a new dashboard for your client

Make a POST request with the required parameters:
3

(Optional) Use a template

To clone settings from an existing dashboard, add templateDashboardId. To also import metrics from the template, set isImportMetrics: true and optionally metricImportMode to "GALLERY" or "METRIC". To use a custom display name for the dashboard (instead of {dashboardId}_{clientId}), set name and isRenameDashboard: true:
4

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.
5

Embed in your application

Use the dashboard ID and guest token in your web component:

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.

Custom Dashboard Names

Set isRenameDashboard: true with name to give each client dashboard a human-readable display name instead of {dashboardId}_{clientId}.

Dynamic Provisioning

Automatically create dashboards during customer onboarding or upgrades.

Client Isolation

Ensure data isolation with clientId and row-level security settings.

Next Steps

Generate Guest Token

Create secure tokens to access your new dashboard

Embed a Pre-built Dashboard/Metric

Embed existing dashboards that were built in the databrain platform

How to Embed

Integrate dashboards into your application

Multi-Tenant Access Control

Set up row-level security for your dashboards