Chatwoot
Cancel Chatwoot history sync
Cancels the number’s sync. A run that has not started yet (QUEUED, no startedAt) is closed right away: code: "CANCELED", historySync.status CANCELED, lastErrorCode null, and a new POST is accepted at once. A run already in progress is asked to stop (the worker stops at its next step and marks it CANCELED): code: "CANCELING" with the current state. Always answers 200 — also when nothing is running (CANCELING, historySync null if there was never a run).
DELETE
/
v1
/
chatwoot
/
history-sync
Cancel Chatwoot history sync
curl --request DELETE \
--url https://pilotstatus.com.br/v1/chatwoot/history-sync \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/chatwoot/history-sync"
headers = {"x-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/chatwoot/history-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://pilotstatus.com.br/v1/chatwoot/history-sync",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://pilotstatus.com.br/v1/chatwoot/history-sync"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://pilotstatus.com.br/v1/chatwoot/history-sync")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/chatwoot/history-sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"historySync": {
"status": "RUNNING",
"windowDays": 30,
"total": 120,
"done": 48,
"failed": 0,
"skippedMedia": 2,
"lastErrorCode": null,
"startedAt": "2026-11-09T12:00:05.000Z",
"finishedAt": null
},
"code": "CANCELING"
}{
"error": "whatsappNumberId is required (x-whatsapp-number-id header)",
"code": "NUMBER_REQUIRED"
}{
"error": "Unauthorized"
}{
"error": "Your workspace role does not allow this action (integrations:manage).",
"code": "PERMISSION_DENIED"
}{
"error": "WhatsApp number not found",
"code": "NUMBER_NOT_FOUND"
}{
"error": "Too many requests"
}Was this page helpful?
⌘I
Cancel Chatwoot history sync
curl --request DELETE \
--url https://pilotstatus.com.br/v1/chatwoot/history-sync \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/chatwoot/history-sync"
headers = {"x-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};
fetch('https://pilotstatus.com.br/v1/chatwoot/history-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://pilotstatus.com.br/v1/chatwoot/history-sync",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$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://pilotstatus.com.br/v1/chatwoot/history-sync"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://pilotstatus.com.br/v1/chatwoot/history-sync")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/chatwoot/history-sync")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"historySync": {
"status": "RUNNING",
"windowDays": 30,
"total": 120,
"done": 48,
"failed": 0,
"skippedMedia": 2,
"lastErrorCode": null,
"startedAt": "2026-11-09T12:00:05.000Z",
"finishedAt": null
},
"code": "CANCELING"
}{
"error": "whatsappNumberId is required (x-whatsapp-number-id header)",
"code": "NUMBER_REQUIRED"
}{
"error": "Unauthorized"
}{
"error": "Your workspace role does not allow this action (integrations:manage).",
"code": "PERMISSION_DENIED"
}{
"error": "WhatsApp number not found",
"code": "NUMBER_NOT_FOUND"
}{
"error": "Too many requests"
}