Skip to main content
POST
Create Sync

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

The input for creating a Sync.

A sync either owns its configuration (destinationId and configuration are required) or is created from a sync template (syncTemplateId is required, configuration must be omitted and this sync's own values go in syncTemplateOverrides).

slug
string
required

The sync's slug

modelId
number<double>
required

The id of the Model that sync is connected to

schedule
object | null
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

Match Booster (type "match_booster"): the sync will be triggered after each Match Booster enrichment run of its model completes. Requires the model to have Match Booster enabled, and takes no inner schedule payload.

disabled
boolean
required

Whether the sync has been disabled by the user.

destinationId
number<double>

The id of the Destination that sync is connected to. Required unless syncTemplateId is provided: a sync created from a sync template always uses the template's destination, and this field, when provided, must match it.

configuration
object

The sync's configuration. This specifies how data is mapped, among other configuration. The schema depends on the destination type.

Required unless syncTemplateId is provided, in which case it must be omitted: the template provides the configuration and this sync's own values go in syncTemplateOverrides.

syncTemplateId
number<double>

The id of the Sync Template to create the sync from. The sync inherits the template's destination and configuration and follows later changes to the template. A null schedule inherits the template's schedule; a schedule given here belongs to the sync. modelId must be the template's model or an audience built on it.

syncTemplateOverrides
object

Values this sync sets for the template's overridable fields, keyed by configuration field path (for example "externalIdMapping" or "target.schema"). Only fields the template's overrideConfig marks as overridable are accepted. Requires syncTemplateId.

Response

Ok

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

createdBy
object | null
required

The user who created the sync, or null if no user was recorded

updatedBy
object | null
required

The user who last updated the sync, or null if no user was recorded

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.

For a sync bound to a sync template this is the effective configuration: the template's configuration with this sync's syncTemplateOverrides applied.

Consumers should NOT make assumptions on the contents of the configuration. It may change as Hightouch updates its internal code.

schedule
object | null
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

Match Booster (type "match_booster"): the sync will be triggered after each Match Booster enrichment run of its model completes. Requires the model to have Match Booster enabled, and takes no inner schedule payload.

status
enum<string>
required

The overall status of the sync

Available options:
disabled,
pending,
cancelled,
failed,
queued,
success,
warning,
querying,
processing,
reporting,
interrupted
disabled
boolean
required

Whether the sync has been disabled by the user.

lastRunAt
string<date-time> | null
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

tags
object
required

The tags of the sync

syncTemplateId
number<double> | null
required

The id of the sync template this sync is bound to, or null when the sync owns its configuration. A bound sync takes its destination and configuration from the template and follows later changes to the template; configuration is the effective merged configuration and syncTemplateOverrides holds this sync's own values.

syncTemplateOverrides
object | null
required

The template configuration fields this sync overrides, keyed by configuration field path (for example "externalIdMapping" or "target.schema"). Null when the sync is not bound to a sync template or has no overrides.