curl --request POST \
--url https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/contacts/sync \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/contacts/sync"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/contacts/sync', 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.peachdeskai.com/api/v1/sequences/{sequence_id}/contacts/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 := "https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/contacts/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("https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/contacts/sync")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/contacts/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"enrolled": 123,
"accepted": 0,
"rejected": 0,
"rows_read": 0,
"result": "imported",
"rejections_by_reason": {},
"import_id": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Sync Contacts
Enrol everyone in the attached CSV who can be enrolled, and say who could not.
force, because a person pressed a button. The idempotence gate exists to
stop the per-minute sweep re-reading a file it has already dealt with; it
is not there to refuse an operator who has just edited that file in place,
and the cost of a forced fetch is bounded by their clicking.
The import writes its own record — counts, rejected rows, and the reason
when the file was refused whole. That record is the History entry now: it
carries accepted AND rejected, where contacts_synced could carry one
number and only when it was non-zero, so an import that enrolled nobody
left no trace of having happened at all.
curl --request POST \
--url https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/contacts/sync \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/contacts/sync"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/contacts/sync', 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.peachdeskai.com/api/v1/sequences/{sequence_id}/contacts/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 := "https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/contacts/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("https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/contacts/sync")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.peachdeskai.com/api/v1/sequences/{sequence_id}/contacts/sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"enrolled": 123,
"accepted": 0,
"rejected": 0,
"rows_read": 0,
"result": "imported",
"rejections_by_reason": {},
"import_id": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Interactive user session: the login JWT, sent as Authorization: Bearer <token>.
Path Parameters
Response
Successful Response
What one import of the attached CSV did — both halves of it.
This was a bare enrolled count, and a bare count reads as success: an
import that refused 4,000 of 5,000 rows answered {"enrolled": 1000} and
the panel rendered a success toast over it. The count stays, because
every existing caller reads it and because "how many new people am I now
calling" is a real question; what is added is everything needed to tell
whether that number is the whole story.
result is the field a renderer must branch on. It exists so that
"accepted nothing" cannot be inferred from arithmetic on two integers and
then not be inferred — the case that produced the success toast.

