> ## Documentation Index
> Fetch the complete documentation index at: https://docs.braviloai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Form - Chat

Interactúa con un formulario conversacional. El formulario guía al usuario pregunta por pregunta según un JSON Schema configurado.

> Público por diseño. No requiere autenticación.

### Streaming SSE

Cuando `streaming` está habilitado, el endpoint devuelve eventos:

* `answer` – Fragmentos de texto de la pregunta
* `metadata` – Estado actual (`currentField`, `isValid`)
* `endpoint_response` – Respuesta completa

```js theme={null}
const response = await fetch(`https://app.braviloai.com/api/forms/${formId}/chat`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
query: 'Mi nombre es Juan Pérez',
streaming: true,
conversationId,
visitorId,
}),
});

const reader = response.body.getReader();
// Leer stream SSE...
```


## OpenAPI

````yaml POST /forms/{formId}/chat
openapi: 3.0.1
info:
  title: Bravilo AI.ai - API OpenAPI specifications
  description: ''
  termsOfService: http://braviloai.com/terms
  contact:
    email: support@braviloai.com
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.0
servers:
  - url: https://app.braviloai.com/api
security:
  - bearerAuth: []
tags:
  - name: agents
  - name: datastores
  - name: datasources
paths:
  /forms/{formId}/chat:
    post:
      tags:
        - forms
      summary: Chat de formulario público
      parameters:
        - in: path
          name: formId
          schema:
            type: string
          required: true
          description: ID del formulario
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                query:
                  type: string
                streaming:
                  type: boolean
                  default: false
                conversationId:
                  type: string
                visitorId:
                  type: string
              required:
                - query
      responses:
        '200':
          description: Stream SSE o respuesta completa del formulario
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````