Skip to navigation

Create Sync

Creates a new model sync.

Create a new sync from one or more models to a destination.

All of the functionality described in the product documentation is configurable via the API.

Guides:

Targets (Destinations)

Polytomic refers to a model sync’s destination as the “target object”, or target. Target objects are identified by a connection ID and an object ID.

The target object in the request specifies information about the sync destination.

"target": {
"connection_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
"object": "Users",
},

Some connections support additional configuration for targets. For example, Salesforce connections support optionally specifying the ingestion API to use. The target specific options are passed as configuration; consult the integration guides for details about specific connection configurations.

Creating a new target

Some integrations support creating a new target when creating a model sync. For example, an ad audience or database table.

When creating a new target, object is omitted and create is specified instead. The create property is an object containing integration specific configuration for the new target.

"target": {
"connection_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
"create": {
"name": "New audience",
"type": "user_audience"
}
},

Authentication

AuthorizationBasic

This is the Polytomic deployment key (on-premises only)

OR
AuthorizationBearer
This is the Polytomic API key

Headers

X-Polytomic-VersionstringRequired

Request

This endpoint expects an object.
fieldslist of objectsRequired
Fields to sync from source to destination
modeenumRequired
namestringRequired
scheduleobjectRequired
Sync schedule. Schedule times are interpreted in UTC.
targetobjectRequired
Sync destination configuration
activebooleanOptional
Whether the sync is enabled and scheduled
encryption_passphrasestringOptional
Passphrase for encrypting the sync data
filter_logicstringOptional

Logical expression combining this sync’s model filters — the entries in ‘filters’ whose ‘field_type’ is ‘Model’ — by their labels. The operators are not case-sensitive but the labels are, and the expression has to name every model filter at least once — a filter may be repeated, as in ‘(A and B) or (A and C)’ — and an expression which leaves one out is rejected. Target filters are combined by ‘target.filter_logic’.

filterslist of objects or nullOptional

Filters on this sync. The array holds both filters on the records read from the source and filters on the records written to the destination; a filter’s ‘field_type’ says which it is.

identityobjectOptional

Identity mapping for the sync; this determines how records are matched between source and destination.

only_enrich_updatesbooleanOptional
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 or nullOptionalformat: "uuid"

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

override_fieldslist of objects or nullOptional
Target fields which are set to a fixed value for every record, rather than mapped from a model field
overrideslist of objects or nullOptional
Conditional value replacement for fields
policieslist of strings or nullOptional
skip_initial_backfillbooleanOptional

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

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

Response

OK
dataobjectOptional

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
422
Unprocessable Entity Error
500
Internal Server Error