---
title: "Update Sync"
method: PUT
path: "/api/syncs/{id}"
tags: ["Model Sync"]
---

# Update Sync

`PUT /api/syncs/{id}`

Updates a model sync's configuration.

Updating a model sync is a **full replacement** of the sync's configuration.
Every field in the request body is written to the sync; any field you omit is
cleared or reset to its default value.

To make a partial change — for example, toggling `active` or adjusting a
single field mapping — fetch the current sync with
[`GET /api/syncs/{id}`](../../../api-reference/model-sync/get),
modify the fields you want to change, and send the complete object back in
the update request.

Updates to `active`, `schedule`, and `policies` take effect immediately.
Changes to source fields, target configuration, filters, or field mappings
take effect on the sync's next execution.

## Path parameters

- `id` string, uuid, required

## Headers

- `X-Polytomic-Version` string

## Request body

- UpdateSyncRequest
  - `active` boolean — Whether the sync is enabled and scheduled.
  - `encryption_passphrase` string — Passphrase for encrypting the sync data.
  - `fields` SyncField[], required — Fields to sync from source to destination.
    - `encryption_enabled` boolean — Whether the field should be encrypted.
    - `new` boolean — New is set to true if the target field should be created by Polytomic. This is not supported by all backends.
    - `override_value` string — Value to set in the target field; a mapping with an override value and no source is stored as an override field.
    - `source` Source
      - `field` string, required
      - `model_id` string, uuid, required
    - `sync_mode` string — Sync mode for the field; defaults to 'updateOrCreate'. If set to 'create', the field will not be synced if it already has a value. This is not supported by all backends.
    - `target` string, required — Target field ID the source field value will be written to.
  - `filter_logic` string — Logical expression to combine filters.
  - `filters` Filter[], nullable — Filters to apply to the source data.
    - `field` Source
      - `field` string, required
      - `model_id` string, uuid, required
    - `field_id` string — Model or Target field name to filter on.
    - `field_type` 'Model' | 'Target'
    - `function` 'Equality' | 'Inequality' | 'IsNull' | 'IsNotNull' | 'True' | 'False' | 'OnOrAfter' | 'OnOrBefore' | 'GreaterThan' | 'GreaterThanEqual' | 'LessThan' | 'LessThanEqual' | 'StringContains' | 'StringStartsWith' | 'StringEndsWith' | 'StringDoesNotContain' | 'StringDoesNotStartWith' | 'StringDoesNotEndWith' | 'StringOneOf' | 'StringNotOneOf' | 'Between' | 'ArrayContains' | 'ArrayDoesNotContain' | 'InTheLast' | 'RelativeOnOrBefore' | 'RelativeOnOrAfter' | 'StringLike' | 'StringNotLike' | 'StringMatchesTrimmed', required
    - `label` string
    - `value` string
  - `identity` Identity
    - `function` 'Equality' | 'ISubstring' | 'OneOf' | 'DomainMatch' | 'HostnameMatch', required
    - `new_field` boolean
    - `remote_field_type_id` string, nullable
    - `source` Source, required
      - `field` string, required
      - `model_id` string, uuid, required
    - `target` string, required
  - `mode` 'create' | 'update' | 'updateOrCreate' | 'replace' | 'append' | 'remove' | 'snapshot', required
  - `name` string, required
  - `only_enrich_updates` boolean — Whether to use enrichment models as a source of possible changes to sync. If true, only changes to the base models will cause a record to sync.
  - `organization_id` string, uuid, nullable — Organization ID for the sync; read-only with a partner key.
  - `override_fields` OverrideFieldInput[], nullable — Target fields which are set to a fixed value for every record, rather than mapped from a model field.
    - `encryption_enabled` boolean — Deprecated. Encryption is ignored for override fields.
    - `new` boolean — New is set to true if the target field should be created by Polytomic. This is not supported by all backends.
    - `override_value` string — Value written to the target field for every record; required unless a source is provided.
    - `source` Source
      - `field` string, required
      - `model_id` string, uuid, required
    - `sync_mode` string — Sync mode for the field; defaults to 'updateOrCreate'. If set to 'create', the field will not be synced if it already has a value. This is not supported by all backends.
    - `target` string, required — Target field ID the value will be written to.
  - `overrides` Override[], nullable — Conditional value replacement for fields.
    - `field` Source
      - `field` string, required
      - `model_id` string, uuid, required
    - `field_id` string — Field ID of the model field to override.
    - `function` 'Equality' | 'Inequality' | 'IsNull' | 'IsNotNull' | 'True' | 'False' | 'OnOrAfter' | 'OnOrBefore' | 'GreaterThan' | 'GreaterThanEqual' | 'LessThan' | 'LessThanEqual' | 'StringContains' | 'StringStartsWith' | 'StringEndsWith' | 'StringDoesNotContain' | 'StringDoesNotStartWith' | 'StringDoesNotEndWith' | 'StringOneOf' | 'StringNotOneOf' | 'Between' | 'ArrayContains' | 'ArrayDoesNotContain' | 'InTheLast' | 'RelativeOnOrBefore' | 'RelativeOnOrAfter' | 'StringLike' | 'StringNotLike' | 'StringMatchesTrimmed'
    - `override` string
    - `value` string
  - `policies` string[], nullable
  - `schedule` Schedule, required
    - `connection_id` string, uuid
    - `day_of_month` string, nullable
    - `day_of_week` string, nullable
    - `frequency` 'manual' | 'continuous' | 'hourly' | 'daily' | 'weekly' | 'custom' | 'builder' | 'runafter' | 'multi' | 'dbtcloud'
    - `hour` string, nullable
    - `job_id` integer, nullable
    - `minute` string, nullable
    - `month` string, nullable
    - `run_after` RunAfter
      - `bulk_sync_ids` string[]
      - `sync_ids` string[]
    - `run_after_success_only` boolean, nullable — If true, the sync will only run if the dependent syncs completed successfully.
  - `skip_initial_backfill` boolean — Whether to skip the initial backfill of records; if true only records seen after the sync is enabled will be synced.
  - `sync_all_records` boolean — Whether to sync all records from the source, regardless of whether they've changed since the previous execution.
  - `target` Target, required
    - `configuration` object
    - `connection_id` string, uuid, required
    - `create` object — Create a new target object with these properties.
    - `filter_logic` string
    - `new_name` string — Name for a new target object.
    - `object` string
    - `search_values` object

