Chatwoot
Desconectar o Chatwoot
Remove a integração e o webhook nativo do provider (idempotente). Passe deleteInbox=true para TAMBÉM apagar a inbox remota no Chatwoot.
DELETE
/
v1
/
chatwoot
Desconectar o Chatwoot
curl --request DELETE \
--url https://pilotstatus.com.br/v1/chatwoot \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/chatwoot"
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', 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 => "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"
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")
.header("x-api-key", "<api-key>")
.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::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"connected": false,
"status": "disconnected",
"enabled": false,
"inboxId": null,
"instanceUrl": null,
"accountId": null,
"hasToken": false,
"channelMode": "auto",
"lastError": null,
"lastErrorCode": null,
"lastSyncAt": null
}{
"error": "Unauthorized"
}{
"error": "WhatsApp number not found",
"code": "NUMBER_NOT_FOUND"
}{
"error": "Too many requests"
}Autorizações
apiKeyapiKeyId
Sua chave de API ps_
Cabeçalhos
Scopes to a single number (required for tenant keys / per-number OAuth grants).
Parâmetros de consulta
true = também apaga a inbox remota no Chatwoot (padrão false).
Resposta
Status desconectado
Esta página foi útil?
⌘I
Desconectar o Chatwoot
curl --request DELETE \
--url https://pilotstatus.com.br/v1/chatwoot \
--header 'x-api-key: <api-key>'import requests
url = "https://pilotstatus.com.br/v1/chatwoot"
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', 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 => "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"
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")
.header("x-api-key", "<api-key>")
.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::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"connected": false,
"status": "disconnected",
"enabled": false,
"inboxId": null,
"instanceUrl": null,
"accountId": null,
"hasToken": false,
"channelMode": "auto",
"lastError": null,
"lastErrorCode": null,
"lastSyncAt": null
}{
"error": "Unauthorized"
}{
"error": "WhatsApp number not found",
"code": "NUMBER_NOT_FOUND"
}{
"error": "Too many requests"
}