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

# Get a comment thread with its replies (a reply id resolves to its root thread)



## OpenAPI

````yaml /openapi.yaml get /comments/{id}
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/{id}:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
    get:
      tags:
        - Comment
      summary: >-
        Get a comment thread with its replies (a reply id resolves to its root
        thread)
      operationId: comments#show
      parameters:
        - name: X-Workspace-ID
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/comment'
        '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'
      security:
        - apiKey: []
          workspaceId: []
components:
  schemas:
    comment:
      type: object
      required:
        - attachments
      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:
          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
        target:
          $ref: '#/components/schemas/comment_target'
        replies:
          type: array
          items:
            type: object
            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:
                type: object
              created_at:
                type: string
                format: date-time
              updated_at:
                type: string
                format: date-time
        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).
    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.