Workspaces must be connected to either a datasource, datamart, or configured for multiple datasources. Ensure your datasource or datamart exists before creating a workspace.
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
Name of the workspace to create. Must be unique within your organization.
Type of connection for the workspace. Must be one of:
DATASOURCE, DATAMART, or MULTI_DATASOURCE.Name of the datasource to connect to this workspace.Required when
connectionType is DATASOURCE.Name of the datamart to connect to this workspace.Required when
connectionType is DATAMART.Response
Contains the created workspace information on success.
Error object if the request failed, otherwise
null for successful requests.Examples
HTTP Status Code Summary
| Status Code | Description |
|---|---|
200 | OK - Workspace created successfully |
400 | Bad Request - Invalid request parameters |
401 | Unauthorized - Invalid or missing API key |
500 | Internal Server Error - Server error occurred |
Possible Errors
| Error Code | HTTP Status | Description |
|---|---|---|
INVALID_REQUEST_BODY | 400 | Missing or invalid parameters |
WORKSPACE_NAME_ALREADY_EXISTS | 400 | Workspace name already exists |
INVALID_DATASOURCE_NAME | 400 | Datasource not found |
INVALID_DATAMART_NAME | 400 | Datamart not found |
INVALID_DATA_APP_API_KEY | 401 | Invalid API key |
INTERNAL_SERVER_ERROR | 500 | Server error |
Quick Start Guide
1
Verify prerequisites
Before creating a workspace, ensure you have:
- A valid API token from your data app
- Either a datasource or datamart already configured
- The exact name of your datasource or datamart (case-sensitive)
2
Choose your connection type
Decide which connection type fits your use case:
- DATASOURCE: For connecting to a single data source
- DATAMART: For connecting to a pre-configured datamart with table/column configurations
- MULTI_DATASOURCE: For workspaces that need access to multiple datasources
3
Create your workspace
Make the API call with your chosen configuration:
Successful response returns the workspace name. Save this for use in embed configurations.
4
Use your workspace
Reference your workspace in dashboards and metrics:

