---
title: "Create or upgrade a synced link"
method: POST
path: "/connectors/v1/sync-link"
tags: ["Connectors"]
---

# Create or upgrade a synced link

`POST /connectors/v1/sync-link`

## Request

- Base URL: `https://api.case.dev`
- URL: `https://api.case.dev/connectors/v1/sync-link`
- Auth: HTTP bearer

Standing promise: backfill now, then stay current (the sync sweeper re-runs synced links on a schedule). Direction both creates paired import/export links and defaults export to a CaseMark Output subfolder. Same body as /transfer minus run_mode. Upserts links by (connection_id, direction, remote, vault_id); existing once-links are upgraded in place with their ledger and cursor preserved. Downgrade or pause via PATCH /links/{id}.

## Headers

- `x-case-connector-subject` string

## Request body

- object
  - `direction` 'import' | 'export' | 'both', required
  - `connection_id` string, required
  - `remote` object, required
    - `site_id` string
    - `container_id` string
    - `folder_id` string, required
    - `path` string
    - `resource_type` string
  - `export_destination` object: Optional destination for direction both. Defaults to CaseMark Output under remote.
    - `site_id` string
    - `container_id` string
    - `folder_id` string, required
    - `path` string
  - `vault_id` string, required
  - `matter_id` string, nullable
  - `policy` object
    - `deletes` 'mirror' | 'preserve'
    - `collisions` 'version' | 'overwrite' | 'skip'
    - `filters` object
      - `max_size_bytes` integer
      - `exclude_mime` string[]
      - `exclude_folder_ids` string[]: Skip these folders and all descendants during document imports.
      - `exclude_file_ids` string[]: Skip these stable document ids before download, including future versions.

## Response `201`

Synced link created/upgraded; backfill or incremental run in progress

- object
  - `links` object[]
  - `runs` object[]: Start result for each link when direction is both.
    - `link_id` string, required
    - `started` boolean, required
    - `reason` 'stale_run_recovery' | 'already_running' | 'ingestion_backlog'
    - `backlog` integer
  - `run` object: Whether a provider scan started or was deferred.
    - `started` boolean, required
    - `reason` 'stale_run_recovery' | 'already_running' | 'ingestion_backlog'
    - `backlog` integer

## Other responses

- `400`: Invalid payload
- `401`: Invalid API key
- `403`: Insufficient permissions or provider does not support export
- `404`: Connection or vault not found
- `409`: Connection is not ready, import selection conflicts, or Smokeball is at capacity. data.error.code=connection_capacity means retry after an active import finishes; connection_not_ready means reconnect.

## Changes

- **2026-10-16** `a21d188f4b21`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/casemark/apis/case-dev-api/changes/connectors/v1/sync-link/post.md)

---

[API](https://skmtc.dev/casemark/apis/case-dev-api.md) - [All operations](https://skmtc.dev/casemark/apis/case-dev-api/llms.txt) - [OpenAPI document](https://skmtc.dev/casemark/apis/case-dev-api/revisions/9a3245c00044?raw)
