---
title: "Delete a dataset"
method: DELETE
path: "/datasets/{id}"
tags: ["Private"]
---

# Delete a dataset

`DELETE /datasets/{id}`

## Request

- Base URL: `https://api.beta.ons.gov.uk/v1`
- URL: `https://api.beta.ons.gov.uk/v1/datasets/{id}`
- Auth: API key in header `Authorization`

Delete an existing dataset

## Path parameters

- `id` string, required

## Response `204`

The dataset was successfully deleted

## Other responses

- `401`: Unauthorised to delete the dataset
- `403`: Forbidden to delete dataset, already published
- `500`: Failed to process the request due to an internal error

---

[API](https://skmtc.dev/office-of-national-statistics/apis/dataset-api.md) - [All operations](https://skmtc.dev/office-of-national-statistics/apis/dataset-api/llms.txt) - [OpenAPI document](https://skmtc.dev/office-of-national-statistics/apis/dataset-api/revisions/a2947a13d675?raw)
