Ainda estamos construindo coisas aqui! Você pode notar algumas arestas ásperas enquanto trabalhamos em melhorias. Ajude-nos a melhorar relatando bugs aqui.

Visão Geral

Uma visão geral da API do Assistente e da integração do widget incorporável.

O que é isso?

A plataforma Assistente fornece uma API para construir assistentes orientados por conversação e um widget incorporável que pode ser colocado em sites. A arquitetura típica separa código secreto do lado do servidor do código do navegador emitindo tokens de widget de curta duração.

The Companin Widget is more than just a chat interface—it's a complete conversational AI platform that seamlessly integrates into your website. Built with modern web technologies (Next.js, React, TypeScript), it provides enterprise-grade reliability while maintaining simplicity for developers.

Unlike traditional chat widgets that require complex backend setup, Companin handles all the infrastructure for you. Authentication, message storage, conversation management, and AI processing are all managed through our secure API, allowing you to focus on creating great user experiences.

Conceitos Principais

Understanding these core concepts will help you make the most of the Companin Widget:

  • API: Endpoints REST para gerenciar assistentes, sessões, conversas e conhecimento.
  • Widget: Componente do lado do cliente que se conecta à API para interações em tempo real.
  • Autenticação: JWTs ou cabeçalhos de par de chave API (X-API-Key + X-API-Secret).

💡 Key Insight

The widget configuration acts as the single source of truth for all appearance and behavior settings. This means you can update your widget's look and feel without changing any code on your website—just update the configuration in your dashboard and changes take effect immediately.

Como funciona (alto nível)

  1. O servidor emite tokens de widget de curta duração para o navegador.
  2. O widget usa tokens para autenticar chamadas de API e manter sessões.
  3. Os endpoints do lado do servidor aceitam JWTs ou pares de cabeçalhos de chave API e aplicam limites de taxa no nível da organização.

Próximos passos

Siga o Guia Rápido para incorporar o widget, depois consulte a Referência da API para detalhes.