Model Sync

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. An empty or omitted policies list leaves the sync's current policies unchanged.

To make a partial change — for example, toggling active or adjusting a single field mapping — fetch the current sync with GET /api/syncs/{id}, 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.

put/api/syncs/{id}

Request

  • Base URL
    https://app.polytomic.com
  • Auth
    • HTTP bearer
    • or HTTP basic

Path parameters

idstring uuid required

Model sync ID

Example:248df4b7-aa70-47b8-a036-33ac447e668d

Headers

X-Polytomic-Versionstring

Request body

activeboolean

Whether the sync is enabled and scheduled

encryption_passphrasestring

Passphrase for encrypting the sync data

filter_logicstring

Deprecated. Use 'model_filters.logic'. Combines the model filters in 'filters' only.

mode'create' | 'update' | 'updateOrCreate' | 'replace' | 'append' | 'remove' | 'snapshot' required
namestring required

Name of the model sync

only_enrich_updatesboolean

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_idstring uuid nullable

Ignored for user and organization-scoped API keys, which always act in their own organization

policiesstring[] nullable

Permissions policy IDs applied to the sync. On update, a non-empty list replaces the sync's policies and an empty or omitted list leaves them unchanged.

skip_initial_backfillboolean

Whether to skip the initial backfill of records; if true only records seen after the sync is enabled will be synced.

sync_all_recordsboolean

Whether to sync all records from the source, regardless of whether they've changed since the previous execution

Example request

{
  "active": true,
  "fields": [
    {
      "override_value": "fixed_value",
      "source": {
        "field": "id",
        "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
      },
      "sync_mode": "create",
      "target": "name"
    }
  ],
  "filter_logic": "A and B or C",
  "filters": [
    {
      "field": {
        "field": "id",
        "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
      },
      "field_id": "field1",
      "label": "A",
      "value": "value",
      "value_field": {
        "field": "id",
        "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
      }
    }
  ],
  "identities": {
    "mappings": [
      {
        "remote_field_type_id": "string",
        "source": {
          "field": "id",
          "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
        },
        "target": "name"
      }
    ],
    "strategy": "priority"
  },
  "identity": {
    "remote_field_type_id": "string",
    "source": {
      "field": "id",
      "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
    },
    "target": "name"
  },
  "model_filters": {
    "conditions": [
      {
        "label": "A",
        "source": {
          "field": "id",
          "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
        },
        "value": "value"
      }
    ],
    "logic": "A and B or C"
  },
  "name": "Users Sync",
  "organization_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
  "override_fields": [
    {
      "override_value": "fixed_value",
      "source": {
        "field": "id",
        "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
      },
      "sync_mode": "create",
      "target": "name"
    }
  ],
  "overrides": [
    {
      "field": {
        "field": "id",
        "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
      },
      "field_id": "field1",
      "override": "new_value",
      "value": "value"
    }
  ],
  "policies": [
    "248df4b7-aa70-47b8-a036-33ac447e668d"
  ],
  "schedule": {
    "connection_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
    "day_of_month": "1",
    "day_of_week": "1",
    "hour": "12",
    "minute": "30",
    "month": "1",
    "run_after": {
      "bulk_sync_ids": [
        "248df4b7-aa70-47b8-a036-33ac447e668d"
      ],
      "sync_ids": [
        "248df4b7-aa70-47b8-a036-33ac447e668d"
      ]
    }
  },
  "target": {
    "configuration": {
      "key": "value"
    },
    "connection_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
    "create": {
      "name": "value"
    },
    "object": "Users",
    "search_values": {
      "name": "value"
    }
  },
  "target_filters": {
    "conditions": [
      {
        "field": "Email",
        "label": "A",
        "value": "value",
        "value_source": {
          "field": "id",
          "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
        }
      }
    ],
    "logic": "A and B"
  }
}

Response

OK

Example response

