Skip to main content
POST
Create Warehouse Sync
Creates a sync. Each run executes the query and sends only rows that changed since they were last sent:
  • subscribers syncs create and update contacts through the same pipeline as imports, with duplicate strategy overwrite: mapped values replace stored ones, empty values never clear data, tags are only added, and unsubscribed contacts are never resubscribed.
  • events syncs record events on contacts that already exist. Events older than an hour are stored as history and never start automations.
The mapping and cursor column are checked against the query’s real columns, and the first run starts right away. Requires warehouse:write and subscribers:write. Event syncs also need events:write. triggerAutomations: true or optInMode: "double_opt_in" need automations:trigger.

Request

string
required
string
required
string
required
subscribers or events.
string
required
A single SELECT or WITH statement.
object
required
Column names as the query returns them (Snowflake returns unquoted names in upper case).subscribers: emailColumn (or phoneColumn for SMS-only contacts), externalIdColumn, firstNameColumn, lastNameColumn, tagsColumn (array or comma-separated string) and attributes, a list of { "column", "attribute" } pairs.events: emailColumn or externalIdColumn to find the contact, eventNameColumn or a fixed eventName, eventIdColumn (stable ID; derived from the row when omitted), occurredAtColumn (defaults to the sync time) and properties, a list of { "column", "property" } pairs.
string | null
A column that grows when a row changes, such as updated_at. Each run reads only rows at or after the last value it saw. Without a cursor, every run reads the whole result (up to 2,000,000 rows) and skips unchanged rows.
string
default:"daily"
every_15_minutes, hourly, daily, weekly or manual.
string[]
Subscriber syncs: lists that contacts the sync creates join. Existing contacts keep their list memberships.
string
default:"confirmed"
Subscriber syncs: confirmed for contacts whose consent is already verified, or double_opt_in to email new contacts a confirmation first.
boolean
default:"false"
Let new contacts, or events from the last hour, start automations.