API Teams Omnichannel - Painel de Testes

Desconectado
Chat
Webhook Config
API Docs
Selecione uma conversa para visualizar
Arquivo: X remover

Configuracao de Webhook

Configure a URL para onde as mensagens recebidas serao encaminhadas (seu sistema Omnichannel).

Log de Eventos (Tempo Real)

Aguardando eventos...\n

Endpoints da API

GET /api/health
Health check do servico
GET /api/conversations
Lista todas as conversas ativas
GET /api/conversations/:id/messages
Historico de mensagens. Query: ?limit=100&offset=0
POST /api/send
Envia mensagem de texto para o usuario no Teams
{ "conversationId": "uuid", "text": "Sua mensagem aqui" }
POST /api/send-file
Envia arquivo para o usuario no Teams (multipart/form-data)
FormData: conversationId, file, message (opcional)
GET /api/webhook
Retorna configuracao atual do webhook
POST /api/webhook/configure
Configura webhook para sistema Omnichannel
{ "url": "https://...", "secret": "opcional" }
DELETE /api/webhook
Desativa o webhook

Webhook Payload (enviado ao Omnichannel)

Quando uma mensagem chega do Teams, este JSON e enviado via POST para a URL configurada:
{
  "event": "message.received",
  "conversationId": "uuid",
  "messageId": 1,
  "message": {
    "text": "Texto da mensagem",
    "type": "text | attachment",
    "attachments": [{ "name": "...", "contentType": "...", "contentUrl": "..." }]
  },
  "from": { "id": "user-teams-id", "name": "Nome do Usuario" },
  "conversation": { "id": "uuid", "teamsConversationId": "teams-conv-id" },
  "timestamp": "2026-03-20T12:00:00.000Z"
}

Headers:
  X-Bot-Event: message.received
  X-Webhook-Signature: hmac-sha256 (se secret configurado)