---
title: "Sync Hospital Data"
method: POST
path: "/api/v1/sync"
tags: ["hospital", "hospital-sync"]
---

# Sync Hospital Data

`POST /api/v1/sync`

Sync hospital data (doctors, departments, specialities, locations) from external API to pgvector.

This endpoint fetches data from the hospital API and stores it in the
structured_entities table with vector embeddings for semantic search.

Now uses the new sync system with history tracking and config updates.

## Request body

- SyncRequest
  - `workspace_id` union, required
    - string
    - integer
  - `sync_doctors` boolean
  - `sync_departments` boolean
  - `sync_specialities` boolean
  - `sync_locations` boolean
  - `force_update` boolean

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/outcallerai/apis/fastapi.md) · [All operations](https://skmtc.net/outcallerai/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/outcallerai/fastapi/revisions/a57f684e7966/schema)
