---
title: "Update the state of a version"
method: PUT
path: "/datasets/{id}/editions/{edition}/versions/{version}/state"
tags: ["Private"]
---

# Update the state of a version

`PUT /datasets/{id}/editions/{edition}/versions/{version}/state`

Update the state of a version of a static dataset.

## Path parameters

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

## Request body

- object
  - `state` 'created' | 'completed' | 'failed' | 'edition-confirmed' | 'associated' | 'published' — The state of the resource, can only be one of the following: * created * completed (instances only) * failed (instances only) * edition-confirmed (instances and versions only) * associated (not editions) * published

## Response `200`

State updated successfully

## Other responses

- `400` — Bad Request due to invalid json in the request body
- `404` — Dataset, edition or version not found
- `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)
