---
title: "Restore an artifact file to an earlier saved version"
method: POST
path: "/api/v1/sessions/{sessionId}/artifact-versions/restore"
tags: ["sessions"]
---

# Restore an artifact file to an earlier saved version

`POST /api/v1/sessions/{sessionId}/artifact-versions/restore`

## Request

- Base URL: `http://127.0.0.1:3001`
- URL: `http://127.0.0.1:3001/api/v1/sessions/{sessionId}/artifact-versions/restore`
- Auth: none declared

## Path parameters

- `sessionId` string, required: Session identifier, e.g. project-1.

## Request body

- RestoreArtifactVersionRequest
  - `path` string, required: Artifact-directory-relative file path, as listed in the session's artifactFiles.
  - `version` integer, required: The version whose content becomes the file's content.

## Response `200`

OK

- ArtifactFileResponse
  - `fileFingerprint` string, required: Hex SHA-256 of the file's content.
  - `path` string, required
  - `size` integer, required

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `409`: Conflict
- `500`: Internal Server Error
- `501`: Not Implemented

## Changes

- **2026-10-21** `8f160e6183cd`: 5 info
  - removed the `agent_switch_saga` enum value from the `reporting_owner` response property for the response status `400`
  - removed the `agent_switch_saga` enum value from the `reporting_owner` response property for the response status `404`
  - removed the `agent_switch_saga` enum value from the `reporting_owner` response property for the response status `409`
  - removed the `agent_switch_saga` enum value from the `reporting_owner` response property for the response status `500`
  - …1 more
- **2026-10-16** `289877ab84f4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/changes/api/v1/sessions/:sessionId/artifact-versions/restore/post.md)

---

[API](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon.md) - [All operations](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/llms.txt) - [OpenAPI document](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/revisions/61d7efd08578?raw)
