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

# Vote on message

> Rate a message with thumbs up (+1), thumbs down (-1), or neutral (0). Requires authentication.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/vote
openapi: 3.1.0
info:
  title: Sidenet API
  version: 1.0.0
  description: >-
    Sidenet HTTP endpoints exposed by the Sidenet Studio. All routes require an
    api key that can be generated through the studio in studio.sidenet.ai.
servers:
  - url: https://api.sidenet.ai
security:
  - bearerAuth: []
paths:
  /v1/vote:
    post:
      tags:
        - Chat
      summary: Vote on message
      description: >-
        Rate a message with thumbs up (+1), thumbs down (-1), or neutral (0).
        Requires authentication.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - messageId
                - user_rating
              properties:
                messageId:
                  type: string
                  description: The ID of the message to vote on
                  example: msg_9c41b0e7
                user_rating:
                  type: string
                  enum:
                    - '-1'
                    - '0'
                    - '1'
                  description: 'The rating: -1 (thumbs down), 0 (neutral), 1 (thumbs up)'
                user_comment:
                  type: string
                  description: Optional comment about the rating
                  example: Answered the wrong order
      responses:
        '200':
          description: Vote recorded successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  message:
                    type: string
                  data:
                    type: object
                    properties:
                      messageId:
                        type: string
                      rating:
                        type: string
                      comment:
                        type: string
                      threadId:
                        type: string
        '400':
          description: Bad request - invalid input or missing parameters
        '403':
          description: Forbidden - user does not have permission to vote on this message
        '404':
          description: Not found - message does not exist
        '500':
          description: Internal server error
      security:
        - sessionToken: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Organization API key, generated in studio.sidenet.ai. Backend only —
        never in a browser.
    sessionToken:
      type: http
      scheme: bearer
      description: >-
        Session token (`snat_…`) minted by POST /v1/token. Carries the
        organization and the end user; safe in a browser.

````