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

## Request

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

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

## Changes

- **2025-04-10** `cd5b1e616e44`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/office-of-national-statistics/apis/explore-our-data/changes/datasets/:id/editions/:edition/versions/:version/state/put.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)
