POST
/api/v1/chatEnvia uma mensagem para um agent e recebe a resposta (streaming ou síncrono).
Parâmetros
tokenstring — embed token do agent (obrigatório)messagestring — mensagem do usuário (obrigatório)conversationIdstring? — UUID da conversa existente (opcional, cria nova se omitido)streamboolean? — true para streaming SSE (padrão: false)Resposta (200)
{
"reply": "Olá! Como posso ajudar?",
"conversationId": "uuid",
"citations": [
{
"index": 1,
"source_uri": "https://docs.exemplo.com/intro",
"content_snippet": "...",
"page": null
}
],
"fcs": 0.92,
"label": "high"
}Exemplo curl
curl -X POST https://simple-agent.me/api/v1/chat \
-H "Content-Type: application/json" \
-d '{
"token": "SEU_TOKEN",
"message": "Como funciona o produto?",
"stream": false
}'