{
  "data": {
    "active": true,
    "created_by": {
      "id": "12345678-1234-1234-1234-123456789012",
      "name": "John Doe",
      "type": "user"
    },
    "fields": [
      {
        "override_value": "fixed_value",
        "source": {
          "field": "id",
          "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
        },
        "sync_mode": "create",
        "target": "name"
      }
    ],
    "filters": [
      {
        "field": {
          "field": "id",
          "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
        },
        "field_id": "field1",
        "label": "A",
        "value": "value",
        "value_field": {
          "field": "id",
          "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
        }
      }
    ],
    "id": "248df4b7-aa70-47b8-a036-33ac447e668d",
    "identities": {
      "mappings": [
        {
          "remote_field_type_id": "string",
          "source": {
            "field": "id",
            "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
          },
          "target": "name"
        }
      ],
      "strategy": "priority"
    },
    "identity": {
      "remote_field_type_id": "string",
      "source": {
        "field": "id",
        "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
      },
      "target": "name"
    },
    "model_filters": {
      "conditions": [
        {
          "label": "A",
          "source": {
            "field": "id",
            "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
          },
          "value": "value"
        }
      ],
      "logic": "A and B or C"
    },
    "name": "Users Sync",
    "organization_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
    "override_fields": [
      {
        "override_value": "fixed_value",
        "sync_mode": "create",
        "target": "name"
      }
    ],
    "overrides": [
      {
        "field": {
          "field": "id",
          "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
        },
        "field_id": "field1",
        "override": "new_value",
        "value": "value"
      }
    ],
    "policies": [
      "248df4b7-aa70-47b8-a036-33ac447e668d"
    ],
    "problems": [
      {
        "code": "unknown_target_field",
        "path": "target_filters.conditions[1].field",
        "severity": "error"
      }
    ],
    "schedule": {
      "connection_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
      "day_of_month": "1",
      "day_of_week": "1",
      "hour": "12",
      "minute": "30",
      "month": "1",
      "run_after": {
        "bulk_sync_ids": [
          "248df4b7-aa70-47b8-a036-33ac447e668d"
        ],
        "sync_ids": [
          "248df4b7-aa70-47b8-a036-33ac447e668d"
        ]
      }
    },
    "target": {
      "configuration": {
        "key": "value"
      },
      "connection_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
      "create": {
        "name": "value"
      },
      "object": "Users",
      "search_values": {
        "name": "value"
      }
    },
    "target_filters": {
      "conditions": [
        {
          "field": "Email",
          "label": "A",
          "value": "value",
          "value_source": {
            "field": "id",
            "model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
          }
        }
      ],
      "logic": "A and B"
    },
    "updated_by": {
      "id": "12345678-1234-1234-1234-123456789012",
      "name": "John Doe",
      "type": "user"
    }
  }
}

