curl --request GET \
--url https://api.wizebot.com.br/v1/conversations/anomalies \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.wizebot.com.br/v1/conversations/anomalies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.wizebot.com.br/v1/conversations/anomalies';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://api.wizebot.com.br/v1/conversations/anomalies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wizebot.com.br/v1/conversations/anomalies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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;
}{
"success": true,
"data": {
"window": {
"threshold_hours": 4,
"ceiling_hours_by_channel": {
"whatsapp": 24,
"sms": 24,
"telegram": 24,
"webchat": 24
}
},
"buckets": {
"unanswered": {
"count": 7,
"items": [
{
"conversation_id": "6e0a32b9-4237-4753-a2f2-e392313bf457",
"contact_id": "03309ad5-3949-4abd-b688-5a52a08b9ec7",
"channel": "whatsapp",
"channel_account_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"last_inbound_at": "2026-09-12T02:30:31.382Z",
"last_message_at": "2026-09-12T02:30:31.382Z",
"waiting_hours": 19.8,
"assigned": false,
"unread_count": 1
}
]
},
"never_engaged": {
"count": 3
}
}
},
"timestamp": "2026-09-12T19:15:20.453Z"
}{
"success": false,
"statusCode": 400,
"timestamp": "2026-09-12T19:15:20.453Z",
"path": "/api/v1/conversations/anomalies",
"method": "GET",
"message": {
"error": "INVALID_BUCKET",
"message": "Unknown bucket(s): foo. Valid buckets: unanswered, unassigned, automation_only, never_engaged.",
"details": {
"valid_buckets": [
"unanswered",
"unassigned",
"automation_only",
"never_engaged"
],
"opt_in": [
"unassigned",
"automation_only"
]
}
},
"errorId": "ERR-MTUD0DBO-KKRMP8"
}{
"success": false,
"statusCode": 401,
"timestamp": "2026-09-12T19:15:20.453Z",
"path": "/api/v1/conversations/anomalies",
"method": "GET",
"message": {
"error": "UNAUTHORIZED",
"message": "Invalid or missing API key."
},
"errorId": "ERR-MTUD0DBO-KKRMP8"
}{
"success": false,
"statusCode": 429,
"timestamp": "2026-09-12T19:15:20.453Z",
"path": "/api/v1/conversations/anomalies",
"method": "GET",
"message": {
"error": "RATE_LIMITED",
"message": "Too many requests."
},
"errorId": "ERR-MTUD0DBO-KKRMP8"
}Anomalias de conversa
Numa chamada, as contagens por balde e as piores conversas de cada um. É diagnóstico — responde “o que está errado agora”, não “quais são minhas conversas”. Não há paginação, e o número de itens tem teto.
A janela tem teto superior, e é ele que faz o balde ser anomalia. Só entram conversas cujo último recebimento está entre threshold_hours atrás e o teto da janela de atendimento do canal. Sem esse teto, o critério selecionaria o arquivo inteiro em vez da fila viva.
O teto é a janela de atendimento do próprio canal — no WhatsApp, 24 horas. Canais que não têm janela de atendimento usam 24 horas como padrão fixo, que é o período natural de uma varredura diária. Você nunca precisa adivinhar qual valor valeu: a resposta devolve window.ceiling_hours_by_channel com o teto aplicado a cada canal.
O resultado vale por alguns minutos, não é tempo real. A resposta é servida de um cache curto por empresa e balde, então uma conversa que acabou de entrar na fila pode não aparecer na chamada seguinte. Este recurso foi feito para varredura periódica — uma passada por dia é o uso previsto, e o limite de requisições reflete isso. Para acompanhar a fila em tempo real, use a caixa de entrada.
Dois baldes só respondem se você pedir. unassigned e automation_only ficam de fora por padrão: em boa parte das operações, conversa sem atendente é o estado normal, e ligá-los sem querer produz um relatório em que tudo aparece como problema.
Os quatro baldes
| Balde | O que é |
|---|---|
unanswered | O contato falou e nada saiu depois — nem atendente, nem automação. |
unassigned | Sem atendente responsável. Opcional. |
automation_only | Houve resposta, mas nenhuma de uma pessoa. Opcional. |
never_engaged | Nunca recebeu mensagem do contato. Só contagem, nunca lista. |
Mensagem enviada pela sua própria integração conta como automação em automation_only. Do nosso lado não há como distinguir um atendente clicando no seu CRM de um disparo agendado, e tratá-la como resposta humana esconderia conversas que ninguém de fato atendeu. Respostas pelo painel da WizeBot e pelo WhatsApp do próprio celular contam como humanas.
curl --request GET \
--url https://api.wizebot.com.br/v1/conversations/anomalies \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.wizebot.com.br/v1/conversations/anomalies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://api.wizebot.com.br/v1/conversations/anomalies';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));import requests
url = "https://api.wizebot.com.br/v1/conversations/anomalies"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.wizebot.com.br/v1/conversations/anomalies",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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;
}{
"success": true,
"data": {
"window": {
"threshold_hours": 4,
"ceiling_hours_by_channel": {
"whatsapp": 24,
"sms": 24,
"telegram": 24,
"webchat": 24
}
},
"buckets": {
"unanswered": {
"count": 7,
"items": [
{
"conversation_id": "6e0a32b9-4237-4753-a2f2-e392313bf457",
"contact_id": "03309ad5-3949-4abd-b688-5a52a08b9ec7",
"channel": "whatsapp",
"channel_account_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"last_inbound_at": "2026-09-12T02:30:31.382Z",
"last_message_at": "2026-09-12T02:30:31.382Z",
"waiting_hours": 19.8,
"assigned": false,
"unread_count": 1
}
]
},
"never_engaged": {
"count": 3
}
}
},
"timestamp": "2026-09-12T19:15:20.453Z"
}{
"success": false,
"statusCode": 400,
"timestamp": "2026-09-12T19:15:20.453Z",
"path": "/api/v1/conversations/anomalies",
"method": "GET",
"message": {
"error": "INVALID_BUCKET",
"message": "Unknown bucket(s): foo. Valid buckets: unanswered, unassigned, automation_only, never_engaged.",
"details": {
"valid_buckets": [
"unanswered",
"unassigned",
"automation_only",
"never_engaged"
],
"opt_in": [
"unassigned",
"automation_only"
]
}
},
"errorId": "ERR-MTUD0DBO-KKRMP8"
}{
"success": false,
"statusCode": 401,
"timestamp": "2026-09-12T19:15:20.453Z",
"path": "/api/v1/conversations/anomalies",
"method": "GET",
"message": {
"error": "UNAUTHORIZED",
"message": "Invalid or missing API key."
},
"errorId": "ERR-MTUD0DBO-KKRMP8"
}{
"success": false,
"statusCode": 429,
"timestamp": "2026-09-12T19:15:20.453Z",
"path": "/api/v1/conversations/anomalies",
"method": "GET",
"message": {
"error": "RATE_LIMITED",
"message": "Too many requests."
},
"errorId": "ERR-MTUD0DBO-KKRMP8"
}Authorizations
Chave de API no cabeçalho Authorization: Bearer SUA-CHAVE.
A API também aceita x-api-key: SUA-CHAVE e Authorization: ApiKey SUA-CHAVE — as três formas são equivalentes, inclusive para o limite de requisições.
A chave dá acesso total à conta e é de servidor para servidor: não a use em navegador ou aplicativo móvel.
Query Parameters
Baldes adicionais, separados por vírgula: unassigned, automation_only. unanswered e never_engaged vêm sempre, peça ou não.
Há quantas horas o recebimento precisa estar sem resposta para entrar.
1 <= x <= 24Quantas conversas trazer por balde. Teto de 100.
x <= 100
