Aparência
Kanban (Funis e Cards)
O Kanban é o seu funil de vendas: funis (funnels) com etapas, e cards (kanban items) que caminham entre elas. Pela API você cria funis, adiciona cards, move entre etapas, atribui responsáveis, marca ganho/perdido e puxa relatórios do pipeline.
Base e autenticação
As rotas desta página são relativas a /api/v1/accounts/{account_id} na base https://appchat01.interleads.chat e exigem o cabeçalho api_access_token + Content-Type: application/json.
Funis
| Método | Rota | Descrição |
|---|---|---|
GET | /funnels | Lista os funis |
GET | /funnels/{id} | Detalhes de um funil (inclui etapas) |
POST | /funnels | Cria um funil |
PATCH | /funnels/{id} | Atualiza um funil |
DELETE | /funnels/{id} | Remove o funil e seus cards |
GET | /funnels/{id}/stage_stats | Métricas por etapa |
PATCH | /funnels/{id}/reorder | Reordena as etapas (stages[]) |
GET | /funnels/{funnel_id}/kanban_items | Lista os cards do funil |
Cards (Kanban Items)
| Método | Rota | Descrição |
|---|---|---|
GET | /kanban_items | Lista paginada (filtros: funnel_id, stage_id, agent_id, conversation_id, page) |
GET | /kanban_items/batch | Lista + metadados agregados (stage_counts, total_items) |
GET | /kanban_items/{id} | Detalhes de um card |
POST | /kanban_items | Cria um card |
PATCH | /kanban_items/{id} | Atualiza um card |
DELETE | /kanban_items/{id} | Exclui um card |
POST | /kanban_items/{id}/move_to_stage | Move para outra etapa (funnel_stage) |
POST | /kanban_items/{id}/move | Move entre funis/etapas (funnel_id, funnel_stage) |
POST | /kanban_items/reorder | Reordena cards (positions[]) |
Criar um funil
bash
curl -X POST "https://appchat01.interleads.chat/api/v1/accounts/3/funnels" \
-H "api_access_token: $INTERLEADS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"funnel": {
"name": "Vendas",
"stages": [
{ "name": "Lead", "slug": "lead" },
{ "name": "Qualificado","slug": "qualificado" },
{ "name": "Proposta", "slug": "proposta" },
{ "name": "Fechamento", "slug": "fechamento" }
]
}
}'O card usa o slug da etapa
Ao criar/mover um card, o campo funnel_stage recebe o slug da etapa (ex.: "lead"), não o nome. Liste GET /funnels/{id} para conferir os slugs.
Criar um card
Envie o card dentro de kanban_item. funnel_id e funnel_stage posicionam o card; item_details guarda os dados do negócio (título, prioridade, valor…). Vincule a uma conversa com conversation_display_id.
bash
curl -X POST "https://appchat01.interleads.chat/api/v1/accounts/3/kanban_items" \
-H "api_access_token: $INTERLEADS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"kanban_item": {
"funnel_id": 10,
"funnel_stage": "lead",
"position": 1,
"conversation_display_id": 12345,
"assigned_agents": [7],
"item_details": {
"title": "Oportunidade ACME",
"priority": "high",
"value": 1500,
"currency": { "symbol": "R$", "code": "BRL", "locale": "pt-BR" }
}
}
}'js
const res = await fetch(
"https://appchat01.interleads.chat/api/v1/accounts/3/kanban_items",
{
method: "POST",
headers: {
api_access_token: process.env.INTERLEADS_TOKEN,
"Content-Type": "application/json",
},
body: JSON.stringify({
kanban_item: {
funnel_id: 10,
funnel_stage: "lead",
position: 1,
conversation_display_id: 12345,
assigned_agents: [7],
item_details: {
title: "Oportunidade ACME",
priority: "high",
value: 1500,
currency: { symbol: "R$", code: "BRL", locale: "pt-BR" },
},
},
}),
}
)Mover um card de etapa
bash
curl -X POST "https://appchat01.interleads.chat/api/v1/accounts/3/kanban_items/88/move_to_stage" \
-H "api_access_token: $INTERLEADS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "funnel_stage": "proposta" }'Para mover entre funis, use /move com funnel_id + funnel_stage.
Marcar ganho ou perdido
bash
curl -X POST "https://appchat01.interleads.chat/api/v1/accounts/3/kanban_items/88/change_status" \
-H "api_access_token: $INTERLEADS_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "status": "won" }'Valores de status: won, lost, open.
Busca, filtros e relatórios
| Método | Rota | Descrição |
|---|---|---|
GET | /kanban_items/search | Busca textual (query, funnel_id, agent_id) |
GET | /kanban_items/filter | Filtro avançado (prioridade, faixa de valor, datas) |
GET | /kanban_items/reports | Métricas do quadro (from, to, user_ids[], inbox_id) |
bash
curl "https://appchat01.interleads.chat/api/v1/accounts/3/kanban_items/reports?from=2026-01-01&to=2026-01-31" \
-H "api_access_token: $INTERLEADS_TOKEN"Mais recursos do card
Cada card também suporta, sob /kanban_items/{id}/...:
- Atribuição:
assign_agent,remove_agent,assigned_agents - Checklist:
create_checklist_item,get_checklist,update_checklist_item,toggle_checklist_item,delete_checklist_item - Notas:
create_note,get_notes,update_note,delete_note - Tempo:
time_report,stage_time_breakdown,counts
E, no escopo da conta:
- Ações em massa:
/kanban_items/bulk_move_items,/bulk_assign_agent,/bulk_set_priority - Import/export CSV:
/kanban_items/export,/import_preview,/import - Configuração:
/kanban_config(GET/POST/PUT/DELETE,+ test_webhook) - Automações:
/kanban/automations
Códigos de resposta
200, 201, 204 (sucesso) · 400, 401, 403 (sem permissão), 404, 422, 500.
Kanban não aparece no painel?
Se o funil existe pela API mas não aparece na tela, o recurso de Kanban pode não estar habilitado na sua conta. Fale com o suporte para ativá-lo.