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

# List root comments (threads) across projects, project items and product items



## OpenAPI

````yaml /openapi.yaml get /comments
openapi: 3.0.1
info:
  title: GetSpecs REST API
  description: REST API documentation for GetSpecs.
  version: 1.0.0
servers:
  - url: /v1
  - url: https://demo-api.getspecs.io/v1
security: []
paths:
  /comments:
    get:
      tags:
        - Comment
      summary: >-
        List root comments (threads) across projects, project items and product
        items
      operationId: comments#index
      parameters:
        - name: X-Workspace-ID
          in: header
          required: true
          schema:
            type: string
        - name: scopes[]
          in: query
          schema:
            type: array
            items:
              type: string
              enum:
                - project
                - project_item
                - product_item
                - baseline_item
                - collaboration_request
          required: false
          description: >-
            Defaults to every scope the user may view (narrowed by the id
            filters), except collaboration_request, which is only included when
            requested
        - name: project_id
          in: query
          required: false
          description: >-
            Narrows the project, project_item and baseline_item scopes to one
            project
          schema:
            type: integer
        - name: project_item_id
          in: query
          required: false
          description: Only valid with the project_item scope
          schema:
            type: integer
        - name: product_item_id
          in: query
          required: false
          description: Only valid with the product_item scope
          schema:
            type: integer
        - name: baseline_item_id
          in: query
          required: false
          description: Only valid with the baseline_item scope
          schema:
            type: integer
        - name: collaboration_request_id
          in: query
          required: false
          description: Only valid with the collaboration_request scope
          schema:
            type: integer
        - name: page
          in: query
          required: false
          schema:
            type: integer
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/comment_feed_entry'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
        - apiKey: []
          workspaceId: []
components:
  schemas:
    comment_feed_entry:
      type: object
      required:
        - id
        - attachments
        - body
        - author
        - reply_count
        - last_activity_at
        - target
        - created_at
      properties:
        id:
          type: integer
        body:
          type: string
        mention_ids:
          type: array
          items:
            type: integer
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/comment_attachment'
        edited_at:
          type: string
          format: date-time
          nullable: true
        parent_id:
          type: integer
          nullable: true
        author:
          $ref: '#/components/schemas/user'
        reply_count:
          type: integer
        last_activity_at:
          type: string
          format: date-time
        target:
          $ref: '#/components/schemas/comment_target'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    error:
      type: object
      properties:
        error:
          type: string
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
                nullable: true
              code:
                type: string
                nullable: true
              message:
                type: string
            required:
              - message
    comment_attachment:
      type: object
      description: >-
        A file posted with a comment (any commentable, collaboration threads
        included). Oldest first. Deleted with the comment, or when its author
        removes it (`remove_attachment_ids`).
      required:
        - id
        - filename
        - content_type
        - byte_size
        - url
      properties:
        id:
          type: integer
        filename:
          type: string
          description: The name it was uploaded with.
        content_type:
          type: string
          example: application/pdf
        byte_size:
          type: integer
        url:
          type: string
          description: >-
            A download link that keeps the uploaded name (presigned on private
            storage).
    user:
      type: object
      properties:
        id:
          type: integer
        email:
          type: string
        first_name:
          type: string
          nullable: true
        last_name:
          type: string
          nullable: true
        logo_url:
          type: string
          nullable: true
        created_at:
          type: string
          format: date-time
    comment_target:
      type: object
      required:
        - type
        - id
      properties:
        type:
          type: string
          enum:
            - project
            - project_item
            - product_item
            - baseline_item
            - collaboration_request
        id:
          type: integer
        identifier:
          type: string
          description: Present for project_item, product_item and baseline_item targets
        package_id:
          type: integer
          description: Present for baseline_item targets
        name:
          type: string
          description: Present for collaboration_request targets
        request_type:
          type: string
          enum:
            - project_items_edit
            - purchase_order_edit
          description: Present for collaboration_request targets
  securitySchemes:
    apiKey:
      type: apiKey
      name: authorization
      in: header
    workspaceId:
      type: apiKey
      name: X-Workspace-ID
      in: header

````

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