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

# AI Chat Feedback

> Submit thumbs-up/down style feedback for an AI chat exchange (`rating`: `positive` or `negative`), plus optional `reason`, `comment`, and `language`.



## OpenAPI

````yaml /openapi/ai.json post /api/v4/{customerId}/{engineId}/search/answer/feedback
openapi: 3.1.0
info:
  title: Cludo AI API
  version: 4.0.0
  description: >-
    AI Chat, streaming answers, feedback and click tracking, and AI Summary
    endpoints for Cludo search engines.
servers:
  - url: https://api.cludo.com
    description: EU region (Customer IDs below 10,000,000)
  - url: https://api-us1.cludo.com
    description: US region (Customer IDs 10,000,000 and above)
security:
  - SiteKey: []
paths:
  /api/v4/{customerId}/{engineId}/search/answer/feedback:
    post:
      summary: AI Chat Feedback
      description: >-
        Submits feedback for a chat exchange. Authenticated requests use SiteKey
        or Basic auth; the endpoint also accepts anonymous requests (no
        `Authorization` header).
      operationId: submitChatFeedback
      parameters:
        - $ref: '#/components/parameters/customerId'
        - $ref: '#/components/parameters/engineId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AiChatFeedbackRequest'
      responses:
        '200':
          description: Feedback recorded successfully. The response has no body.
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/InternalServerError'
      security:
        - {}
        - SiteKey: []
        - BasicAuth: []
components:
  parameters:
    customerId:
      name: customerId
      in: path
      required: true
      description: Your Cludo account ID.
      schema:
        type: integer
    engineId:
      name: engineId
      in: path
      required: true
      description: Search engine ID.
      schema:
        type: integer
  schemas:
    AiChatFeedbackRequest:
      type: object
      required:
        - conversationId
        - exchangeId
      description: >-
        Provide at least one of `rating`, `reason`, or `comment` with non-empty
        values.
      properties:
        conversationId:
          type: string
          description: >-
            Must match the `conversationId` returned with the answer you are
            rating.
        exchangeId:
          type: string
          description: Must match the `exchangeId` for that answer.
        rating:
          type: string
          enum:
            - positive
            - negative
          description: >-
            Thumbs-style sentiment. The API accepts these values
            case-insensitively (e.g. `Positive` is valid).
        reason:
          type: string
          description: >-
            Structured reason for the rating (e.g. a selected option from your
            UI).
        comment:
          type: string
          description: Free-form user comment.
    ErrorResponse:
      type: object
      description: Error response returned when a request fails.
      properties:
        message:
          type: string
          description: A message describing what went wrong.
    ServerError:
      type: object
      description: Returned when an unexpected server error occurs.
      properties:
        status:
          type: string
          description: HTTP status name.
        code:
          type: integer
          description: HTTP status code.
        messages:
          type: array
          items:
            type: string
          description: Error details, usually including a support reference id.
  responses:
    BadRequest:
      description: >-
        The request is invalid. This typically occurs due to missing required
        fields, incorrect parameter values, or malformed request body.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            message: >-
              The request could not be processed. Check the request body and
              required parameters.
    InternalServerError:
      description: >-
        An unexpected server error occurred. If this persists, contact
        support@cludo.com.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ServerError'
          example:
            status: InternalServerError
            code: 500
            messages:
              - >-
                Error occur. Please contact support with error ID:
                a1b2c3d4-e5f6-7890-abcd-ef1234567890
  securitySchemes:
    SiteKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        SiteKey authentication. Pass the full value including the `SiteKey`
        prefix: `SiteKey <base64(customerId:engineId:searchKey)>`. Example:
        `SiteKey dGVzdDoxMjM0NTY3Ojk4NzY1`.
    BasicAuth:
      type: http
      scheme: basic
      description: >-
        Basic authentication. Use your Customer ID as the username and API Key
        as the password. Example header: `Authorization: Basic
        MTIzNDU2NzpteS1hcGkta2V5`.

````