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

# Submit thumbs up/down feedback on a completed agent run

> Records user feedback (thumbs up/down plus an optional comment) as a score on the
Langfuse trace that produced the run's answer. Only completed runs can be rated.
Resubmitting overwrites the previous feedback for the same run.




## OpenAPI

````yaml /api-reference/openapi.yml post /query/runs/{runId}/feedback
openapi: 3.0.3
info:
  title: DataLinks
  version: 2.2.0
servers:
  - url: https://api.datalinks.com/api/v1
    description: production server
security:
  - bearerAuth: []
  - openId:
      - implicit
paths:
  /query/runs/{runId}/feedback:
    post:
      tags:
        - agentRuns
      summary: Submit thumbs up/down feedback on a completed agent run
      description: >
        Records user feedback (thumbs up/down plus an optional comment) as a
        score on the

        Langfuse trace that produced the run's answer. Only completed runs can
        be rated.

        Resubmitting overwrites the previous feedback for the same run.
      operationId: submitAgentRunFeedback
      parameters:
        - name: runId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AgentRunFeedbackRequest'
        required: true
      responses:
        '204':
          description: Feedback recorded.
        '400':
          description: Malformed (unparseable) request body.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          description: >-
            Run is not completed, or the request body is well-formed JSON that
            fails validation (e.g. missing or non-boolean rating).
        '502':
          description: The feedback store (Langfuse) could not be reached.
components:
  schemas:
    AgentRunFeedbackRequest:
      required:
        - thumbsUp
      type: object
      properties:
        thumbsUp:
          type: boolean
          description: True for a thumbs up, false for a thumbs down.
        comment:
          type: string
          description: Optional free-text comment accompanying the rating.
    ErrorResponse:
      required:
        - error_code
        - message
      type: object
      properties:
        error_code:
          type: string
          example: UNAUTHORIZED
        error_message:
          type: string
          example: ''
        message:
          type: string
          example: Missing authentication token
        sub_errors:
          type: array
          items:
            required:
              - code
              - message
            type: object
            properties:
              code:
                type: string
              message:
                type: string
  responses:
    Unauthorized:
      description: >-
        Unauthorized. This error occurs if the authentication token is missing
        or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      description: >
        Use a Bearer token for authentication. Submit the token using the
        `Authorization`

        header: `Authorization: Bearer <token>`.
      scheme: bearer
    openId:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: >-
            https://login.datalinks.com/realms/datalinks-realm/protocol/openid-connect/auth
          scopes:
            openid: openid

````