Trigger Sync
curl --request POST \
--url https://api.hightouch.com/api/v1/syncs/{syncId}/trigger \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clearAndFill": "false",
"resetCDC": "false",
"fullResync": "false"
}
'import requests
url = "https://api.hightouch.com/api/v1/syncs/{syncId}/trigger"
payload = {
"clearAndFill": "false",
"resetCDC": "false",
"fullResync": "false"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({clearAndFill: 'false', resetCDC: 'false', fullResync: 'false'})
};
fetch('https://api.hightouch.com/api/v1/syncs/{syncId}/trigger', 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.hightouch.com/api/v1/syncs/{syncId}/trigger",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clearAndFill' => 'false',
'resetCDC' => 'false',
'fullResync' => 'false'
]),
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.hightouch.com/api/v1/syncs/{syncId}/trigger"
payload := strings.NewReader("{\n \"clearAndFill\": \"false\",\n \"resetCDC\": \"false\",\n \"fullResync\": \"false\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.hightouch.com/api/v1/syncs/{syncId}/trigger")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clearAndFill\": \"false\",\n \"resetCDC\": \"false\",\n \"fullResync\": \"false\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hightouch.com/api/v1/syncs/{syncId}/trigger")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clearAndFill\": \"false\",\n \"resetCDC\": \"false\",\n \"fullResync\": \"false\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>"
}{
"message": "Validation failed",
"details": {}
}API Reference
Trigger Sync
Trigger a new run for the given sync.
If a run is already in progress, this queues a sync run that will get executed immediately after the current run completes.
POST
/
syncs
/
{syncId}
/
trigger
Trigger Sync
curl --request POST \
--url https://api.hightouch.com/api/v1/syncs/{syncId}/trigger \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"clearAndFill": "false",
"resetCDC": "false",
"fullResync": "false"
}
'import requests
url = "https://api.hightouch.com/api/v1/syncs/{syncId}/trigger"
payload = {
"clearAndFill": "false",
"resetCDC": "false",
"fullResync": "false"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({clearAndFill: 'false', resetCDC: 'false', fullResync: 'false'})
};
fetch('https://api.hightouch.com/api/v1/syncs/{syncId}/trigger', 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.hightouch.com/api/v1/syncs/{syncId}/trigger",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'clearAndFill' => 'false',
'resetCDC' => 'false',
'fullResync' => 'false'
]),
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.hightouch.com/api/v1/syncs/{syncId}/trigger"
payload := strings.NewReader("{\n \"clearAndFill\": \"false\",\n \"resetCDC\": \"false\",\n \"fullResync\": \"false\"\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.hightouch.com/api/v1/syncs/{syncId}/trigger")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"clearAndFill\": \"false\",\n \"resetCDC\": \"false\",\n \"fullResync\": \"false\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hightouch.com/api/v1/syncs/{syncId}/trigger")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"clearAndFill\": \"false\",\n \"resetCDC\": \"false\",\n \"fullResync\": \"false\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>"
}{
"message": "Validation failed",
"details": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The id of the sync to trigger a run
Body
application/json
The input of a trigger action to run syncs
Whether to clear the audience and then sync the full query to the destination
Whether to sync all the rows in the query without executing changes on the destination.
Whether to resync all the rows in the query (i.e. ignoring previously synced rows).
Response
Ok
The output of a trigger action to run syncs
The id of the triggered sync run. This can be passed to /sync/runs to
get the run's status.
Was this page helpful?