---
title: "Sync"
method: POST
path: "/api/py/files/sync"
---

# Sync

`POST /api/py/files/sync`

Handle TipTap collaboration webhook events by persisting document content
changes to Supabase and updating source citation references.

Skips processing for non-DOCUMENT types, empty content, and content that
is identical to the current version (avoiding unnecessary writes). Emits
structured ``[files-sync]`` lifecycle logs with timing for observability.

## Request body

- TiptapWebhookRequest
  - `app_name` string, required
  - `name` string, required
  - `time` string, required
  - `tiptap_json` object
  - `ydoc_state` string, nullable
  - `clients_count` integer
  - `type` string, nullable
  - `trigger` string, nullable
  - `users` string[], nullable
  - `user` string, nullable
  - `thread` union
    - object
    - unknown[]
      - unknown
  - `comment` object, nullable

## Response `200`

Successful Response

- TiptapWebhookResponse
  - `success` boolean, required
  - `version_id` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/getauctor/apis/fastapi.md) · [All operations](https://skmtc.dev/getauctor/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/getauctor/fastapi/revisions/aeb6faa3b8f0/schema)
