---
title: "Delete a version"
method: DELETE
path: "/datasets/{id}/editions/{edition}/versions/{version}"
tags: ["Private"]
---

# Delete a version

`DELETE /datasets/{id}/editions/{edition}/versions/{version}`

detache/delete a version from a dataset. For CMD and Cantabular datasets, the version is `soft-deleted`. For static datasets, the version is `permanently deleted` from the versions collection.

## Path parameters

- `edition` string, required
- `id` string, required
- `version` string, required

## Response `200`

A json object containing the edition and version of a dataset. For CMD, Cantabular

## Other responses

- `204` — Version successfully deleted (no content). For static datasets
- `400` — Invalid request, reasons can be one of the following: * dataset id was invalid
- `401` — Unauthorised to delete version of dataset
- `403` — Forbidden – published static versions cannot be deleted
- `404` — No version was found for an edition of a dataset using the id, edition and version provided
- `405` — Requested method is not allowed
- `500` — Failed to process the request due to an internal error

---

[API](https://skmtc.net/office-of-national-statistics/apis/dataset-api.md) · [All operations](https://skmtc.net/office-of-national-statistics/apis/dataset-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/office-of-national-statistics/dataset-api/revisions/a2947a13d675/schema)
