> ## Documentation Index
> Fetch the complete documentation index at: https://alphacastio.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# DELETE /datasets/{id} — Delete a Dataset

> Permanently delete a dataset and all its data. Requires Write permission on the dataset. Returns 204 No Content. This action cannot be undone.

Deleting a dataset permanently removes it along with all uploaded data and column definitions. You must have `Write` permission on the dataset to perform this action. There is no confirmation step and no way to recover a deleted dataset, so proceed with care.

## Authentication

Authenticate using HTTP Basic Auth. Pass your API key as the username and leave the password empty. You must have `Write` permission on the target dataset.

## Request

**Method:** `DELETE`\
**URL:** `https://api.alphacast.io/datasets/{dataset_id}`

## Path parameters

<ParamField path="dataset_id" type="integer" required>
  The numeric ID of the dataset to delete.
</ParamField>

## Response

Returns `204 No Content` with an empty body on success.

## Example

<RequestExample>
  ```bash cURL theme={null}
  curl -u YOUR_API_KEY: \
    -X DELETE https://api.alphacast.io/datasets/123
  ```

  ```python Python theme={null}
  import requests

  response = requests.delete(
      "https://api.alphacast.io/datasets/123",
      auth=("YOUR_API_KEY", ""),
  )
  assert response.status_code == 204
  ```

  ```javascript Node.js theme={null}
  const response = await fetch("https://api.alphacast.io/datasets/123", {
    method: "DELETE",
    headers: { Authorization: "Basic " + btoa("YOUR_API_KEY:") },
  });
  // response.status === 204
  ```
</RequestExample>

A successful deletion produces no response body and returns HTTP `204`.

## Error responses

| Status             | Cause                                                                 |
| ------------------ | --------------------------------------------------------------------- |
| `401 Unauthorized` | Missing or invalid API key.                                           |
| `403 Forbidden`    | You do not have `Write` permission on this dataset.                   |
| `404 Not Found`    | No dataset with the given ID exists or is accessible to your account. |

<Warning>
  Deletion is permanent. All rows, column definitions, and metadata associated with this dataset are destroyed immediately. This action cannot be undone.
</Warning>
