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

# Submit Ticket Feedback

> Submit a user's feedback (CSAT) on a ticket. Defaults to the ticket's requester; pass user_id to submit for another user. Answers the ticket's pending feedback request for that user when one exists, otherwise records new feedback. The response variant (thumbs or detailed) must match the team's configured feedback question format. Submitting again after the user has already answered replaces their rating; an omitted text_feedback keeps the existing comment.



## OpenAPI

````yaml /sections/api-reference/openapi-spec-v2.yaml post /v2/tickets/{ticket_id}/feedback
openapi: 3.1.0
info:
  title: Serval Public API
  description: Serval Public API
  contact:
    name: Serval
    url: https://serval.com
    email: support@serval.com
  license:
    name: Serval License
    url: https://serval.com/license
  version: 2.0.0
servers:
  - url: https://public.api.serval.com
security:
  - BearerAuth: []
tags:
  - name: Access Policy API
  - name: Access Policy Approval Procedure API
  - name: Access Profile API
  - name: Access Relationship API
  - name: Access Request API
  - name: Agent API
  - name: Analytics API
  - name: App Instance API
  - name: App Resource API
  - name: App Resource Role API
  - name: Approval Delegation API
  - name: Approval Procedure API
  - name: Approval Request API
  - name: Assignment Rules API
  - name: Audit Log API
  - name: Change Blackout API
  - name: Change Model API
  - name: Custom Field API
  - name: Custom Service API
  - name: Dashboards API
  - name: Entity API
  - name: Entity Field Mapping API
  - name: Entity Ingestion Config API
  - name: Entity Type API
  - name: Folder API
  - name: Forms API
  - name: Group API
  - name: Guidance API
  - name: Help Agent API
  - name: Journey API
  - name: Knowledge API
  - name: Knowledge Base API
  - name: One-Time Window API
  - name: Report API
  - name: Roles API
  - name: SLA API
  - name: Schedule API
  - name: Tag API
  - name: Team API
  - name: Team Group API
  - name: Team User API
  - name: Ticket API
  - name: Topic API
  - name: User API
  - name: User Relationship API
  - name: Widgets API
  - name: Workflow API
  - name: Workflow Approval Procedure API
  - name: Workflow Run API
paths:
  /v2/tickets/{ticket_id}/feedback:
    post:
      tags:
        - Ticket API
      summary: Submit Ticket Feedback
      description: >-
        Submit a user's feedback (CSAT) on a ticket. Defaults to the ticket's
        requester; pass user_id to submit for another user. Answers the ticket's
        pending feedback request for that user when one exists, otherwise
        records new feedback. The response variant (thumbs or detailed) must
        match the team's configured feedback question format. Submitting again
        after the user has already answered replaces their rating; an omitted
        text_feedback keeps the existing comment.
      operationId: svrelay.publicv2.PublicAPIServiceV2.SubmitTicketFeedback
      parameters:
        - name: ticket_id
          in: path
          required: true
          schema:
            type: string
            title: ticket_id
            description: The ID of the ticket the feedback is about.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              allOf:
                - properties:
                    userId:
                      type:
                        - string
                        - 'null'
                      title: user_id
                      description: >-
                        The user giving the feedback. Defaults to the ticket's
                        requester. If the
                         ticket has a pending feedback request for this user it is answered; if
                         the user already answered, the latest submission replaces their rating
                         (an omitted text_feedback keeps the existing comment); otherwise a
                         feedback record is created and answered in one step.
                - oneOf:
                    - type: object
                      properties:
                        detailed:
                          $ref: >-
                            #/components/schemas/svhelp.pubapimodels.DetailedFeedback
                          title: detailed
                      title: detailed
                      required:
                        - detailed
                    - type: object
                      properties:
                        thumbs:
                          $ref: >-
                            #/components/schemas/svhelp.pubapimodels.ThumbsFeedback
                          title: thumbs
                      title: thumbs
                      required:
                        - thumbs
              title: SubmitTicketFeedbackRequest
              additionalProperties: false
        required: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/svhelp.publicapi.SubmitTicketFeedbackResponse
      security:
        - BearerAuth: []