Changes

    • breaking

      added to the // request property allOf list

    • breaking

      added to the // request property allOf list

    • breaking

      added to the // request property allOf list

    • breaking

      added to the request property allOf list

    • breaking

      added to the request property allOf list

    • breaking

      added to the request property allOf list

    • breaking

      added to the request property allOf list

    • breaking

      added to the //// request property allOf list

    • breaking

      added to the // request property allOf list

    • breaking

      added to the // request property allOf list

    • breaking

      added to the // request property allOf list

    • breaking

      added to the //// request property allOf list

    • breaking

      added to the // request property allOf list

    • breaking

      added to the // request property allOf list

    • breaking

      added to the request property allOf list

    • breaking

      removed the enum value ArrayContains of the request property //

    • breaking

      removed the enum value ArrayContains of the request property //

    • breaking

      removed the enum value ArrayDoesNotContain of the request property //

    • breaking

      removed the enum value ArrayDoesNotContain of the request property //

    • breaking

      removed the enum value Between of the request property //

    • breaking

      removed the enum value Between of the request property //

    • breaking

      removed the enum value DomainMatch of the request property ////

    • breaking

      removed the enum value DomainMatch of the request property //

    • breaking

      removed the enum value Equality of the request property //

    • breaking

      removed the enum value Equality of the request property ////

    • breaking

      removed the enum value Equality of the request property //

    • breaking

      removed the enum value Equality of the request property //

    • breaking

      removed the enum value False of the request property //

    • breaking

      removed the enum value False of the request property //

    • breaking

      removed the enum value GreaterThan of the request property //

    • breaking

      removed the enum value GreaterThan of the request property //

    • breaking

      removed the enum value GreaterThanEqual of the request property //

    • breaking

      removed the enum value GreaterThanEqual of the request property //

    • breaking

      removed the enum value HostnameMatch of the request property ////

    • breaking

      removed the enum value HostnameMatch of the request property //

    • breaking

      removed the enum value ISubstring of the request property ////

    • breaking

      removed the enum value ISubstring of the request property //

    • breaking

      removed the enum value InTheLast of the request property //

    • breaking

      removed the enum value InTheLast of the request property //

    • breaking

      removed the enum value Inequality of the request property //

    • breaking

      removed the enum value Inequality of the request property //

    • breaking

      removed the enum value IsNotNull of the request property //

    • breaking

      removed the enum value IsNotNull of the request property //

    • breaking

      removed the enum value IsNull of the request property //

    • breaking

      removed the enum value IsNull of the request property //

    • breaking

      removed the enum value LessThan of the request property //

    • breaking

      removed the enum value LessThan of the request property //

    • breaking

      removed the enum value LessThanEqual of the request property //

    • breaking

      removed the enum value LessThanEqual of the request property //

    • breaking

      removed the enum value Model of the request property //

    • breaking

      removed the enum value OnOrAfter of the request property //

    • breaking

      removed the enum value OnOrAfter of the request property //

    • breaking

      removed the enum value OnOrBefore of the request property //

    • breaking

      removed the enum value OnOrBefore of the request property //

    • breaking

      removed the enum value OneOf of the request property ////

    • breaking

      removed the enum value OneOf of the request property //

    • breaking

      removed the enum value RelativeOnOrAfter of the request property //

    • breaking

      removed the enum value RelativeOnOrAfter of the request property //

    • breaking

      removed the enum value RelativeOnOrBefore of the request property //

    • breaking

      removed the enum value RelativeOnOrBefore of the request property //

    • breaking

      removed the enum value StringContains of the request property //

    • breaking

      removed the enum value StringContains of the request property //

    • breaking

      removed the enum value StringDoesNotContain of the request property //

    • breaking

      removed the enum value StringDoesNotContain of the request property //

    • breaking

      removed the enum value StringDoesNotEndWith of the request property //

    • breaking

      removed the enum value StringDoesNotEndWith of the request property //

    • breaking

      removed the enum value StringDoesNotStartWith of the request property //

    • breaking

      removed the enum value StringDoesNotStartWith of the request property //

    • breaking

      removed the enum value StringEndsWith of the request property //

    • breaking

      removed the enum value StringEndsWith of the request property //

    • breaking

      removed the enum value StringLike of the request property //

    • breaking

      removed the enum value StringLike of the request property //

    • breaking

      removed the enum value StringMatchesTrimmed of the request property //

    • breaking

      removed the enum value StringMatchesTrimmed of the request property //

    • breaking

      removed the enum value StringNotLike of the request property //

    • breaking

      removed the enum value StringNotLike of the request property //

    • breaking

      removed the enum value StringNotOneOf of the request property //

    • breaking

      removed the enum value StringNotOneOf of the request property //

    • breaking

      removed the enum value StringOneOf of the request property //

    • breaking

      removed the enum value StringOneOf of the request property //

    • breaking

      removed the enum value StringStartsWith of the request property //

    • breaking

      removed the enum value StringStartsWith of the request property //

    • breaking

      removed the enum value Target of the request property //

    • breaking

      removed the enum value True of the request property //

    • breaking

      removed the enum value True of the request property //

    • breaking

      removed the enum value append of the request property

    • breaking

      removed the enum value create of the request property

    • breaking

      removed the enum value remove of the request property

    • breaking

      removed the enum value replace of the request property

    • breaking

      removed the enum value snapshot of the request property

    • breaking

      removed the enum value update of the request property

    • breaking

      removed the enum value updateOrCreate of the request property

    • breaking

      the // request property type changed from object to no type

    • breaking

      the // request property type changed from object to no type

    • breaking

      the // request property type changed from string to no type

    • breaking

      the // request property type changed from string to no type

    • breaking

      the //// request property type changed from string to no type

    • breaking

      the //// request property type changed from object to no type

    • breaking

      the // request property type changed from string to no type

    • breaking

      the // request property type changed from object to no type

    • breaking

      the request property type changed from string to no type

    • breaking

      the request property type changed from object to no type

    • breaking

      the // request property type changed from object to no type

    • breaking

      the // request property type changed from string to no type

    • breaking

      the request property type changed from object to no type

    • breaking

      the request property type changed from object to no type

    • breaking

      the request property type changed from object to no type

    • breaking

      the response's property type changed from object to no type for status

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property /////

    • warning

      removed the request property /////

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property ///

    • warning

      removed the request property ///

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • info

      added to the response property allOf list for the response status

    • breaking

      added to the request property allOf list

    • breaking

      the request property type changed from object to no type

    • breaking

      the / response's property type changed from object to no type for status

    • breaking

      removed the required property // from the response with the status

    • breaking

      removed the required property // from the response with the status

    • breaking

      removed the required property // from the response with the status

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the request property /

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • info

      added the new optional request property

    • info

      added the optional property / to the response with the status

    • info

      added to the / response property allOf list for the response status