> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.labric.co/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.labric.co/_mcp/server.

# Delete a dataset

DELETE https://platform.labric.co/api/v1/datasets/{dataset_id}

Delete a dataset together with the visualizations built on it and the
dashboard items that show them. The response lists the deleted
visualizations as affected objects. Fails with 409 while an ML model
version trained on the dataset exists.

Requires an API key with the `write` scope.

Reference: https://docs.labric.co/api-reference/labric-api/datasets/delete

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `dataset_id` (string, required)

## Response

### 200

OK

- `deleted` (boolean, required)
- `affected_objects_count` (integer, required)
- `affected_objects` (list of AffectedObjectSchema, required)

## Errors

### 400 Bad Request Error

Bad Request

- `detail` (string, required)

### 401 Unauthorized Error

Unauthorized

- `detail` (string, required)

### 403 Forbidden Error

Forbidden

- `detail` (string, required)

### 404 Not Found Error

Not Found

- `detail` (string, required)

### 409 Conflict Error

Conflict

- `detail` (string, required)

### 422 Unprocessable Entity Error

Unprocessable Content

- `detail` (list of map from string to any, required)

### 500 Internal Server Error

Internal Server Error

- `detail` (string, required)

## Types

### AffectedObjectSchema

- `id` (string, required)
- `display_name` (string, required)

## Examples

**Response**

```json
{
  "deleted": true,
  "affected_objects_count": 1,
  "affected_objects": [
    {
      "id": "string",
      "display_name": "string"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://platform.labric.co/api/v1/datasets/dataset_id"

headers = {"Authorization": "Bearer <api_key>"}

response = requests.delete(url, headers=headers)

print(response.json())
```