Warehouse Sync
Update Warehouse Sync
Change a sync, or pause and resume it
PATCH
/
api
/
v1
/
warehouse-syncs
/
{id}
Update Warehouse Sync
curl --request PATCH \
--url https://api.sequenzy.com/api/v1/warehouse-syncs/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"query": "<string>",
"mapping": {},
"cursorColumn": {},
"frequency": "<string>",
"listIds": [
"<string>"
],
"optInMode": "<string>",
"triggerAutomations": true,
"isEnabled": true
}
'import requests
url = "https://api.sequenzy.com/api/v1/warehouse-syncs/{id}"
payload = {
"name": "<string>",
"query": "<string>",
"mapping": {},
"cursorColumn": {},
"frequency": "<string>",
"listIds": ["<string>"],
"optInMode": "<string>",
"triggerAutomations": True,
"isEnabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
query: '<string>',
mapping: {},
cursorColumn: {},
frequency: '<string>',
listIds: ['<string>'],
optInMode: '<string>',
triggerAutomations: true,
isEnabled: true
})
};
fetch('https://api.sequenzy.com/api/v1/warehouse-syncs/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sequenzy.com/api/v1/warehouse-syncs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'query' => '<string>',
'mapping' => [
],
'cursorColumn' => [
],
'frequency' => '<string>',
'listIds' => [
'<string>'
],
'optInMode' => '<string>',
'triggerAutomations' => true,
'isEnabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/v1/warehouse-syncs/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"query\": \"<string>\",\n \"mapping\": {},\n \"cursorColumn\": {},\n \"frequency\": \"<string>\",\n \"listIds\": [\n \"<string>\"\n ],\n \"optInMode\": \"<string>\",\n \"triggerAutomations\": true,\n \"isEnabled\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.sequenzy.com/api/v1/warehouse-syncs/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"query\": \"<string>\",\n \"mapping\": {},\n \"cursorColumn\": {},\n \"frequency\": \"<string>\",\n \"listIds\": [\n \"<string>\"\n ],\n \"optInMode\": \"<string>\",\n \"triggerAutomations\": true,\n \"isEnabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/warehouse-syncs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"query\": \"<string>\",\n \"mapping\": {},\n \"cursorColumn\": {},\n \"frequency\": \"<string>\",\n \"listIds\": [\n \"<string>\"\n ],\n \"optInMode\": \"<string>\",\n \"triggerAutomations\": true,\n \"isEnabled\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"sync": {
"id": "wsync_abc123",
"connectionId": "wconn_abc123",
"name": "Customers",
"kind": "subscribers",
"query": "select email, first_name, plan, updated_at from analytics.customers",
"mapping": {
"emailColumn": "EMAIL",
"firstNameColumn": "FIRST_NAME",
"attributes": [
{
"column": "PLAN",
"attribute": "plan"
}
]
},
"cursorColumn": "UPDATED_AT",
"cursorValue": "2026-09-30T11:58:02.000Z",
"listIds": [],
"optInMode": "confirmed",
"triggerAutomations": false,
"frequency": "daily",
"isEnabled": false,
"fullResyncRequested": false,
"status": "idle",
"nextRunAt": "2026-09-30T13:00:00.000Z",
"lastRunAt": "2026-09-30T12:00:00.000Z",
"lastSuccessAt": "2026-09-30T12:00:41.000Z",
"lastError": null,
"lastErrorAt": null,
"consecutiveFailures": 0,
"latestRun": {
"id": "wrun_1",
"syncId": "wsync_abc123",
"status": "succeeded",
"isManual": false,
"isFullResync": false,
"rowsRead": 1204,
"rowsUnchanged": 1100,
"rowsSynced": 98,
"rowsSkipped": 6,
"rowsFailed": 0,
"errorSamples": [
{
"row": 17,
"reason": "Missing email"
}
],
"subscriberImportIds": [
"imp_1"
],
"imports": [
{
"id": "imp_1",
"status": "completed",
"totalRows": 98,
"processedCount": 98,
"addedCount": 12,
"updatedCount": 86,
"skippedCount": 0,
"failedCount": 0
}
],
"error": null,
"startedAt": "2026-09-30T12:00:00.000Z",
"finishedAt": "2026-09-30T12:00:41.000Z"
},
"createdAt": "2026-09-30T10:00:00.000Z",
"updatedAt": "2026-09-30T12:00:41.000Z"
}
}
{
"success": false,
"code": "missing_scope",
"error": "Starting automations or sending double opt-in emails from a sync requires the automations:trigger permission."
}
{
"success": false,
"code": "not_found",
"error": "Warehouse sync not found."
}
Updates a sync. Send only what changes. Requires
warehouse:write and subscribers:write (plus events:write for event syncs).
query,mappingandcursorColumnare checked against the query’s columns. A changed query or cursor reads from the beginning again; unchanged rows are still skipped.- Other changes save without contacting the warehouse.
- Turning on
triggerAutomationsordouble_opt_inneedsautomations:trigger. On a sync that already has either on, so does changingquery,mapping,cursorColumnorlistIds. - Saving makes you the user the sync’s imports run as.
- Setting
frequencytomanualcancels the next scheduled run. - A run in progress stops at its next page of rows and runs again with the new settings.
string
required
Sync ID.
string
string
string | null
null removes the cursor.string
string[]
Lists that contacts the sync creates join. Existing contacts keep theirs.
string
boolean
boolean
false pauses the sync, true resumes it.curl -X PATCH "https://api.sequenzy.com/api/v1/warehouse-syncs/wsync_abc123" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "frequency": "daily", "isEnabled": false }'
{
"success": true,
"sync": {
"id": "wsync_abc123",
"connectionId": "wconn_abc123",
"name": "Customers",
"kind": "subscribers",
"query": "select email, first_name, plan, updated_at from analytics.customers",
"mapping": {
"emailColumn": "EMAIL",
"firstNameColumn": "FIRST_NAME",
"attributes": [
{
"column": "PLAN",
"attribute": "plan"
}
]
},
"cursorColumn": "UPDATED_AT",
"cursorValue": "2026-09-30T11:58:02.000Z",
"listIds": [],
"optInMode": "confirmed",
"triggerAutomations": false,
"frequency": "daily",
"isEnabled": false,
"fullResyncRequested": false,
"status": "idle",
"nextRunAt": "2026-09-30T13:00:00.000Z",
"lastRunAt": "2026-09-30T12:00:00.000Z",
"lastSuccessAt": "2026-09-30T12:00:41.000Z",
"lastError": null,
"lastErrorAt": null,
"consecutiveFailures": 0,
"latestRun": {
"id": "wrun_1",
"syncId": "wsync_abc123",
"status": "succeeded",
"isManual": false,
"isFullResync": false,
"rowsRead": 1204,
"rowsUnchanged": 1100,
"rowsSynced": 98,
"rowsSkipped": 6,
"rowsFailed": 0,
"errorSamples": [
{
"row": 17,
"reason": "Missing email"
}
],
"subscriberImportIds": [
"imp_1"
],
"imports": [
{
"id": "imp_1",
"status": "completed",
"totalRows": 98,
"processedCount": 98,
"addedCount": 12,
"updatedCount": 86,
"skippedCount": 0,
"failedCount": 0
}
],
"error": null,
"startedAt": "2026-09-30T12:00:00.000Z",
"finishedAt": "2026-09-30T12:00:41.000Z"
},
"createdAt": "2026-09-30T10:00:00.000Z",
"updatedAt": "2026-09-30T12:00:41.000Z"
}
}
{
"success": false,
"code": "missing_scope",
"error": "Starting automations or sending double opt-in emails from a sync requires the automations:trigger permission."
}
{
"success": false,
"code": "not_found",
"error": "Warehouse sync not found."
}
⌘I
Update Warehouse Sync
curl --request PATCH \
--url https://api.sequenzy.com/api/v1/warehouse-syncs/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"query": "<string>",
"mapping": {},
"cursorColumn": {},
"frequency": "<string>",
"listIds": [
"<string>"
],
"optInMode": "<string>",
"triggerAutomations": true,
"isEnabled": true
}
'import requests
url = "https://api.sequenzy.com/api/v1/warehouse-syncs/{id}"
payload = {
"name": "<string>",
"query": "<string>",
"mapping": {},
"cursorColumn": {},
"frequency": "<string>",
"listIds": ["<string>"],
"optInMode": "<string>",
"triggerAutomations": True,
"isEnabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
query: '<string>',
mapping: {},
cursorColumn: {},
frequency: '<string>',
listIds: ['<string>'],
optInMode: '<string>',
triggerAutomations: true,
isEnabled: true
})
};
fetch('https://api.sequenzy.com/api/v1/warehouse-syncs/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.sequenzy.com/api/v1/warehouse-syncs/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'query' => '<string>',
'mapping' => [
],
'cursorColumn' => [
],
'frequency' => '<string>',
'listIds' => [
'<string>'
],
'optInMode' => '<string>',
'triggerAutomations' => true,
'isEnabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.sequenzy.com/api/v1/warehouse-syncs/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"query\": \"<string>\",\n \"mapping\": {},\n \"cursorColumn\": {},\n \"frequency\": \"<string>\",\n \"listIds\": [\n \"<string>\"\n ],\n \"optInMode\": \"<string>\",\n \"triggerAutomations\": true,\n \"isEnabled\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.sequenzy.com/api/v1/warehouse-syncs/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"query\": \"<string>\",\n \"mapping\": {},\n \"cursorColumn\": {},\n \"frequency\": \"<string>\",\n \"listIds\": [\n \"<string>\"\n ],\n \"optInMode\": \"<string>\",\n \"triggerAutomations\": true,\n \"isEnabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.sequenzy.com/api/v1/warehouse-syncs/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"query\": \"<string>\",\n \"mapping\": {},\n \"cursorColumn\": {},\n \"frequency\": \"<string>\",\n \"listIds\": [\n \"<string>\"\n ],\n \"optInMode\": \"<string>\",\n \"triggerAutomations\": true,\n \"isEnabled\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"sync": {
"id": "wsync_abc123",
"connectionId": "wconn_abc123",
"name": "Customers",
"kind": "subscribers",
"query": "select email, first_name, plan, updated_at from analytics.customers",
"mapping": {
"emailColumn": "EMAIL",
"firstNameColumn": "FIRST_NAME",
"attributes": [
{
"column": "PLAN",
"attribute": "plan"
}
]
},
"cursorColumn": "UPDATED_AT",
"cursorValue": "2026-09-30T11:58:02.000Z",
"listIds": [],
"optInMode": "confirmed",
"triggerAutomations": false,
"frequency": "daily",
"isEnabled": false,
"fullResyncRequested": false,
"status": "idle",
"nextRunAt": "2026-09-30T13:00:00.000Z",
"lastRunAt": "2026-09-30T12:00:00.000Z",
"lastSuccessAt": "2026-09-30T12:00:41.000Z",
"lastError": null,
"lastErrorAt": null,
"consecutiveFailures": 0,
"latestRun": {
"id": "wrun_1",
"syncId": "wsync_abc123",
"status": "succeeded",
"isManual": false,
"isFullResync": false,
"rowsRead": 1204,
"rowsUnchanged": 1100,
"rowsSynced": 98,
"rowsSkipped": 6,
"rowsFailed": 0,
"errorSamples": [
{
"row": 17,
"reason": "Missing email"
}
],
"subscriberImportIds": [
"imp_1"
],
"imports": [
{
"id": "imp_1",
"status": "completed",
"totalRows": 98,
"processedCount": 98,
"addedCount": 12,
"updatedCount": 86,
"skippedCount": 0,
"failedCount": 0
}
],
"error": null,
"startedAt": "2026-09-30T12:00:00.000Z",
"finishedAt": "2026-09-30T12:00:41.000Z"
},
"createdAt": "2026-09-30T10:00:00.000Z",
"updatedAt": "2026-09-30T12:00:41.000Z"
}
}
{
"success": false,
"code": "missing_scope",
"error": "Starting automations or sending double opt-in emails from a sync requires the automations:trigger permission."
}
{
"success": false,
"code": "not_found",
"error": "Warehouse sync not found."
}