Skip to main content
DELETE
Permanently delete a workspace. The workspace is identified by the name query parameter. The payload is validated with name: required string (Joi.string().required()).
This action is irreversible. Ensure no dashboards, metrics, or embeds still depend on this workspace before deleting it.

Endpoint

Self-hosted Databrain Endpoint

Authentication

This endpoint requires a service token in the Authorization header. Service tokens differ from data app API keys and provide organization-level permissions. To access your service token:
  1. In Settings page, navigate to the Service Tokens section.
  2. Click the “Generate Token” button to create a new service token if you don’t have one already.
Use this token as the Bearer value in your Authorization header.

Headers

Authorization
string
required
Bearer token for API authentication. Use your service token.

Query Parameters

name
string
required
Workspace name to delete. Must match an existing workspace in your organization (case-sensitive, same string as returned by list/create).If name is omitted, validation fails with INVALID_REQUEST_BODY and the Joi validation message (for example "name" is required).

Response

On success, the API returns a top-level data object (same shape as other /api/v2/workspace handlers).
data
object
error
null | object
On success, error is omitted or null. On failure, contains code and message (see examples below).

Examples

HTTP Status Code Summary

Possible Errors

Next Steps

List Workspaces

List remaining workspaces in your organization

Create Workspace

Create a new workspace after deletion

Update Workspace

Update workspace settings instead of deleting