---
title: "Sync Smartadvocate Cases"
method: POST
path: "/developer/smartadvocate/sync-cases"
tags: ["Developer", "Developer - Integrations"]
---

# Sync Smartadvocate Cases

`POST /developer/smartadvocate/sync-cases`

Trigger a SmartAdvocate sync for the current customer.

This endpoint is restricted to developer users only.
Queues a Celery task that syncs cases, notes, case-contact links,
insurance, firm contacts (with phone enrichment), appointments, and
medical providers from SmartAdvocate (subject to the customer's
SmartAdvocate settings toggles). Runs in the background.

By default a full sync is queued. Pass `days_back` to queue an
incremental sync covering only cases modified in that window.

Returns:
- message: Status message
- task_id: Celery task ID for tracking progress

## Query parameters

- `days_back` integer, nullable

## Response `200`

Successful Response

- SmartAdvocateCaseSyncResponse — Response for triggering SmartAdvocate case sync
  - `message` string, required — Status message
  - `task_id` string, nullable — Celery task ID for tracking (if async)
  - `run_id` string, nullable — Sync run ID (set when resuming an existing run; new runs are created asynchronously — poll GET sync-runs)

## Other responses

- `422` — Validation Error

---

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