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

# List comments

> Lists all comments on a post.



## OpenAPI

````yaml get /v2/posts/{post_id}/comments
openapi: 3.0.0
info:
  title: Campsite API
  version: 2.0.0
  contact:
    email: support@campsite.com
  description: >
    This is the internal documentation for our public REST API. Use this as a
    starting point for hacking on projects. We'll build a proper documentation
    site later.


    ⚠️  This API is a work in progress! Field and endpoint names are subject to
    change, and not all endpoints have been added yet.
servers:
  - url: https://api.campsite.com
security:
  - bearerAuth: []
paths:
  /v2/posts/{post_id}/comments:
    get:
      summary: List comments
      description: Lists all comments on a post.
      operationId: v2_post_comments_get
      parameters:
        - in: query
          name: after
          required: false
          schema:
            type: string
            properties: {}
          description: >-
            Use with `next_cursor` and `prev_cursor` in the response to paginate
            through results.
        - in: query
          name: limit
          required: false
          schema:
            type: number
            properties: {}
          description: Specifies how many records to return. The default and maximum is 50.
        - in: query
          name: parent_id
          required: false
          schema:
            type: string
            properties: {}
          description: The ID of the parent comment.
        - in: query
          name: sort
          required: false
          schema:
            type: string
            enum:
              - created_at
            properties: {}
        - in: query
          name: direction
          required: false
          schema:
            type: string
            enum:
              - asc
              - desc
            properties: {}
        - in: path
          name: post_id
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful operation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CommentPage'
components:
  schemas:
    V2CommentPage:
      type: object
      required:
        - data
        - total_count
      properties:
        next_cursor:
          type: string
          properties: {}
          nullable: true
        prev_cursor:
          type: string
          properties: {}
          nullable: true
        data:
          items:
            $ref: '#/components/schemas/V2Comment'
          type: array
        total_count:
          type: number
          properties: {}
    V2Comment:
      type: object
      required:
        - id
        - content
        - created_at
        - replies_count
        - parent_id
        - subject_id
        - subject_type
        - author
      properties:
        id:
          type: string
          properties: {}
        content:
          type: string
          properties: {}
        created_at:
          type: string
          properties: {}
        replies_count:
          type: number
          properties: {}
        parent_id:
          type: string
          properties: {}
          nullable: true
        subject_id:
          type: string
          properties: {}
        subject_type:
          type: string
          properties: {}
        author:
          $ref: '#/components/schemas/V2Author'
    V2Author:
      type: object
      required:
        - avatar_urls
        - name
        - id
        - type
      properties:
        avatar_urls:
          $ref: '#/components/schemas/AvatarUrls'
        name:
          type: string
          properties: {}
        id:
          type: string
          properties: {}
        type:
          type: string
          enum:
            - app
            - member
          properties: {}
    AvatarUrls:
      type: object
      required:
        - xs
        - sm
        - base
        - lg
        - xl
        - xxl
      properties:
        xs:
          type: string
          properties: {}
        sm:
          type: string
          properties: {}
        base:
          type: string
          properties: {}
        lg:
          type: string
          properties: {}
        xl:
          type: string
          properties: {}
        xxl:
          type: string
          properties: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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