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

# List comments for an information request

> Retrieves a paginated list of comments for an information request, enabling
auditors to view communication history and collaborate with customers.

This endpoint always includes soft-deleted records (where `deletionDate !== null`).
Clients should check the `deletionDate` field to identify and handle deleted records
appropriately in their systems.

This endpoint supports delta synchronization via the `changedSinceDate` parameter,
allowing efficient polling for changes without retrieving the entire dataset.

Pagination usage:
1. Make initial request with desired `pageSize`
2. Check `results.pageInfo.hasNextPage` to see if more data exists
3. If true, use `results.pageInfo.endCursor` as `pageCursor` in next request
4. Repeat until `hasNextPage` is false

Delta sync usage:
1. Store the timestamp of your last sync
2. Pass that timestamp as `changedSinceDate`
3. Only comments created, modified, or deleted since that timestamp are returned
4. Process updates, including soft-deletes (deletionDate !== null)
5. Update your last sync timestamp to the current time

Rate limit: 50 requests / minute.



## OpenAPI

````yaml https://spec.speakeasy.com/vanta/vanta/conduct-an-audit-with-code-samples get /audits/{auditId}/information-requests/{requestId}/comments
openapi: 3.0.0
info:
  title: Conduct an audit
  version: 1.0.0
  description: >-
    The Auditor API lets audit firms conduct audits from a tool outside of
    Vanta. Unlock data syncing with Vanta through this API.


    **Note for Vanta Gov (FedRAMP) customers:** Select `Vanta Gov (FedRAMP)`
    from the server dropdown to issue requests against
    `https://api.vanta-gov.com`. The OAuth token URL shown below defaults to the
    commercial host — replace it with `https://api.vanta-gov.com/oauth/token`.
  termsOfService: https://www.vanta.com/terms
  license:
    name: UNLICENSED
  contact:
    name: API Support
    url: https://help.vanta.com/
    email: support@vanta.com
servers:
  - url: https://api.vanta.com/v1
    description: Vanta (Commercial)
  - url: https://api.vanta-gov.com/v1
    description: Vanta Gov (FedRAMP)
security: []
paths:
  /audits/{auditId}/information-requests/{requestId}/comments:
    get:
      tags:
        - Audits
      summary: List comments for an information request
      description: >-
        Retrieves a paginated list of comments for an information request,
        enabling

        auditors to view communication history and collaborate with customers.


        This endpoint always includes soft-deleted records (where `deletionDate
        !== null`).

        Clients should check the `deletionDate` field to identify and handle
        deleted records

        appropriately in their systems.


        This endpoint supports delta synchronization via the `changedSinceDate`
        parameter,

        allowing efficient polling for changes without retrieving the entire
        dataset.


        Pagination usage:

        1. Make initial request with desired `pageSize`

        2. Check `results.pageInfo.hasNextPage` to see if more data exists

        3. If true, use `results.pageInfo.endCursor` as `pageCursor` in next
        request

        4. Repeat until `hasNextPage` is false


        Delta sync usage:

        1. Store the timestamp of your last sync

        2. Pass that timestamp as `changedSinceDate`

        3. Only comments created, modified, or deleted since that timestamp are
        returned

        4. Process updates, including soft-deletes (deletionDate !== null)

        5. Update your last sync timestamp to the current time


        Rate limit: 50 requests / minute.
      operationId: ListCommentsForInformationRequest
      parameters:
        - in: path
          name: auditId
          required: true
          schema:
            type: string
        - in: path
          name: requestId
          required: true
          schema:
            type: string
        - description: Maximum number of comments to return per page.
          in: query
          name: pageSize
          required: false
          schema:
            $ref: '#/components/schemas/PageSize'
        - description: >-
            Pagination cursor from a previous response. Provide to fetch the
            next page of comments.
          in: query
          name: pageCursor
          required: false
          schema:
            $ref: '#/components/schemas/PageCursor'
        - description: >-
            Includes all comments that have changed since changedSinceDate.

            Considers creationDate, modificationDate, and deletionDate
            timestamps when determining changes.
          in: query
          name: changedSinceDate
          required: false
          schema:
            type: string
            format: date-time
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/PaginatedResponse_InformationRequestComment_
              examples:
                Example 1:
                  value:
                    results:
                      data:
                        - id: 65fc81a3359c8508c9af880f
                          text: Some comment
                          creationDate: '2024-03-07T21:25:56.000Z'
                          modificationDate: '2024-03-07T21:25:56.000Z'
                          deletionDate: '2024-03-07T21:25:56.000Z'
                          email: vlad@vantaroo.com
                          authorName: Vlad Vantaroo
                      pageInfo:
                        hasNextPage: false
                        hasPreviousPage: false
                        startCursor: Njg5MGU0NzNkY2UxZGE1Z
                        endCursor: Njg5MGU0NzNkY2UxZGE1Z
      security:
        - bearerAuth: []
      x-codeSamples:
        - lang: typescript
          label: ListCommentsForInformationRequest
          source: |-
            import { Vanta } from "vanta-auditor-api-sdk";

            const vanta = new Vanta({
              bearerAuth: process.env["VANTA_BEARER_AUTH"] ?? "",
            });

            async function run() {
              const result = await vanta.audits.listCommentsForInformationRequest({
                auditId: "<id>",
                requestId: "<id>",
              });

              console.log(result);
            }

            run();
        - lang: java
          label: ListCommentsForInformationRequest
          source: >-
            package hello.world;


            import com.vanta.vanta_auditor_api.Vanta;

            import
            com.vanta.vanta_auditor_api.models.operations.ListCommentsForInformationRequestRequest;

            import
            com.vanta.vanta_auditor_api.models.operations.ListCommentsForInformationRequestResponse;

            import java.lang.Exception;


            public class Application {

                public static void main(String[] args) throws Exception {

                    Vanta sdk = Vanta.builder()
                            .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
                        .build();

                    ListCommentsForInformationRequestRequest req = ListCommentsForInformationRequestRequest.builder()
                            .auditId("<id>")
                            .requestId("<id>")
                            .build();

                    ListCommentsForInformationRequestResponse res = sdk.audits().listCommentsForInformationRequest()
                            .request(req)
                            .call();

                    if (res.paginatedResponseInformationRequestComment().isPresent()) {
                        System.out.println(res.paginatedResponseInformationRequestComment().get());
                    }
                }
            }
