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

# List comments

> List the comments written by people of the company (paginated), oldest first by default.

Version:
v4


## OpenAPI

````yaml openapi-v2.json GET /discussion/v4/comments
openapi: 3.0.0
info:
  title: Sesame Public API v2
  description: >-
    Public API v2 — additive surface `/public/{context}/v{N}`,
    endpoint-versioned from v4
  version: 1.0.0
servers:
  - url: https://api.sesamehr.com
    description: Production
security:
  - Bearer: []
paths:
  /discussion/v4/comments:
    get:
      tags:
        - Comments
      summary: List comments
      description: >-
        List the comments written by people of the company (paginated), oldest
        first by default.
      operationId: ListComments
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            default: 1
            minimum: 1
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            default: 20
            maximum: 300
            minimum: 1
        - name: commentId
          in: query
          description: >-
            Only the comment with this id. An id that does not exist, is deleted
            or belongs to another company gives an empty page.
          required: false
          schema:
            type: string
            format: uuid
        - name: threadId
          in: query
          description: Only the comments of this thread.
          required: false
          schema:
            type: string
            format: uuid
        - name: plannedTaskId
          in: query
          description: Only the comments of the thread of this planned task.
          required: false
          schema:
            type: string
            format: uuid
        - name: createdFrom
          in: query
          description: >-
            Created at or after this ISO 8601 date-time with zone. Encode `+` as
            `%2B`.
          required: false
          schema:
            type: string
            format: date-time
        - name: createdTo
          in: query
          description: >-
            Created at or before this ISO 8601 date-time with zone. Must not be
            earlier than `createdFrom`. Encode `+` as `%2B`.
          required: false
          schema:
            type: string
            format: date-time
        - name: sort
          in: query
          description: >-
            `createdAt` for oldest first or `-createdAt` for newest first. Ties
            are broken by `id` ascending.
          required: false
          schema:
            type: string
            default: createdAt
      responses:
        '200':
          description: The paginated comments.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCommentsResponse'
        '401':
          description: Missing or invalid API key
        '403':
          description: API consumer lacks permission over the requested resource
        '422':
          description: Validation error
components:
  schemas:
    ListCommentsResponse:
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/CommentEntry'
        meta:
          $ref: '#/components/schemas/PaginationMetaEntry'
      type: object
    CommentEntry:
      properties:
        id:
          type: string
          format: uuid
        comment:
          type: string
        thread:
          $ref: '#/components/schemas/CommentThreadEntry'
        author:
          oneOf:
            - $ref: '#/components/schemas/CommentAuthorEntry'
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      type: object
    PaginationMetaEntry:
      properties:
        currentPage:
          description: Current page number (1-based).
          type: integer
        lastPage:
          description: Last available page number.
          type: integer
        total:
          description: Total number of items across all pages.
          type: integer
        perPage:
          description: Number of items per page.
          type: integer
      type: object
    CommentThreadEntry:
      properties:
        id:
          type: string
          format: uuid
        entityReference:
          $ref: '#/components/schemas/CommentEntityReferenceEntry'
      type: object
    CommentAuthorEntry:
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          enum:
            - adviser
            - auditPortal
            - employee
            - reseller
        firstName:
          type: string
        lastName:
          type: string
        imageProfileURL:
          type: string
          nullable: true
      type: object
    CommentEntityReferenceEntry:
      properties:
        id:
          type: string
          format: uuid
        type:
          description: Type of the entity the thread belongs to, e.g. `planned_task`.
          type: string
      type: object
  securitySchemes:
    Bearer:
      type: http
      description: 'Sesame Public API consumer token (Authorization: Bearer <token>)'
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.