---
title: "Record an artifact file's unrecorded edit, then list its saved versions"
method: POST
path: "/api/v1/sessions/{sessionId}/artifact-versions/sync"
tags: ["sessions"]
---

# Record an artifact file's unrecorded edit, then list its saved versions

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

## Request

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

## Path parameters

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

## Request body

- SyncArtifactVersionsRequest
  - `path` string, required: Artifact-directory-relative file path, as listed in the session's artifactFiles.

## Response `200`

OK

- ListArtifactVersionsResponse
  - `path` string, required
  - `versions` ArtifactVersionSummary[], required
    - `createdAt` string, date-time, required
    - `fileFingerprint` string, required: Hex SHA-256 of the version's content.
    - `harness` string: Best effort: the agent that was running the session when the version was recorded, which after an agent switch can differ from the agent that wrote it. Absent for older versions.
    - `restoredFrom` integer: The version this one restored, when it is a restore.
    - `size` integer, required
    - `source` 'agent' | 'user', required: Who wrote the version: the agent, or the user through a save or restore.
    - `version` integer, required

## Other responses

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

## Changes

- **2026-10-21** `8f160e6183cd`: 4 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 `500`
  - removed the `agent_switch_saga` enum value from the `reporting_owner` response property for the response status `501`
- **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/sync/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)