## Response `200`

OK

- SyncResponseEnvelope
  - `data` SyncResponse
    - `active` boolean
    - `created_at` string, date-time
    - `created_by` OutputActor
      - `id` string, uuid
      - `name` string
      - `type` string
    - `encryption_passphrase` string
    - `fields` SyncField[]
      - `encryption_enabled` boolean — Whether the field should be encrypted.
      - `new` boolean — New is set to true if the target field should be created by Polytomic. This is not supported by all backends.
      - `override_value` string — Value to set in the target field; a mapping with an override value and no source is stored as an override field.
      - `source` Source
        - `field` string, required
        - `model_id` string, uuid, required
      - `sync_mode` string — Sync mode for the field; defaults to 'updateOrCreate'. If set to 'create', the field will not be synced if it already has a value. This is not supported by all backends.
      - `target` string, required — Target field ID the source field value will be written to.
    - `filter_logic` string
    - `filters` Filter[]
      - `field` Source
        - `field` string, required
        - `model_id` string, uuid, required
      - `field_id` string — Model or Target field name to filter on.
      - `field_type` 'Model' | 'Target'
      - `function` 'Equality' | 'Inequality' | 'IsNull' | 'IsNotNull' | 'True' | 'False' | 'OnOrAfter' | 'OnOrBefore' | 'GreaterThan' | 'GreaterThanEqual' | 'LessThan' | 'LessThanEqual' | 'StringContains' | 'StringStartsWith' | 'StringEndsWith' | 'StringDoesNotContain' | 'StringDoesNotStartWith' | 'StringDoesNotEndWith' | 'StringOneOf' | 'StringNotOneOf' | 'Between' | 'ArrayContains' | 'ArrayDoesNotContain' | 'InTheLast' | 'RelativeOnOrBefore' | 'RelativeOnOrAfter' | 'StringLike' | 'StringNotLike' | 'StringMatchesTrimmed', required
      - `label` string
      - `value` string
    - `id` string, uuid
    - `identity` Identity
      - `function` 'Equality' | 'ISubstring' | 'OneOf' | 'DomainMatch' | 'HostnameMatch', required
      - `new_field` boolean
      - `remote_field_type_id` string, nullable
      - `source` Source, required
        - `field` string, required
        - `model_id` string, uuid, required
      - `target` string, required
    - `mode` 'create' | 'update' | 'updateOrCreate' | 'replace' | 'append' | 'remove' | 'snapshot'
    - `model_ids` string[] — Model IDs used in the sync.
    - `name` string
    - `only_enrich_updates` boolean
    - `organization_id` string, uuid
    - `override_fields` OverrideField[]
      - `new` boolean — New is set to true if the target field should be created by Polytomic. This is not supported by all backends.
      - `override_value` string, required — Value written to the target field for every record.
      - `sync_mode` string — Sync mode for the field; defaults to 'updateOrCreate'. If set to 'create', the field will not be synced if it already has a value. This is not supported by all backends.
      - `target` string, required — Target field ID the value will be written to.
    - `overrides` Override[]
      - `field` Source
        - `field` string, required
        - `model_id` string, uuid, required
      - `field_id` string — Field ID of the model field to override.
      - `function` 'Equality' | 'Inequality' | 'IsNull' | 'IsNotNull' | 'True' | 'False' | 'OnOrAfter' | 'OnOrBefore' | 'GreaterThan' | 'GreaterThanEqual' | 'LessThan' | 'LessThanEqual' | 'StringContains' | 'StringStartsWith' | 'StringEndsWith' | 'StringDoesNotContain' | 'StringDoesNotStartWith' | 'StringDoesNotEndWith' | 'StringOneOf' | 'StringNotOneOf' | 'Between' | 'ArrayContains' | 'ArrayDoesNotContain' | 'InTheLast' | 'RelativeOnOrBefore' | 'RelativeOnOrAfter' | 'StringLike' | 'StringNotLike' | 'StringMatchesTrimmed'
      - `override` string
      - `value` string
    - `policies` string[]
    - `schedule` Schedule
      - `connection_id` string, uuid
      - `day_of_month` string, nullable
      - `day_of_week` string, nullable
      - `frequency` 'manual' | 'continuous' | 'hourly' | 'daily' | 'weekly' | 'custom' | 'builder' | 'runafter' | 'multi' | 'dbtcloud'
      - `hour` string, nullable
      - `job_id` integer, nullable
      - `minute` string, nullable
      - `month` string, nullable
      - `run_after` RunAfter
        - `bulk_sync_ids` string[]
        - `sync_ids` string[]
      - `run_after_success_only` boolean, nullable — If true, the sync will only run if the dependent syncs completed successfully.
    - `skip_initial_backfill` boolean
    - `sync_all_records` boolean
    - `target` Target
      - `configuration` object
      - `connection_id` string, uuid, required
      - `create` object — Create a new target object with these properties.
      - `filter_logic` string
      - `new_name` string — Name for a new target object.
      - `object` string
      - `search_values` object
    - `updated_at` string, date-time
    - `updated_by` OutputActor
      - `id` string, uuid
      - `name` string
      - `type` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Unprocessable Entity
- `500` — Internal Server Error

---

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