# Create a reply for a review comment

From **GitHub v3 REST API**.

`POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies`

Creates a reply to a review comment for a pull request. For the `comment_id`, provide the ID of the review comment you are replying to. This must be the ID of a _top-level review comment_, not a reply to that comment. Replies to replies are not supported.

This endpoint triggers [notifications](https://docs.github.com/en/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. See "[Secondary rate limits](https://docs.github.com/enterprise-server@3.0/rest/overview/resources-in-the-rest-api#secondary-rate-limits)" and "[Dealing with secondary rate limits](https://docs.github.com/enterprise-server@3.0/rest/guides/best-practices-for-integrators#dealing-with-secondary-rate-limits)" for details.

## Parameters

### `owner`

- Location: path
- Required: true
- Type: `string`

### `repo`

- Location: path
- Required: true
- Type: `string`

### `pull_number`

- Location: path
- Required: true
- Type: `integer`

### `comment_id`

- Location: path
- Required: true
- Type: `integer`

comment_id parameter

## Request body

- Required: true
### `application/json`

- Type: `object`

```json
{
  "body": "Great stuff!"
}
```

```json
{"properties":{"body":{"description":"The text of the review comment.","type":"string"}},"required":["body"],"type":"object"}
```

## Responses

### `201`

Response

#### Headers

##### `Location`

- Type: `string`

- Example: `https://api.github.com/repos/octocat/Hello-World/pulls/comments/1`

### `application/json`

- Type: `object`

Pull Request Review Comments are comments on a portion of the Pull Request's diff.

```json
{
  "_links": {
    "html": {
      "href": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1"
    },
    "pull_request": {
      "href": "https://api.github.com/repos/octocat/Hello-World/pulls/1"
    },
    "self": {
      "href": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1"
    }
  },
  "author_association": "NONE",
  "body": "Great stuff!",
  "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  "created_at": "2011-04-14T16:00:49Z",
  "diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...",
  "html_url": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1",
  "id": 10,
  "in_reply_to_id": 426899381,
  "line": 2,
  "node_id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw",
  "original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840",
  "original_line": 2,
  "original_position": 4,
  "original_start_line": 1,
  "path": "file1.txt",
  "position": 1,
  "pull_request_review_id": 42,
  "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1",
  "side": "RIGHT",
  "start_line": 1,
  "start_side": "RIGHT",
  "updated_at": "2011-04-14T16:00:49Z",
  "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1",
  "user": {
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "events_url": "https://api.github.com/users/octocat/events{/privacy}",
    "followers_url": "https://api.github.com/users/octocat/followers",
    "following_url": "https://api.github.com/users/octocat/following{/other_user}",
    "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
    "gravatar_id": "",
    "html_url": "https://github.com/octocat",
    "id": 1,
    "login": "octocat",
    "node_id": "MDQ6VXNlcjE=",
    "organizations_url": "https://api.github.com/users/octocat/orgs",
    "received_events_url": "https://api.github.com/users/octocat/received_events",
    "repos_url": "https://api.github.com/users/octocat/repos",
    "site_admin": false,
    "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
    "type": "User",
    "url": "https://api.github.com/users/octocat"
  }
}
```

```json
{"description":"Pull Request Review Comments are comments on a portion of the Pull Request's diff.","properties":{"_links":{"properties":{"html":{"properties":{"href":{"example":"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1","format":"uri","type":"string"}},"required":["href"],"type":"object"},"pull_request":{"properties":{"href":{"example":"https://api.github.com/repos/octocat/Hello-World/pulls/1","format":"uri","type":"string"}},"required":["href"],"type":"object"},"self":{"properties":{"href":{"example":"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1","format":"uri","type":"string"}},"required":["href"],"type":"object"}},"required":["self","html","pull_request"],"type":"object"},"author_association":{"$ref":"#/components/schemas/author_association"},"body":{"description":"The text of the comment.","example":"We should probably include a check for null values here.","type":"string"},"body_html":{"example":"\"\u003cp\u003ecomment body\u003c/p\u003e\"","type":"string"},"body_text":{"example":"\"comment body\"","type":"string"},"commit_id":{"description":"The SHA of the commit to which the comment applies.","example":"6dcb09b5b57875f334f61aebed695e2e4193db5e","type":"string"},"created_at":{"example":"2011-04-14T16:00:49Z","format":"date-time","type":"string"},"diff_hunk":{"description":"The diff of the line that the comment refers to.","example":"@@ -16,33 +16,40 @@ public class Connection : IConnection...","type":"string"},"html_url":{"description":"HTML URL for the pull request review comment.","example":"https://github.com/octocat/Hello-World/pull/1#discussion-diff-1","format":"uri","type":"string"},"id":{"description":"The ID of the pull request review comment.","example":1,"type":"integer"},"in_reply_to_id":{"description":"The comment ID to reply to.","example":8,"type":"integer"},"line":{"description":"The line of the blob to which the comment applies. The last line of the range for a multi-line comment","example":2,"type":"integer"},"node_id":{"description":"The node ID of the pull request review comment.","example":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw","type":"string"},"original_commit_id":{"description":"The SHA of the original commit to which the comment applies.","example":"9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840","type":"string"},"original_line":{"description":"The line of the blob to which the comment applies. The last line of the range for a multi-line comment","example":2,"type":"integer"},"original_position":{"description":"The index of the original line in the diff to which the comment applies.","example":4,"type":"integer"},"original_start_line":{"description":"The first line of the range for a multi-line comment.","example":2,"nullable":true,"type":"integer"},"path":{"description":"The relative path of the file to which the comment applies.","example":"config/database.yaml","type":"string"},"position":{"description":"The line index in the diff to which the comment applies.","example":1,"type":"integer"},"pull_request_review_id":{"description":"The ID of the pull request review to which the comment belongs.","example":42,"nullable":true,"type":"integer"},"pull_request_url":{"description":"URL for the pull request that the review comment belongs to.","example":"https://api.github.com/repos/octocat/Hello-World/pulls/1","format":"uri","type":"string"},"reactions":{"$ref":"#/components/schemas/reaction-rollup"},"side":{"default":"RIGHT","description":"The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment","enum":["LEFT","RIGHT"],"type":"string"},"start_line":{"description":"The first line of the range for a multi-line comment.","example":2,"nullable":true,"type":"integer"},"start_side":{"default":"RIGHT","description":"The side of the first line of the range for a multi-line comment.","enum":["LEFT","RIGHT"],"nullable":true,"type":"string"},"updated_at":{"example":"2011-04-14T16:00:49Z","format":"date-time","type":"string"},"url":{"description":"URL for the pull request review comment","example":"https://api.github.com/repos/octocat/Hello-World/pulls/comments/1","type":"string"},"user":{"$ref":"#/components/schemas/simple-user"}},"required":["url","id","node_id","pull_request_review_id","diff_hunk","path","position","original_position","commit_id","original_commit_id","user","body","created_at","updated_at","html_url","pull_request_url","author_association","_links"],"title":"Pull Request Review Comment","type":"object"}
```

### `404`

Resource not found

### `application/json`

- Type: `object`

Basic Error

```json
{"description":"Basic Error","properties":{"documentation_url":{"type":"string"},"message":{"type":"string"},"status":{"type":"string"},"url":{"type":"string"}},"title":"Basic Error","type":"object"}
```

## Request examples

### cURL

```shell
curl --request POST \
  --url {protocol}://{hostname}/api/v3/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies \
  --header 'content-type: application/json' \
  --data '{
  "body": "Great stuff!"
}'
```
