Google Drive Comments API

The comments API from Google Drive — 2 operation(s) for comments.

Operations 5

PATCH /files/{fileId}/comments/{commentId} Updates a comment with patch semantics #
DELETE /files/{fileId}/comments/{commentId} Deletes a comment #
GET /files/{fileId}/comments/{commentId} Gets a comment by ID #
GET /files/{fileId}/comments Lists a file's comments #
POST /files/{fileId}/comments Creates a comment on a file #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/google-drive:google-drive-comments-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

google-drive-comments-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Google Drive Comments API
  description: The Google Drive API allows clients to access resources from Google Drive.
  version: v3
  contact:
    name: Google
    url: https://developers.google.com/workspace/drive/
  termsOfService: https://developers.google.com/terms
  x-generated-from: google-discovery
  x-source: https://www.googleapis.com/discovery/v1/apis/drive/v3/rest
  x-discovery-revision: '20261102'
  x-generated: '2026-11-04'
servers:
- url: https://www.googleapis.com/drive/v3
  description: Google Drive REST API v3
security:
- oauth2: []
tags:
- name: Comments
paths:
  /files/{fileId}/comments/{commentId}:
    patch:
      operationId: updateComment
      summary: Updates a comment with patch semantics
      description: 'Updates a comment with patch semantics. For more information, see Manage comments and replies. Required: The `fields` parameter must be set. To return the exact fields you need, see Return specific fields.'
      tags:
      - Comments
      x-discovery-id: drive.comments.update
      parameters:
      - name: fileId
        in: path
        required: true
        schema:
          type: string
        description: The ID of the file.
      - name: commentId
        in: path
        required: true
        schema:
          type: string
        description: The ID of the comment.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Comment'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - oauth2:
        - https://www.googleapis.com/auth/drive
        - https://www.googleapis.com/auth/drive.file
    delete:
      operationId: deleteComment
      summary: Deletes a comment
      description: Deletes a comment. For more information, see Manage comments and replies.
      tags:
      - Comments
      x-discovery-id: drive.comments.delete
      parameters:
      - name: fileId
        in: path
        required: true
        schema:
          type: string
        description: The ID of the file.
      - name: commentId
        in: path
        required: true
        schema:
          type: string
        description: The ID of the comment.
      responses:
        '200':
          description: Successful response
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - oauth2:
        - https://www.googleapis.com/auth/drive
        - https://www.googleapis.com/auth/drive.file
    get:
      operationId: getComment
      summary: Gets a comment by ID
      description: 'Gets a comment by ID. For more information, see Manage comments and replies. Required: The `fields` parameter must be set. To return the exact fields you need, see Return specific fields.'
      tags:
      - Comments
      x-discovery-id: drive.comments.get
      parameters:
      - name: fileId
        in: path
        required: true
        schema:
          type: string
        description: The ID of the file.
      - name: commentId
        in: path
        required: true
        schema:
          type: string
        description: The ID of the comment.
      - name: includeDeleted
        in: query
        required: false
        schema:
          type: boolean
          default: 'false'
        description: Whether to return deleted comments. Deleted comments will not include their original content.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - oauth2:
        - https://www.googleapis.com/auth/drive
        - https://www.googleapis.com/auth/drive.file
        - https://www.googleapis.com/auth/drive.meet.readonly
        - https://www.googleapis.com/auth/drive.readonly
  /files/{fileId}/comments:
    get:
      operationId: listComments
      summary: Lists a file's comments
      description: 'Lists a file''s comments. For more information, see Manage comments and replies. Required: The `fields` parameter must be set. To return the exact fields you need, see Return specific fields.'
      tags:
      - Comments
      x-discovery-id: drive.comments.list
      parameters:
      - name: fileId
        in: path
        required: true
        schema:
          type: string
        description: The ID of the file.
      - name: startModifiedTime
        in: query
        required: false
        schema:
          type: string
        description: The minimum value of 'modifiedTime' for the result comments (RFC 3339 date-time).
      - name: pageSize
        in: query
        required: false
        schema:
          type: integer
          format: int32
          default: '20'
        description: The maximum number of comments to return. The service may return fewer than this value. If unspecified, at most 20 comments will be returned. The maximum value is 100; values above 100 will be coerced to 100.
      - name: includeDeleted
        in: query
        required: false
        schema:
          type: boolean
          default: 'false'
        description: Whether to include deleted comments. Deleted comments will not include their original content.
      - name: pageToken
        in: query
        required: false
        schema:
          type: string
        description: The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommentList'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - oauth2:
        - https://www.googleapis.com/auth/drive
        - https://www.googleapis.com/auth/drive.file
        - https://www.googleapis.com/auth/drive.meet.readonly
        - https://www.googleapis.com/auth/drive.readonly
    post:
      operationId: createComment
      summary: Creates a comment on a file
      description: 'Creates a comment on a file. For more information, see Manage comments and replies. Required: The `fields` parameter must be set. To return the exact fields you need, see Return specific fields.'
      tags:
      - Comments
      x-discovery-id: drive.comments.create
      parameters:
      - name: fileId
        in: path
        required: true
        schema:
          type: string
        description: The ID of the file.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Comment'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Comment'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - oauth2:
        - https://www.googleapis.com/auth/drive
        - https://www.googleapis.com/auth/drive.file
