---
title: "Restore an older version (non-destructive)"
method: POST
path: "/v1/artifacts/{id}/versions/{versionNo}/restore"
tags: ["Artifacts"]
---

# Restore an older version (non-destructive)

`POST /v1/artifacts/{id}/versions/{versionNo}/restore`

## Request

- Base URL: `https://shareout.site`
- URL: `https://shareout.site/v1/artifacts/{id}/versions/{versionNo}/restore`
- Auth: HTTP bearer

Creates a new version (`latest_version + 1`, `source: restore`) with the files of version `versionNo` and makes it live, or stages it when blocking tests are on. Every earlier version stays in the history. Replaces the deprecated `POST /v1/artifacts/{id}/rollback`. Editor or owner.

## Request body

- object
  - `message` string: Change note for the new version.

## Response `201`

Restored as a new version

- object
  - `success` boolean
  - `version_id` string
  - `version_no` integer
  - `restored_from_version_no` integer
  - `staged` boolean

## Other responses

- `403`: Access denied
- `404`: Artifact not found, or `VERSION_NOT_FOUND`
- `409`: `CONFLICT` (someone published at the same moment) or `ASSET_NOT_FOUND` (that version has no files)

## Changes

- **2026-10-16** `924c2aeaed12`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/shareout/apis/shareout-rest-api/changes/v1/artifacts/:id/versions/:versionNo/restore/post.md)

---

[API](https://skmtc.dev/shareout/apis/shareout-rest-api.md) - [All operations](https://skmtc.dev/shareout/apis/shareout-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/shareout/apis/shareout-rest-api/revisions/1e3f7fd34f6d?raw)
