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

# Create Chat Message Feedback

> Create a new feedback entry for a chat message.



## OpenAPI

````yaml post /api/v1/feedback/chat
openapi: 3.1.0
info:
  title: ThenaAgentStudio
  description: |2-

        ThenaCrew AI CRM Renewal System

        An intelligent platform to automate customer renewal insights and communications through multi-agent workflows.

        Key Features:
        * AI-powered renewal analysis
        * Personalized communication generation
        * Automated opportunity tracking
        * Multi-agent workflow orchestration
        
  version: 1.0.0
servers:
  - url: https://agent-studio.thena.ai
    description: Production server
  - url: http://localhost:8008
    description: Local development server
security:
  - ApiKeyAuth: []
tags:
  - name: Agents
    description: Agent management endpoints
  - name: Chat
    description: Chat and messaging endpoints
paths:
  /api/v1/feedback/chat:
    post:
      tags:
        - Feedback
        - Feedback
      summary: Create Chat Message Feedback
      description: Create a new feedback entry for a chat message.
      operationId: create_chat_message_feedback_api_v1_feedback_chat_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FeedbackCreateRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/backend__models__feedback__ChatMessageFeedback
        '401':
          description: Unauthorized - Invalid or missing JWT token
        '403':
          description: Forbidden - Insufficient permissions
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal server error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    FeedbackCreateRequest:
      properties:
        message_id:
          type: string
          title: Message Id
        source:
          type: string
          title: Source
          description: The source of the feedback, e.g., 'chat' or 'flow'
        feedback_details:
          $ref: '#/components/schemas/ChatMessageFeedbackUpdate'
      type: object
      required:
        - message_id
        - source
        - feedback_details
      title: FeedbackCreateRequest
      description: Model for creating feedback.
    backend__models__feedback__ChatMessageFeedback:
      properties:
        id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Id
        portkey_trace_id:
          type: string
          title: Portkey Trace Id
        human_message_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Human Message Id
        ai_message_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Ai Message Id
        flow_execution_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Flow Execution Id
        user_id:
          type: string
          format: uuid
          title: User Id
        organization_id:
          type: string
          format: uuid
          title: Organization Id
        feedback_type:
          anyOf:
            - $ref: '#/components/schemas/FeedbackType'
            - type: 'null'
        issue_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Issue Type
        comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Comment
        portkey_synced:
          type: boolean
          title: Portkey Synced
          default: false
        portkey_sync_timestamp:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Portkey Sync Timestamp
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
      type: object
      required:
        - portkey_trace_id
        - user_id
        - organization_id
      title: ChatMessageFeedback
      description: Model for chat message feedback.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ChatMessageFeedbackUpdate:
      properties:
        feedback_type:
          anyOf:
            - $ref: '#/components/schemas/FeedbackType'
            - type: 'null'
        issue_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Issue Type
        comment:
          anyOf:
            - type: string
            - type: 'null'
          title: Comment
        context_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Context Id
      type: object
      title: ChatMessageFeedbackUpdate
      description: Model for updating chat message feedback.
    FeedbackType:
      type: string
      enum:
        - positive
        - negative
      title: FeedbackType
      description: Enum for feedback types.
    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
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````