components:
  schemas:
    svhelp.pubapimodels.DetailedFeedback:
      type: object
      properties:
        starRating:
          type: integer
          title: star_rating
          format: int32
          description: 1-5 star rating.
          x-stainless-terraform-configurability: optional
        textFeedback:
          type:
            - string
            - 'null'
          title: text_feedback
          description: Optional free-form text feedback.
          x-stainless-terraform-configurability: optional
      title: DetailedFeedback
      additionalProperties: false
    svhelp.pubapimodels.ThumbsFeedback:
      type: object
      properties:
        isPositive:
          type: boolean
          title: is_positive
          description: True = positive, false = negative.
          x-stainless-terraform-configurability: computed_optional
        textFeedback:
          type:
            - string
            - 'null'
          title: text_feedback
          description: Optional free-form text feedback.
          x-stainless-terraform-configurability: optional
      title: ThumbsFeedback
      additionalProperties: false
    svhelp.publicapi.SubmitTicketFeedbackResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/svhelp.pubapimodels.TicketFeedback'
          title: data
          x-stainless-terraform-configurability: optional
      title: SubmitTicketFeedbackResponse
      additionalProperties: false
    svhelp.pubapimodels.TicketFeedback:
      type: object
      allOf:
        - properties:
            id:
              type: string
              title: id
              description: The ID of the feedback item.
              readOnly: true
              x-stainless-terraform-configurability: computed
            ticketId:
              type: string
              title: ticket_id
              description: The ID of the ticket this feedback belongs to.
              readOnly: true
              x-stainless-terraform-configurability: computed
            targetUserId:
              type: string
              title: target_user_id
              description: The ID of the user who was asked for feedback.
              readOnly: true
              x-stainless-terraform-configurability: computed
            feedbackSubjectType:
              $ref: '#/components/schemas/svhelp.pubapimodels.FeedbackSubjectType'
              title: feedback_subject_type
              description: Who the feedback is about.
              readOnly: true
              x-stainless-terraform-configurability: computed
            feedbackAboutUserId:
              type: string
              title: feedback_about_user_id
              description: The user ID of who the feedback is about.
              readOnly: true
              x-stainless-terraform-configurability: computed
            requestedAt:
              $ref: '#/components/schemas/google.protobuf.Timestamp'
              title: requested_at
              description: Timestamp when the feedback was requested.
              readOnly: true
              x-stainless-terraform-configurability: computed
            respondedAt:
              oneOf:
                - $ref: '#/components/schemas/google.protobuf.Timestamp'
                - type: 'null'
              title: responded_at
              description: >-
                Timestamp when the feedback was responded to. Null if not yet
                responded.
              readOnly: true
              x-stainless-terraform-configurability: computed
        - oneOf:
            - type: object
              properties:
                detailed:
                  $ref: '#/components/schemas/svhelp.pubapimodels.DetailedFeedback'
                  title: detailed
                  description: Detailed feedback with star rating and optional text.
                  x-stainless-terraform-configurability: optional
              title: detailed
              required:
                - detailed
            - type: object
              properties:
                thumbs:
                  $ref: '#/components/schemas/svhelp.pubapimodels.ThumbsFeedback'
                  title: thumbs
                  description: Thumbs up/down feedback.
                  x-stainless-terraform-configurability: optional
              title: thumbs
              required:
                - thumbs
      title: TicketFeedback
      additionalProperties: false
    svhelp.pubapimodels.FeedbackSubjectType:
      type: string
      title: FeedbackSubjectType
      enum:
        - FEEDBACK_SUBJECT_TYPE_UNSPECIFIED
        - FEEDBACK_SUBJECT_TYPE_SERVAL
        - FEEDBACK_SUBJECT_TYPE_AGENT
    google.protobuf.Timestamp:
      type: string
      examples:
        - '2025-01-15T01:30:15.000Z'
        - '2025-06-01T00:00:00.000Z'
      format: date-time
      description: A timestamp in RFC 3339 format (e.g., "2025-01-15T01:30:15Z").
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````