---
title: "Complete Sync Operation"
method: POST
path: "/filesystems/{filesystem_id}/sync-complete"
tags: ["Filesystems"]
---

# Complete Sync Operation

`POST /filesystems/{filesystem_id}/sync-complete`

Notify that a sync operation completed and provide the file manifest.

## Path parameters

- `filesystem_id` string, required

## Request body

- SyncCompleteRequest — Request model for completing a sync operation.
  - `archive_checksum` string, nullable — SHA256 checksum of the archive.
  - `archive_size_bytes` integer, nullable — Size of the archive in bytes.
  - `direction` string, required — Sync direction: 'UP' or 'DOWN'.
  - `files` FilesystemFile[], nullable — List of files in the filesystem (empty if status is FAILED).
    - `checksum` string, nullable — SHA256 checksum (None for directories).
    - `content` string, nullable — File contents (None for binary/large files).
    - `content_truncated` boolean — True if content was truncated due to size.
    - `is_binary` boolean — True if file is binary.
    - `is_directory` boolean — Whether this entry is a directory.
    - `mime_type` string, nullable — MIME type (None for directories).
    - `modified_at` string, date-time, required — File's last modification time.
    - `path` string, required — Relative path within filesystem (e.g., 'src/index.ts').
    - `size_bytes` integer, nullable — File size in bytes (None for directories).
  - `status` string, required — Sync status: 'SUCCESS' or 'FAILED'.
  - `sync_id` string, required — Unique ID for this sync operation (idempotency key).

## Response `200`

Successful Response

- SyncCompleteResponse — Response model for sync-complete operation.
  - `files_count` integer, required — Number of files processed.
  - `filesystem_id` string, required — The filesystem ID.
  - `status` string, required — Result status: 'COMPLETED' or 'ALREADY_PROCESSED'.
  - `sync_id` string, required — The sync operation ID (for idempotency).

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/terminaluse/apis/sb0-api.md) · [All operations](https://skmtc.net/terminaluse/apis/sb0-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/terminaluse/sb0-api/versions/f24a474dc415/schema)