components:
  schemas:
    CommentList:
      type: object
      description: A list of comments on a file.
      properties:
        comments:
          type: array
          description: The list of comments. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.
          items:
            $ref: '#/components/schemas/Comment'
        kind:
          type: string
          description: 'Identifies what kind of resource this is. Value: the fixed string `"drive#commentList"`.'
          default: drive#commentList
        nextPageToken:
          type: string
          description: The page token for the next page of comments. This will be absent if the end of the comments list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results. The page token is typically valid for several hours. However, if new items are added or removed, your expected results might differ.
    User:
      type: object
      description: Information about a Drive user.
      properties:
        photoLink:
          type: string
          description: Output only. A link to the user's profile photo, if available.
          readOnly: true
        emailAddress:
          type: string
          description: Output only. The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.
          readOnly: true
        me:
          type: boolean
          description: Output only. Whether this user is the requesting user.
          readOnly: true
        displayName:
          type: string
          description: Output only. A plain text displayable name for this user.
          readOnly: true
        kind:
          type: string
          description: 'Output only. Identifies what kind of resource this is. Value: the fixed string `drive#user`.'
          default: drive#user
          readOnly: true
        permissionId:
          type: string
          description: Output only. The user's ID as visible in Permission resources.
          readOnly: true
    Comment:
      type: object
      description: A comment on a file. Some resource methods (such as `comments.update`) require a `commentId`. Use the `comments.list` method to retrieve the ID for a comment in a file.
      properties:
        kind:
          type: string
          description: 'Output only. Identifies what kind of resource this is. Value: the fixed string `"drive#comment"`.'
          default: drive#comment
        quotedFileContent:
          type: object
          description: The file content to which the comment refers, typically within the anchor region. For a text file, for example, this would be the text at the location of the comment.
          properties:
            mimeType:
              type: string
              description: The MIME type of the quoted content.
            value:
              type: string
              description: The quoted content itself. This is interpreted as plain text if set through the API.
        mentionedEmailAddresses:
          type: array
          description: Output only. A list of email addresses for users mentioned in this comment. If no users are mentioned, the list is empty.
          readOnly: true
          items:
            type: string
        content:
          type: string
          description: The plain text content of the comment. This field is used for setting the content, while `htmlContent` should be displayed.
        htmlContent:
          type: string
          description: Output only. The content of the comment with HTML formatting.
        replies:
          type: array
          description: Output only. The full list of replies to the comment in chronological order.
          items:
            $ref: '#/components/schemas/Reply'
        author:
          $ref: '#/components/schemas/User'
        deleted:
          type: boolean
          description: Output only. Whether the comment has been deleted. A deleted comment has no content.
        id:
          type: string
          description: Output only. The ID of the comment.
        modifiedTime:
          type: string
          description: The last time the comment or any of its replies was modified (RFC 3339 date-time).
          format: date-time
        assigneeEmailAddress:
          type: string
          description: Output only. The email address of the user assigned to this comment. If no user is assigned, the field is unset.
          readOnly: true
        createdTime:
          type: string
          description: The time at which the comment was created (RFC 3339 date-time).
          format: date-time
        resolved:
          type: boolean
          description: Output only. Whether the comment has been resolved by one of its replies.
        anchor:
          type: string
          description: A region of the document represented as a JSON string. For details on defining anchor properties, refer to [Manage comments and replies](https://developers.google.com/workspace/drive/api/v3/manage-comments).
    ErrorResponse:
      type: object
      description: Google API error envelope (https://cloud.google.com/apis/design/errors)
      properties:
        error:
          type: object
          properties:
            code:
              type: integer
            message:
              type: string
            errors:
              type: array
              items:
                type: object
                properties:
                  domain:
                    type: string
                  reason:
                    type: string
                  message:
                    type: string
                  location:
                    type: string
                  locationType:
                    type: string
    Reply:
      type: object
      description: A reply to a comment on a file. Some resource methods (such as `replies.update`) require a `replyId`. Use the `replies.list` method to retrieve the ID for a reply.
      properties:
        mentionedEmailAddresses:
          type: array
          description: Output only. A list of email addresses for users mentioned in this comment. If no users are mentioned, the list is empty.
          readOnly: true
          items:
            type: string
        kind:
          type: string
          description: 'Output only. Identifies what kind of resource this is. Value: the fixed string `"drive#reply"`.'
          default: drive#reply
        id:
          type: string
          description: Output only. The ID of the reply.
        author:
          $ref: '#/components/schemas/User'
        deleted:
          type: boolean
          description: Output only. Whether the reply has been deleted. A deleted reply has no content.
        createdTime:
          type: string
          description: The time at which the reply was created (RFC 3339 date-time).
          format: date-time
        modifiedTime:
          type: string
          description: The last time the reply was modified (RFC 3339 date-time).
          format: date-time
        content:
          type: string
          description: The plain text content of the reply. This field is used for setting the content, while `htmlContent` should be displayed. This field is required by the `create` method if no `action` value is specified.
        action:
          type: string
          description: 'The action the reply performed to the parent comment. The supported values are: * `resolve` * `reopen`'
        assigneeEmailAddress:
          type: string
          description: Output only. The email address of the user assigned to this comment. If no user is assigned, the field is unset.
          readOnly: true
        htmlContent:
          type: string
          description: Output only. The content of the reply with HTML formatting.
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://accounts.google.com/o/oauth2/auth
          tokenUrl: https://oauth2.googleapis.com/token
          scopes:
            https://www.googleapis.com/auth/drive.scripts: Modify your Google Apps Script scripts' behavior
            https://www.googleapis.com/auth/drive.meet.readonly: See and download your Google Drive files that were created or edited by Google Meet.
            https://www.googleapis.com/auth/drive: See, edit, create, and delete all of your Google Drive files
            https://www.googleapis.com/auth/drive.appdata: See, create, and delete its own configuration data in your Google Drive
            https://www.googleapis.com/auth/drive.file: See, edit, create, and delete only the specific Google Drive files you use with this app
            https://www.googleapis.com/auth/drive.apps.readonly: View your Google Drive apps
            https://www.googleapis.com/auth/drive.photos.readonly: View the photos, videos and albums in your Google Photos
            https://www.googleapis.com/auth/drive.readonly: See and download all your Google Drive files
            https://www.googleapis.com/auth/drive.metadata: View and manage metadata of files in your Google Drive
            https://www.googleapis.com/auth/drive.metadata.readonly: See information about your Google Drive files