curl --request DELETE \
--url 'https://api.usedatabrain.com/api/v2/workspace?name=sales-analytics' \
--header 'Authorization: Bearer dbn_live_abc123...'
{
"data": {
"id": "sales-analytics",
"message": "Workspace deleted successfully"
}
}
curl --request DELETE \
--url 'https://api.usedatabrain.com/api/v2/workspace?name=sales-analytics' \
--header 'Authorization: Bearer dbn_live_abc123...'
{
"data": {
"id": "sales-analytics",
"message": "Workspace deleted successfully"
}
}
Permanently delete a workspace from your organization by name.
curl --request DELETE \
--url 'https://api.usedatabrain.com/api/v2/workspace?name=sales-analytics' \
--header 'Authorization: Bearer dbn_live_abc123...'
{
"data": {
"id": "sales-analytics",
"message": "Workspace deleted successfully"
}
}
curl --request DELETE \
--url 'https://api.usedatabrain.com/api/v2/workspace?name=sales-analytics' \
--header 'Authorization: Bearer dbn_live_abc123...'
{
"data": {
"id": "sales-analytics",
"message": "Workspace deleted successfully"
}
}
name query parameter. The payload is validated with name: required string (Joi.string().required()).
DELETE https://api.usedatabrain.com/api/v2/workspace?name={name}
DELETE <SELF_HOSTED_URL>/api/v2/workspace?name={name}
Authorization: Bearer dbn_live_abc123...
name is omitted, validation fails with INVALID_REQUEST_BODY and the Joi validation message (for example "name" is required).Show Finding workspace names
data object (same shape as other /api/v2/workspace handlers).
error is omitted or null. On failure, contains code and message (see examples below).| Status Code | Description |
|---|---|
200 | OK — Workspace deleted successfully |
400 | Bad Request — Missing/invalid API key (middleware), Joi validation failed, or workspace not found |
401 | Unauthorized — Invalid/expired token or missing required scopes (middleware) |
500 | Internal Server Error — Delete mutation failed or unexpected error |
| Error code | HTTP status | When it occurs |
|---|---|---|
AUTHENTICATION_ERROR | 400 | Authorization missing or malformed (isPrivateApp middleware) |
INVALID_REQUEST_BODY | 400 | deleteWorkspaceSchema validation failed (e.g. missing name) |
WORKSPACE_ID_ERROR | 400 | No workspace with that name for your company |
AUTHENTICATION_ERROR | 401 | Service token invalid, expired, or missing required scopes |
INTERNAL_SERVER_ERROR | 500 | Delete mutation returned no row, GraphQL error, or handler catch |