components:
  schemas:
    PageSize:
      type: integer
      format: int32
      default: 10
      description: >-
        Controls the maximum number of items returned in one response from the
        API.
      minimum: 1
      maximum: 100
    PageCursor:
      type: string
      description: >-
        A marker or pointer, telling the API where to start fetching items for
        the subsequent page in a paginated dataset.

        Note that the requested page will not include the item that corresponds
        to this cursor but will start from the one immediately

        after this cursor.
    PaginatedResponse_InformationRequestComment_:
      properties:
        results:
          properties:
            data:
              items:
                $ref: '#/components/schemas/InformationRequestComment'
              type: array
            pageInfo:
              $ref: '#/components/schemas/PageInfo'
          required:
            - data
            - pageInfo
          type: object
      required:
        - results
      type: object
      additionalProperties: false
    InformationRequestComment:
      description: >-
        A comment on an information request enables communication between
        auditors

        and customers regarding evidence requirements and submissions.


        These threaded discussions help clarify requests, explain or resolve
        questions about evidence,

        and are always visible to both parties once created.
      properties:
        id:
          type: string
          description: |-
            The unique identifier for the comment within Vanta's system.
            Format: ObjectId as a string (e.g., "6890e473dce1da5d8406f5e7").
        text:
          type: string
          description: >-
            The comment message content.

            Can include explanations, questions, or clarifications about the
            information request.
        creationDate:
          type: string
          format: date-time
          description: |-
            Timestamp when the comment was created.
            Format: ISO 8601 UTC timestamp.
        modificationDate:
          type: string
          format: date-time
          nullable: true
          description: |-
            Timestamp when the comment was last edited.
            Null if the comment has never been modified.
            Format: ISO 8601 UTC timestamp.
        deletionDate:
          type: string
          format: date-time
          nullable: true
          description: >-
            Timestamp when the comment was soft-deleted.

            Null if the comment has not been deleted.

            Soft deletes retain the comment for audit history while hiding it
            from normal operations.

            Format: ISO 8601 UTC timestamp.
        email:
          type: string
          nullable: true
          description: >-
            Email address of the comment author.

            This email uniquely identifies users between Vanta and external
            audit systems.

            Null when the comment author can't be matched to a Vanta user.
        authorName:
          type: string
          nullable: true
          description: >-
            Human-readable display name of the comment author.

            Null if the author's name is not available (e.g., user was deleted).

            This enables correct author attribution in integrations where users
            cannot

            be reliably matched across systems by email alone.
      required:
        - id
        - text
        - creationDate
        - modificationDate
        - deletionDate
        - email
        - authorName
      type: object
      additionalProperties: false
    PageInfo:
      description: Provides information about the pagination of a dataset.
      properties:
        endCursor:
          type: string
          nullable: true
          description: >-
            The cursor that points to the end of the current page, or null if
            there is no such cursor.
        hasNextPage:
          type: boolean
          description: Indicates if there is another page after the current page.
        hasPreviousPage:
          type: boolean
          description: Indicates if there is a page before the current page.
        startCursor:
          type: string
          nullable: true
          description: >-
            The cursor that points to the start of the current page, or null if
            there is no such cursor.
      required:
        - endCursor
        - hasNextPage
        - hasPreviousPage
        - startCursor
      type: object
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````