---
title: "Update Sync"
method: PATCH
path: "/syncs/{syncId}"
---

# Update Sync

`PATCH /syncs/{syncId}`

Update an existing sync

Patch a sync based on its Hightouch ID

## Path parameters

- `syncId` number, double, required

## Request body

- SyncUpdate — The input for updating a Sync
  - `configuration` object — The sync's configuration. This specifies how data is mapped, among other configuration. The schema depends on the destination type. Consumers should NOT make assumptions on the contents of the configuration. It may change as Hightouch updates its internal code.
  - `schedule` object, nullable — The scheduling configuration. It can be triggered based on several ways: Interval: the sync will be triggered based on certain interval(minutes/hours/days/weeks) Cron: the sync will be triggered based on cron expression https://en.wikipedia.org/wiki/Cron. Visual: the sync will be triggered based a visual cron configuration on UI DBT-cloud: the sync will be triggered based on a dbt cloud job
    - `schedule` union, required
      - IntervalSchedule
        - `interval` Interval, required
          - `unit` 'minute' | 'hour' | 'day' | 'week', required
          - `quantity` number, double, required
      - CronSchedule
        - `expression` string, required
      - VisualCronSchedule
        - `expressions` object[], required
          - `days` RecordDayBooleanOrUndefined, required — Construct a type with a set of properties K of type T
            - `monday` boolean
            - `tuesday` boolean
            - `wednesday` boolean
            - `thursday` boolean
            - `friday` boolean
            - `saturday` boolean
            - `sunday` boolean
          - `time` string, required
      - DBTSchedule
        - `account` object, required
          - `id` string, required
        - `job` object, required
          - `id` string, required
    - `type` string, required
  - `disabled` boolean — Whether the sync has been disabled by the user.

## Response `200`

Ok

- union
  - Sync — Syncs define how data from models are mapped to destinations. Each time a sync runs, Hightouch calculates the rows that have changed since the last run, and syncs them to Sync's destination.
    - `id` number, double, required — The sync's id
    - `slug` string, required — The sync's slug
    - `workspaceId` number, double, required — The id of the workspace that the sync belongs to
    - `createdAt` string, date-time, required — The timestamp when the sync was created
    - `updatedAt` string, date-time, required — The timestamp when the sync was last updated
    - `destinationId` number, double, required — The id of the Destination that sync is connected to
    - `modelId` number, double, required — The id of the Model that sync is connected to
    - `configuration` object, required — The sync's configuration. This specifies how data is mapped, among other configuration. The schema depends on the destination type. Consumers should NOT make assumptions on the contents of the configuration. It may change as Hightouch updates its internal code.
    - `schedule` object, nullable, required — The scheduling configuration. It can be triggered based on several ways: Interval: the sync will be triggered based on certain interval(minutes/hours/days/weeks) Cron: the sync will be triggered based on cron expression https://en.wikipedia.org/wiki/Cron. Visual: the sync will be triggered based a visual cron configuration on UI DBT-cloud: the sync will be triggered based on a dbt cloud job
      - `schedule` union, required
        - IntervalSchedule
          - `interval` Interval, required
            - `unit` 'minute' | 'hour' | 'day' | 'week', required
            - `quantity` number, double, required
        - CronSchedule
          - `expression` string, required
        - VisualCronSchedule
          - `expressions` object[], required
            - `days` RecordDayBooleanOrUndefined, required — Construct a type with a set of properties K of type T
              - …
            - `time` string, required
        - DBTSchedule
          - `account` object, required
            - `id` string, required
          - `job` object, required
            - `id` string, required
      - `type` string, required
    - `status` 'disabled' | 'pending' | 'cancelled' | 'failed' | 'queued' | 'success' | 'warning' | 'querying' | 'processing' | 'reporting' | 'interrupted', required — SyncStatus
    - `disabled` boolean, required — Whether the sync has been disabled by the user.
    - `lastRunAt` string, date-time, nullable, required — The timestamp of the last sync run
    - `referencedColumns` string[], required — The reference column that sync depends on to sync data from source
    - `primaryKey` string, required — The primary key that sync uses to identify data from source
    - `externalSegment` object, required — The user facing ID for any created lists or audiences in the sync destination
      - `id` string
    - `tags` object, required — The tags of the sync
  - ValidateErrorJSON
    - `message` 'Validation failed', required
    - `details` object, required
  - 'Internal Server Error'

## Other responses

- `401` — Unauthorized
- `404` — Not found
- `422` — Validation Failed
- `500` — Something went wrong

---

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