---
title: "Update package version"
method: PATCH
path: "/scopes/{scope}/packages/{package}/versions/{version}"
---

# Update package version

`PATCH /scopes/{scope}/packages/{package}/versions/{version}`

Updates the details of a package version

## Path parameters

- `scope` string, required — The name of a scope. This must not be @ prefixed.
- `package` string, required — The name of a package.
- `version` string, required — A semantic version.

## Request body

- UpdatePackageVersionRequest
  - `yanked` boolean, required — Whether the version is yanked or not.

## Response `200`

OK

- PackageVersion
  - `scope` string, required — The name of a scope. This must not be @ prefixed.
  - `package` string — The name of a package.
  - `version` string, required — A semantic version.
  - `yanked` boolean, required — Whether the version has been yanked.
  - `createdAt` string, date-time, required — The date and time when the package version was created.
  - `updatedAt` string, date-time, required — The date and time when the package version was last updated.
  - `rekorLogId` string — Rekor log ID for the published package version.

## Other responses

- `400` — Invalid request / Package version already exists
- `401` — Unauthorized / User is not a scope member
- `403` — User is not a scope member
- `404` — Package not found

## Changes

- **2024-07-03** `bdf10fdaec39` — 1 breaking, 2 info
  - removed the required property `name` from the response with the `200` status
  - added the optional property `package` to the response with the `200` status
  - added the optional property `rekorLogId` to the response with the `200` status
- **2024-02-28** `f8d3b912d946` — 1 breaking, 2 warning, 1 info
  - removed the success response with the status `204`
  - changed the pattern of the `path` request parameter `package` from `^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$` to `/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/`
  - changed the pattern of the `path` request parameter `scope` from `^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$` to `/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/`
  - added the success response with the status `200`

[Change history](https://skmtc.dev/jsr-io/apis/jsr-api/changes/scopes/:scope/packages/:package/versions/:version/patch.md)

---

[API](https://skmtc.dev/jsr-io/apis/jsr-api.md) · [All operations](https://skmtc.dev/jsr-io/apis/jsr-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/jsr-io/jsr-api/revisions/bdf10fdaec39/schema)
