---
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

## Changes

- **2025-02-18** `f5f36bf68ba9`: 3 info
  - the endpoint scheme security `Authorization` was added to the API
  - api tag `Private` added
  - api tag `Private user` removed

[Operation history](https://skmtc.dev/office-of-national-statistics/apis/explore-our-data/changes/datasets/:id/delete.md)

---

[API](https://skmtc.dev/office-of-national-statistics/apis/explore-our-data.md) - [All operations](https://skmtc.dev/office-of-national-statistics/apis/explore-our-data/llms.txt) - [OpenAPI document](https://skmtc.dev/office-of-national-statistics/apis/explore-our-data/revisions/c24bb51d5217?raw)
