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

# Submit Ai Chat Feedback

> Submit feedback on an AI chat response.



## OpenAPI

````yaml post /ai/chat-history/{chat_id}/feedback
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /ai/chat-history/{chat_id}/feedback:
    post:
      tags:
        - provider
        - ai
      summary: Submit Ai Chat Feedback
      description: Submit feedback on an AI chat response.
      operationId: submit_ai_chat_feedback_ai_chat_history__chat_id__feedback_post
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: chat_id
          in: path
          required: true
          schema:
            type: string
            title: Chat Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AIChatHistoryFeedbackRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AIChatHistorySummary'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AIChatHistoryFeedbackRequest:
      properties:
        feedbackType:
          $ref: '#/components/schemas/AIFeedbackType'
          description: Type of feedback (positive/negative)
        feedbackText:
          anyOf:
            - type: string
            - type: 'null'
          title: Feedbacktext
          description: Optional feedback text
      type: object
      required:
        - feedbackType
      title: AIChatHistoryFeedbackRequest
      description: Request schema for submitting feedback on a chat response.
    AIChatHistorySummary:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the chat entry
        threadId:
          type: string
          format: uuid
          title: Threadid
          description: UUID of the conversation thread
        question:
          type: string
          title: Question
          description: The question asked
        answer:
          type: string
          title: Answer
          description: The AI-generated answer
        userId:
          type: string
          title: Userid
          description: ID of provider who asked
        files:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Files
          description: List of GCS file paths
        feedbackType:
          anyOf:
            - $ref: '#/components/schemas/AIFeedbackType'
            - type: 'null'
          description: Type of feedback (positive/negative)
        feedbackText:
          anyOf:
            - type: string
            - type: 'null'
          title: Feedbacktext
          description: Optional feedback text
        phoenixId:
          anyOf:
            - type: string
            - type: 'null'
          title: Phoenixid
          description: Phoenix tracing ID
        modelName:
          type: string
          title: Modelname
          description: Model used for generation
        createdDate:
          type: string
          format: date-time
          title: Createddate
          description: When the chat entry was created
      type: object
      required:
        - id
        - threadId
        - question
        - answer
        - userId
        - modelName
        - createdDate
      title: AIChatHistorySummary
      description: Summary schema for AI chat history.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AIFeedbackType:
      type: string
      enum:
        - POSITIVE
        - NEGATIVE
      title: AIFeedbackType
      description: Type of feedback provided for AI-generated content.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````