v56

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,4581,08113.3 MB
pulls

Create a reply for a review comment

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. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "Rate limits for the API" and "Best practices for using the REST API."

This endpoint supports the following custom media types. For more information, see "Media types."

  • application/vnd.github-commitcomment.raw+json: Returns the raw markdown body. Response will include body. This is the default if you do not pass any specific media type.
  • application/vnd.github-commitcomment.text+json: Returns a text only representation of the markdown body. Response will include body_text.
  • application/vnd.github-commitcomment.html+json: Returns HTML rendered from the body's markdown. Response will include body_html.
  • application/vnd.github-commitcomment.full+json: Returns raw, text, and HTML representations. Response will include body, body_text, and body_html.
post/repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies

Path parameters

ownerstring required

The account owner of the repository. The name is not case sensitive.

repostring required

The name of the repository without the .git extension. The name is not case sensitive.

pull_numberinteger required

The number that identifies the pull request.

comment_idinteger required

The unique identifier of the comment.

Request body

bodystring required

The text of the review comment.

Response

Response

urlstring required

URL for the pull request review comment

pull_request_review_idinteger nullable required

The ID of the pull request review to which the comment belongs.

idinteger required

The ID of the pull request review comment.

node_idstring required

The node ID of the pull request review comment.

diff_hunkstring required

The diff of the line that the comment refers to.

pathstring required

The relative path of the file to which the comment applies.

positioninteger

The line index in the diff to which the comment applies. This field is closing down; use line instead.

original_positioninteger

The index of the original line in the diff to which the comment applies. This field is closing down; use original_line instead.

commit_idstring required

The SHA of the commit to which the comment applies.

original_commit_idstring required

The SHA of the original commit to which the comment applies.

in_reply_to_idinteger

The comment ID to reply to.

bodystring required

The text of the comment.

created_atstring date-time required
updated_atstring date-time required
html_urlstring uri required

HTML URL for the pull request review comment.

pull_request_urlstring uri required

URL for the pull request that the review comment belongs to.

author_association'COLLABORATOR' | 'CONTRIBUTOR' | 'FIRST_TIMER' | 'FIRST_TIME_CONTRIBUTOR' | 'MANNEQUIN' | 'MEMBER' | 'NONE' | 'OWNER' required

How the author is associated with the repository.

start_lineinteger nullable

The first line of the range for a multi-line comment.

original_start_lineinteger nullable

The first line of the range for a multi-line comment.

start_side'LEFT' | 'RIGHT' nullable

The side of the first line of the range for a multi-line comment.

lineinteger

The line of the blob to which the comment applies. The last line of the range for a multi-line comment

original_lineinteger

The line of the blob to which the comment applies. The last line of the range for a multi-line comment

side'LEFT' | 'RIGHT'

The side of the diff to which the comment applies. The side of the last line of the range for a multi-line comment

subject_type'line' | 'file'

The level at which the comment is targeted, can be a diff line or a file.

body_htmlstring
body_textstring

Example response

{
  "url": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1",
  "pull_request_review_id": 42,
  "id": 1,
  "node_id": "MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDEw",
  "diff_hunk": "@@ -16,33 +16,40 @@ public class Connection : IConnection...",
  "path": "config/database.yaml",
  "position": 1,
  "original_position": 4,
  "commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
  "original_commit_id": "9c48853fa3dc5c1c3d6f1f1cd1f2743e72652840",
  "in_reply_to_id": 8,
  "user": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "41d064eb2195891e12d0413f63227ea7",
    "url": "https://api.github.com/users/octocat",
    "html_url": "https://github.com/octocat",
    "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}",
    "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
    "organizations_url": "https://api.github.com/users/octocat/orgs",
    "repos_url": "https://api.github.com/users/octocat/repos",
    "events_url": "https://api.github.com/users/octocat/events{/privacy}",
    "received_events_url": "https://api.github.com/users/octocat/received_events",
    "type": "User",
    "starred_at": "\"2020-07-09T00:17:55Z\"",
    "user_view_type": "public"
  },
  "body": "We should probably include a check for null values here.",
  "created_at": "2011-04-14T16:00:49Z",
  "updated_at": "2011-04-14T16:00:49Z",
  "html_url": "https://github.com/octocat/Hello-World/pull/1#discussion-diff-1",
  "pull_request_url": "https://api.github.com/repos/octocat/Hello-World/pulls/1",
  "author_association": "OWNER",
  "_links": {
    "self": {
      "href": "https://api.github.com/repos/octocat/Hello-World/pulls/comments/1"
    },
    "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"
    }
  },
  "start_line": 2,
  "original_start_line": 2,
  "line": 2,
  "original_line": 2,
  "body_html": "\"<p>comment body</p>\"",
  "body_text": "\"comment body\""
}