---
title: "Sync Connection"
method: POST
path: "/connections/sync"
tags: ["Auth"]
---

# Sync Connection

`POST /connections/sync`

Manually trigger a sync for the connection associated with your access token.

Note - this does not sync historical data. Rather, it syncs data from the last sync time to the current time. To sync historical data, use the on-demand syncs endpoint.

## Headers

- `x-trackstar-api-key` string, required
- `x-trackstar-access-token` string, required

## Request body

- ConnectionResourceSyncSchema
  - `functions_to_sync` string[] — The specific functions to force sync. Make sure to use one compatible with the connection's type.

## Response `200`

Successful response

- SyncConnectionResponseSchema
  - `id` string, required — The id of the connection synced.
  - `syncing` boolean, required — Whether or not the connection is syncing.
  - `functions_to_sync` string[], required — The functions that are being synced. Returns empty if all are being synced.

## Other responses

- `422` — Validation error

---

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