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

# POST /v1/{+parent}/pullRequestComments

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

Creates a pull request comment. This function is used to create a single PullRequestComment of type Comment, or a single PullRequestComment of type Code that's replying to another PullRequestComment of type Code. Use BatchCreatePullRequestComments to create multiple PullRequestComments for code reviews.

## Path parameters

- `parent` string, required

## Request body

- 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)
