v1
latestOpenAPI 3.0.32026-08-06138294578.6 KBCreate 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:
- Model sync (Reverse ETL) from Snowflake query to Salesforce
- Joined model sync from Postgres, Airtable, and Stripe to Hubspot
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. You can retrieve a list of all target objects for a connection using the Get Target Objects endpoint.
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"
}
},
The Get Target List endpoint returns information about whether a connection supports target creation.
Headers
Request body
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"
}
],
"identity": {
"remote_field_type_id": "string",
"source": {
"field": "id",
"model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
},
"target": "name"
},
"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": "monday",
"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"
}
}
}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"
}
],
"id": "248df4b7-aa70-47b8-a036-33ac447e668d",
"identity": {
"remote_field_type_id": "string",
"source": {
"field": "id",
"model_id": "248df4b7-aa70-47b8-a036-33ac447e668d"
},
"target": "name"
},
"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"
],
"schedule": {
"connection_id": "248df4b7-aa70-47b8-a036-33ac447e668d",
"day_of_month": "1",
"day_of_week": "monday",
"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"
}
},
"updated_by": {
"id": "12345678-1234-1234-1234-123456789012",
"name": "John Doe",
"type": "user"
}
}
}