---
title: "Update Sync State"
method: PATCH
path: "/api/v1/workspaces/{workspace_id}/sync/state"
tags: ["workspaces"]
---

# Update Sync State

`PATCH /api/v1/workspaces/{workspace_id}/sync/state`

Update sync state after successful upload.

## Path parameters

- `workspace_id` string, required

## Request body

- SyncStateUpdateRequest — Request to update sync state after successful upload.
  - `last_base_ref_sync_ref` string, nullable
  - `last_base_ref_sync_sha` string, nullable
  - `add_synced_head_refs` string[], nullable
  - `add_synced_checkpoints` string[], nullable

## Response `200`

Successful Response

- SyncStateResponse — Current sync state for a workspace.
  - `last_base_ref_sync_at` string, date-time, nullable
  - `last_base_ref_sync_ref` string, nullable
  - `last_base_ref_sync_sha` string, nullable
  - `synced_head_refs` string[], required
  - `synced_checkpoints` string[], required

## Other responses

- `422` — Validation Error

---

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