---
title: "Update the artifact version state"
method: PUT
path: "/groups/{groupId}/artifacts/{artifactId}/versions/{versionExpression}/state"
tags: ["Versions"]
---

# Update the artifact version state

`PUT /groups/{groupId}/artifacts/{artifactId}/versions/{versionExpression}/state`

Updates the state of an artifact version.

NOTE: There are some restrictions on state transitions.  Notably a version 
cannot be transitioned to the `DRAFT` state from any other state.  The `DRAFT` 
state can only be entered (optionally) when creating a new artifact/version.
A version in `DRAFT` state can only be transitioned to `ENABLED`.  When this
happens, any configured content rules will be applied.  This may result in a
failure to change the state.

This operation can fail for the following reasons:

* No artifact with this `artifactId` exists (HTTP error `404`)
* No version with this `version` exists (HTTP error `404`)
* An invalid new state was provided (HTTP error `400`)
* The draft content violates one or more of the rules configured for the artifact (HTTP error `409`)
* A server error occurred (HTTP error `500`)

## Query parameters

- `dryRun` boolean

## Request body

- WrappedVersionState
  - `state` 'ENABLED' | 'DISABLED' | 'DEPRECATED' | 'DRAFT' | 'SUNSET', required — Describes the state of an artifact or artifact version. * ENABLED * DISABLED * DEPRECATED * DRAFT * SUNSET — Signals that a migration deadline has passed and the version will be removed. Requires transitioning through DEPRECATED first. Added in 3.3.0.

## Response `204`

The state was successfully updated.

## Other responses

- `400` — Common response for all operations that can return a `400` error.
- `401` — Common response for all operations that can return a `401` error indicating authentication is required.
- `403` — Common response for all operations that can return a `403` error indicating the user is authenticated but not authorized.
- `404` — Common response for all operations that can return a `404` error.
- `409` — Common response used when an input conflicts with existing data.
- `500` — Common response for all operations that can fail with an unexpected server error.

---

[API](https://skmtc.net/apicurio/apis/apicurio-registry-api-v3.md) · [All operations](https://skmtc.net/apicurio/apis/apicurio-registry-api-v3/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/apicurio/apicurio-registry-api-v3/revisions/c39cb56d7dbc/schema)
