> ## 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 on an entity

> Get all comments for an entity (ticket, account activity, note, or task). This endpoint is only available for standard and enterprise tier organizations.



## OpenAPI

````yaml get /v1/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/comments:
    get:
      tags:
        - Comments
      description: >-
        Get all comments for an entity (ticket, account activity, note, or
        task). This endpoint is only available for standard and enterprise tier
        organizations.
      parameters:
        - 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: entityType
          required: true
          in: query
          description: The type of the entity
          schema:
            type: string
        - name: entityId
          required: true
          in: query
          description: The identifier of the entity
          schema:
            type: string
      responses:
        '200':
          description: Operation successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAllCommentsResponse'
        '204':
          headers:
            x-ticket-id:
              description: Requested ticket id
              schema:
                type: string
          description: ''
        '401':
          description: Unauthorized
          content:
            application/json:
              example:
                statusCode: 401
                message: Unauthorized
                error: Unauthorized
        '403':
          description: Forbidden - Organization tier requirement not met
          content:
            application/json:
              example:
                statusCode: 403
                message: >-
                  This feature is only available for standard and enterprise
                  tier organizations
                error: Forbidden
        '404':
          description: Entity not found
          content:
            application/json:
              example:
                statusCode: 404
                message: Entity not found
                error: Not Found
        '429':
          description: Too Many Requests
          content:
            application/json:
              example:
                statusCode: 429
                message: Too Many Requests
                error: Too Many Requests
        '500':
          description: Internal Server Error
          content:
            application/json:
              example:
                statusCode: 500
                message: Something went wrong!
                error: Internal Server Error
        '503':
          description: Service Unavailable
          content:
            application/json:
              example:
                statusCode: 503
                message: Service Unavailable
                error: Service 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 '

````