> ## 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.

# Get comments for a ticket



## OpenAPI

````yaml get /v1/tickets/{id}/comments
openapi: 3.0.0
info:
  title: Thena Platform
  description: The Thena Platform API description
  version: 1.0.0
  contact: {}
servers:
  - url: https://platform.thena.ai
    description: Platform
  - url: http://localhost:8000
    description: Local
security:
  - ApiKey: []
tags: []
paths:
  /v1/tickets/{id}/comments:
    get:
      tags:
        - Tickets
      description: >-
        Get comments for a ticket for standard and enterprise tier
        organizations.
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: page
          required: false
          in: query
          description: The page number
          schema:
            type: number
        - name: limit
          required: false
          in: query
          description: The limit number of comments to fetch
          schema:
            type: number
        - name: commentType
          required: true
          in: query
          description: The type of comments to fetch
          schema:
            enum:
              - comment
              - note
            type: string
        - name: visibility
          required: true
          in: query
          description: The visibility of the comments to fetch
          schema:
            enum:
              - private
              - public
            type: string
      responses:
        '200':
          description: Operation successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAllCommentsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              example:
                statusCode: 400
                error: Bad Request
                message: Ticket ID is required!
        '401':
          description: User is not authenticated!
        '403':
          description: User does not have access to this resource!
        '404':
          description: Resource not found!
        '429':
          description: Too many requests!
        '500':
          description: Something went wrong!
        '503':
          description: This service/resource is currently unavailable.
components:
  schemas:
    GetAllCommentsResponse:
      type: object
      properties:
        status:
          type: boolean
          default: true
          description: The status of the response
        message:
          type: string
          default: Success
          description: The message of the response
        timestamp:
          format: date-time
          type: string
          default: '2024-01-01T00:00:00.000Z'
          description: The timestamp of the response
        data:
          description: The comments fetched
          type: array
          items:
            $ref: '#/components/schemas/CommentResponseDto'
      required:
        - status
        - message
        - timestamp
        - data
    CommentResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the comment
        content:
          type: string
          description: The content of the comment
        contentHtml:
          type: string
          description: The HTML content of the comment
        contentJson:
          type: string
          description: The JSON content of the comment
        contentMarkdown:
          type: string
          description: The markdown content of the comment
        isEdited:
          type: boolean
          description: Indicates if the comment is edited
        threadName:
          type: string
          description: The name of the comment thread
        commentVisibility:
          type: string
          description: The visibility of the comment
        commentType:
          type: string
          description: The type of the comment
        isPinned:
          type: boolean
          description: Indicates if the comment is pinned
        sourceEmailId:
          type: string
          description: The source email ID of the comment
        metadata:
          type: object
          description: The metadata of the comment
        parentCommentId:
          type: string
          description: The parent comment ID of the comment
        createdAt:
          type: string
          description: The creation date of the comment
        updatedAt:
          type: string
          description: The update date of the comment
        author:
          type: string
          description: The author of the comment
        authorId:
          type: string
          description: The unique identifier of the author of the comment
        authorUserType:
          type: string
          description: The user type of the author of the comment
        customerContactId:
          type: string
          description: The customer contact ID of the author of the comment
        customerContactEmail:
          type: string
          description: The email of the customer contact of the author of the comment
        customerContactFirstName:
          type: string
          description: The first name of the customer contact of the author of the comment
        customerContactLastName:
          type: string
          description: The last name of the customer contact of the author of the comment
        customerContactAvatarUrl:
          type: string
          description: The avatar url of the customer contact of the author of the comment
        authorAvatarUrl:
          type: string
          description: The avatar url of the author of the comment
        impersonatedUserEmail:
          type: string
          description: The impersonated user email
        impersonatedUserName:
          type: string
          description: The impersonated user name
        impersonatedUserAvatar:
          type: string
          description: The impersonated user avatar
        attachments:
          description: The attachments of the comment
          type: array
          items:
            type: string
        deletedAt:
          type: string
          description: The deletion date of the comment (null if not deleted)
      required:
        - id
        - content
        - contentHtml
        - contentJson
        - contentMarkdown
        - isEdited
        - threadName
        - commentVisibility
        - commentType
        - isPinned
        - sourceEmailId
        - metadata
        - parentCommentId
        - createdAt
        - updatedAt
        - author
        - authorId
        - authorUserType
        - customerContactId
        - customerContactEmail
        - customerContactFirstName
        - customerContactLastName
        - customerContactAvatarUrl
        - authorAvatarUrl
        - impersonatedUserEmail
        - impersonatedUserName
        - impersonatedUserAvatar
        - attachments
        - deletedAt
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: 'Enter your API key '

````