---
title: "Request Sync"
method: POST
path: "/syncs"
tags: ["Data Management"]
---

# Request Sync

`POST /syncs`

Manually request to sync the current connections data.

By default, Terminal will sync all connections where `syncMode = automatic` on a regular cadence. For customers that may not need a fleet's data to be kept up to date and want to reduce their active tracked trucks, you can set `syncMode = manual` and invoke this endpoint when you want to sync data.

If you're wondering if this is relevent to your use case then feel free to reach out and we'd be happy to assist.

## Headers

- `Connection-Token` string, required

## Request body

- object — How to sync the data. If `startFrom` is not provided, it will either sync from the last time a sync was requested or `now` if the connection has no sync history. Can also provide `days` instead of `startFrom` and it will be converted to a date and used in place of `startFrom`.
  - `startFrom` string, date-time — [ISO 8601](https://www.w3.org/TR/NOTE-datetime) date
  - `days` number — How many days of history to sync from `now`. Will be converted to a date and used in place of `startFrom`
  - `providerRequests` string[] — Request additional information from the provider for this sync.

## Response `201`

Created

- object
  - `id` string, ulid, required
  - `status` 'requested' | 'in_progress' | 'completed' | 'failed', required — The status of the sync
  - `failureReason` string — If the sync failed, this will contain the reason
  - `progress` number — Percentage value between 0 and 100, rounded to 2 decimal places.
  - `issues` union[] — Issues are problems encountered with a connection that did not result in a failed sync but may require manual intervention. You can see the issues for a given sync by providing `issues` to the `expand` parameter.
    - union — Entities in Terminal are expandable. Using the `expand` query parameter you can choose to ingest just an ID or the full entity details.
      - string, ulid
      - object
        - `id` string, ulid, required
  - `startFrom` string, date-time — [ISO 8601](https://www.w3.org/TR/NOTE-datetime) date
  - `requestedAt` string, date-time, required — [ISO 8601](https://www.w3.org/TR/NOTE-datetime) date
  - `completedAt` string, date-time — [ISO 8601](https://www.w3.org/TR/NOTE-datetime) date
  - `attempts` number
  - `providerRequests` string[] — Provider requests attached to this sync. When non-empty, the sync is waiting on an out-of-band step on the provider's side (e.g. the provider manually delivering historical files, or credentials being provisioned) and may legitimately stay in progress for an extended period.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `409` — Conflict
- `429` — Too Many Requests
- `500` — Internal Server Error
- `504` — Gateway Timeout Error

---

[API](https://skmtc.dev/withterminal/apis/terminal-telematics-api.md) · [All operations](https://skmtc.dev/withterminal/apis/terminal-telematics-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/withterminal/terminal-telematics-api/revisions/90249c4a1739/schema)
