Atualizar o Chatwoot
Atualiza uma integração Chatwoot existente (senão 404 NOT_CONNECTED). enabled liga/desliga o espelhamento; trocar qualquer credencial re-roda o connect completo e recria a inbox; action=“reconnect” recria a inbox reusando as credenciais salvas; channelMode troca o modo da inbox.
curl --request PATCH \
--url https://pilotstatus.com.br/v1/chatwoot \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"enabled": false,
"instanceUrl": "<string>",
"accountId": "<string>",
"userAccessToken": "<string>",
"action": "reconnect"
}
'import requests
url = "https://pilotstatus.com.br/v1/chatwoot"
payload = {
"enabled": False,
"instanceUrl": "<string>",
"accountId": "<string>",
"userAccessToken": "<string>",
"action": "reconnect"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: false,
instanceUrl: '<string>',
accountId: '<string>',
userAccessToken: '<string>',
action: 'reconnect'
})
};
fetch('https://pilotstatus.com.br/v1/chatwoot', 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",
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([
'enabled' => false,
'instanceUrl' => '<string>',
'accountId' => '<string>',
'userAccessToken' => '<string>',
'action' => 'reconnect'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/chatwoot"
payload := strings.NewReader("{\n \"enabled\": false,\n \"instanceUrl\": \"<string>\",\n \"accountId\": \"<string>\",\n \"userAccessToken\": \"<string>\",\n \"action\": \"reconnect\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://pilotstatus.com.br/v1/chatwoot")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": false,\n \"instanceUrl\": \"<string>\",\n \"accountId\": \"<string>\",\n \"userAccessToken\": \"<string>\",\n \"action\": \"reconnect\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/chatwoot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": false,\n \"instanceUrl\": \"<string>\",\n \"accountId\": \"<string>\",\n \"userAccessToken\": \"<string>\",\n \"action\": \"reconnect\"\n}"
response = http.request(request)
puts response.read_body{
"connected": true,
"status": "connected",
"enabled": true,
"inboxId": "42",
"instanceUrl": "https://app.chatwoot.com",
"accountId": "1",
"hasToken": true,
"channelMode": "auto",
"lastError": null,
"lastErrorCode": null,
"lastSyncAt": "2026-07-13T12:00:00.000Z"
}{
"error": "Validation error"
}{
"error": "Unauthorized"
}{
"error": "Chatwoot is not connected for this number",
"code": "NOT_CONNECTED"
}{
"error": "Too many requests"
}Autorizações
Sua chave de API ps_
Cabeçalhos
Scopes to a single number (required for tenant keys / per-number OAuth grants).
Corpo
false pausa o espelhamento sem desconectar; true retoma.
false
URL base da instância Chatwoot.
Id da conta Chatwoot (string numérica).
Token de acesso do usuário Chatwoot (api_access_token de agente/admin).
reconnect = recria a inbox reusando as credenciais salvas.
reconnect Preferência de canal: auto (padrão), api (força inbox mirror), native (força inbox whatsapp_cloud quando elegível).
auto, api, native Resposta
Status da integração Chatwoot
Esta página foi útil?
curl --request PATCH \
--url https://pilotstatus.com.br/v1/chatwoot \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"enabled": false,
"instanceUrl": "<string>",
"accountId": "<string>",
"userAccessToken": "<string>",
"action": "reconnect"
}
'import requests
url = "https://pilotstatus.com.br/v1/chatwoot"
payload = {
"enabled": False,
"instanceUrl": "<string>",
"accountId": "<string>",
"userAccessToken": "<string>",
"action": "reconnect"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: false,
instanceUrl: '<string>',
accountId: '<string>',
userAccessToken: '<string>',
action: 'reconnect'
})
};
fetch('https://pilotstatus.com.br/v1/chatwoot', 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",
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([
'enabled' => false,
'instanceUrl' => '<string>',
'accountId' => '<string>',
'userAccessToken' => '<string>',
'action' => 'reconnect'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/chatwoot"
payload := strings.NewReader("{\n \"enabled\": false,\n \"instanceUrl\": \"<string>\",\n \"accountId\": \"<string>\",\n \"userAccessToken\": \"<string>\",\n \"action\": \"reconnect\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://pilotstatus.com.br/v1/chatwoot")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": false,\n \"instanceUrl\": \"<string>\",\n \"accountId\": \"<string>\",\n \"userAccessToken\": \"<string>\",\n \"action\": \"reconnect\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/chatwoot")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": false,\n \"instanceUrl\": \"<string>\",\n \"accountId\": \"<string>\",\n \"userAccessToken\": \"<string>\",\n \"action\": \"reconnect\"\n}"
response = http.request(request)
puts response.read_body{
"connected": true,
"status": "connected",
"enabled": true,
"inboxId": "42",
"instanceUrl": "https://app.chatwoot.com",
"accountId": "1",
"hasToken": true,
"channelMode": "auto",
"lastError": null,
"lastErrorCode": null,
"lastSyncAt": "2026-07-13T12:00:00.000Z"
}{
"error": "Validation error"
}{
"error": "Unauthorized"
}{
"error": "Chatwoot is not connected for this number",
"code": "NOT_CONNECTED"
}{
"error": "Too many requests"
}