sync
Trigger a sync
Runs a sync configuration on demand. Returns immediately; poll GET /v1/sync/runs/:syncRunId for status.
POST
/
v1
/
sync
/
config
/
{syncConfigId}
/
sync
cURL
curl -X POST 'http://localhost:8080/v1/sync/config/your_syncConfigId/sync' \
-H 'Authorization: Bearer ek_live_xxxxx'const response = await fetch('http://localhost:8080/v1/sync/config/your_syncConfigId/sync', {
method: 'POST',
headers: {
Authorization: 'Bearer ek_live_xxxxx',
},
});
const data = await response.json();import requests
response = requests.post(
'http://localhost:8080/v1/sync/config/your_syncConfigId/sync',
headers={
'Authorization': 'Bearer ek_live_xxxxx',
},
)
data = response.json()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/v1/sync/config/{syncConfigId}/sync",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/v1/sync/config/{syncConfigId}/sync"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8080/v1/sync/config/{syncConfigId}/sync")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/v1/sync/config/{syncConfigId}/sync")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true
}Previous
Start a sync configurationBegins the wizard flow for connecting a new sync. Returns a `syncConfigId` to use with the `/v1/sync/:slug/flow` step endpoints.
Next
⌘I
cURL
curl -X POST 'http://localhost:8080/v1/sync/config/your_syncConfigId/sync' \
-H 'Authorization: Bearer ek_live_xxxxx'const response = await fetch('http://localhost:8080/v1/sync/config/your_syncConfigId/sync', {
method: 'POST',
headers: {
Authorization: 'Bearer ek_live_xxxxx',
},
});
const data = await response.json();import requests
response = requests.post(
'http://localhost:8080/v1/sync/config/your_syncConfigId/sync',
headers={
'Authorization': 'Bearer ek_live_xxxxx',
},
)
data = response.json()<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/v1/sync/config/{syncConfigId}/sync",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "http://localhost:8080/v1/sync/config/{syncConfigId}/sync"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://localhost:8080/v1/sync/config/{syncConfigId}/sync")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/v1/sync/config/{syncConfigId}/sync")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true
}