---
title: "POST /v1/{+parent}/pullRequestComments:batchCreate"
method: POST
path: "/v1/{+parent}/pullRequestComments:batchCreate"
tags: ["projects"]
---

# POST /v1/{+parent}/pullRequestComments:batchCreate

`POST /v1/{+parent}/pullRequestComments:batchCreate`

Batch creates pull request comments. This function is used to create multiple PullRequestComments for code review. There needs to be exactly one PullRequestComment of type Review, and at most 100 PullRequestComments of type Code per request. The Position of the code comments must be unique within the request.

## Path parameters

- `parent` string, required

## Request body

- BatchCreatePullRequestCommentsRequest — The request to batch create pull request comments.
  - `requests` CreatePullRequestCommentRequest[] — Required. The request message specifying the resources to create. There should be exactly one CreatePullRequestCommentRequest with CommentDetail being REVIEW in the list, and no more than 100 CreatePullRequestCommentRequests with CommentDetail being CODE in the list
    - `parent` string — Required. The pull request in which to create the pull request comment. Format: `projects/{project_number}/locations/{location_id}/repositories/{repository_id}/pullRequests/{pull_request_id}`
    - `pullRequestComment` PullRequestComment — PullRequestComment represents a comment on a pull request.
      - `review` Review — The review summary comment.
        - `actionType` 'ACTION_TYPE_UNSPECIFIED' | 'COMMENT' | 'CHANGE_REQUESTED' | 'APPROVED' — Required. The review action type.
        - `effectiveCommitSha` string — Output only. The effective commit sha this review is pointing to.
        - `body` string — Optional. The comment body.
      - `updateTime` string, google-datetime — Output only. Last updated timestamp.
      - `comment` Comment — The general pull request comment.
        - `body` string — Required. The comment body.
      - `createTime` string, google-datetime — Output only. Creation timestamp.
      - `name` string — Identifier. Unique identifier for the pull request comment. The comment id is generated by the server. Format: `projects/{project}/locations/{location}/repositories/{repository}/pullRequests/{pull_request}/pullRequestComments/{comment_id}`
      - `code` Code — The comment on a code line.
        - `position` Position — The position of the code comment.
          - `path` string — Required. The path of the file.
          - `line` string, int64 — Required. The line number of the comment. Positive value means it's on the new side of the diff, negative value means it's on the old side.
        - `body` string — Required. The comment body.
        - `reply` string — Optional. Input only. The PullRequestComment resource name that this comment is replying to.
        - `resolved` boolean — Output only. Boolean indicator if the comment is resolved.
        - `effectiveCommitSha` string — Output only. The effective commit sha this code comment is pointing to.
        - `effectiveRootComment` string — Output only. The root comment of the conversation, derived from the reply field.

## Response `200`

Successful response

---

[API](https://skmtc.net/google/apis/securesourcemanager.md) · [All operations](https://skmtc.net/google/apis/securesourcemanager/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/google/securesourcemanager/versions/4c9890b46a17/schema)
