Use the REST API to interact with pull request review comments.
Pull request review comments are comments made on a portion of the unified diff during a pull request review. These are different from commit comments and issue comments in a pull request. For more information, see REST API endpoints for commit comments and REST API endpoints for issue comments.
Note
Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.
GET /repos/{owner}/{repo}/pulls/comments
Lists review comments for all pull requests in a repository. By default,
review comments are in ascending order by ID.
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.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
sort (string)
Can be one of: created, updated, created_at
direction (string)
The direction to sort results. Ignored without sort parameter.
Can be one of: asc, desc
since (string)
Only show results that were last updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/pulls/comments
Response schema (Status: 200):
Array of Pull Request Review Comment:
url: required, stringpull_request_review_id: required, integer or null, format: int64id: required, integer, format: int64node_id: required, stringdiff_hunk: required, stringpath: required, stringposition: integeroriginal_position: integercommit_id: required, stringoriginal_commit_id: required, stringin_reply_to_id: integeruser: required, any of:
name: string or nullemail: string or nulllogin: required, stringid: required, integer, format: int64node_id: required, stringavatar_url: required, string, format: urigravatar_id: required, string or nullurl: required, string, format: urihtml_url: required, string, format: urifollowers_url: required, string, format: urifollowing_url: required, stringgists_url: required, stringstarred_url: required, stringsubscriptions_url: required, string, format: uriorganizations_url: required, string, format: urirepos_url: required, string, format: urievents_url: required, stringreceived_events_url: required, string, format: uritype: required, stringsite_admin: required, booleanstarred_at: stringuser_view_type: stringbody: required, stringcreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timehtml_url: required, string, format: uripull_request_url: required, string, format: uriauthor_association: required, string, enum: COLLABORATOR, CONTRIBUTOR, FIRST_TIMER, FIRST_TIME_CONTRIBUTOR, MANNEQUIN, MEMBER, NONE, OWNER_links: required, object:
self: required, object:
href: required, string, format: urihtml: required, object:
href: required, string, format: uripull_request: required, object:
href: required, string, format: uristart_line: integer or nulloriginal_start_line: integer or nullstart_side: string or null, enum: LEFT, RIGHT, null, default: "RIGHT"line: integeroriginal_line: integerside: string, enum: LEFT, RIGHT, default: "RIGHT"subject_type: string, enum: line, filereactions: Reaction Rollup:
url: required, string, format: uritotal_count: required, integer+1: required, integer-1: required, integerlaugh: required, integerconfused: required, integerheart: required, integerhooray: required, integereyes: required, integerrocket: required, integerbody_html: stringbody_text: stringGET /repos/{owner}/{repo}/pulls/comments/{comment_id}
Provides details for a specified review comment.
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.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
comment_id (integer) (required)
The unique identifier of the comment.
200 - OK
304 - Not modified
404 - Resource not found
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/pulls/comments/COMMENT_ID
Response schema (Status: 200):
url: required, stringpull_request_review_id: required, integer or null, format: int64id: required, integer, format: int64node_id: required, stringdiff_hunk: required, stringpath: required, stringposition: integeroriginal_position: integercommit_id: required, stringoriginal_commit_id: required, stringin_reply_to_id: integeruser: required, any of:
name: string or nullemail: string or nulllogin: required, stringid: required, integer, format: int64node_id: required, stringavatar_url: required, string, format: urigravatar_id: required, string or nullurl: required, string, format: urihtml_url: required, string, format: urifollowers_url: required, string, format: urifollowing_url: required, stringgists_url: required, stringstarred_url: required, stringsubscriptions_url: required, string, format: uriorganizations_url: required, string, format: urirepos_url: required, string, format: urievents_url: required, stringreceived_events_url: required, string, format: uritype: required, stringsite_admin: required, booleanstarred_at: stringuser_view_type: stringbody: required, stringcreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timehtml_url: required, string, format: uripull_request_url: required, string, format: uriauthor_association: required, string, enum: COLLABORATOR, CONTRIBUTOR, FIRST_TIMER, FIRST_TIME_CONTRIBUTOR, MANNEQUIN, MEMBER, NONE, OWNER_links: required, object:
self: required, object:
href: required, string, format: urihtml: required, object:
href: required, string, format: uripull_request: required, object:
href: required, string, format: uristart_line: integer or nulloriginal_start_line: integer or nullstart_side: string or null, enum: LEFT, RIGHT, null, default: "RIGHT"line: integeroriginal_line: integerside: string, enum: LEFT, RIGHT, default: "RIGHT"subject_type: string, enum: line, filereactions: Reaction Rollup:
url: required, string, format: uritotal_count: required, integer+1: required, integer-1: required, integerlaugh: required, integerconfused: required, integerheart: required, integerhooray: required, integereyes: required, integerrocket: required, integerbody_html: stringbody_text: stringPATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}
Edits the content of a specified review comment.
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.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
comment_id (integer) (required)
The unique identifier of the comment.
body (string) (required)Request:
curl -L \
-X PATCH \
https://api.github.com/repos/OWNER/REPO/pulls/comments/COMMENT_ID \
-d '{
"body": "I like this too!"
}'
Response schema (Status: 200):
Same response schema as Get a review comment for a pull request.
DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}
Deletes a review comment.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
comment_id (integer) (required)
The unique identifier of the comment.
204 - No Content
404 - Resource not found
Request:
curl -L \
-X DELETE \
https://api.github.com/repos/OWNER/REPO/pulls/comments/COMMENT_ID
Response schema (Status: 204):
GET /repos/{owner}/{repo}/pulls/{pull_number}/comments
Lists all review comments for a specified pull request. By default, review comments
are in ascending order by ID.
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.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
pull_number (integer) (required)
The number that identifies the pull request.
sort (string)
The property to sort the results by.
Default: created
Can be one of: created, updated
direction (string)
The direction to sort results. Ignored without sort parameter.
Can be one of: asc, desc
since (string)
Only show results that were last updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/pulls/PULL_NUMBER/comments
Response schema (Status: 200):
Same response schema as List review comments in a repository.
POST /repos/{owner}/{repo}/pulls/{pull_number}/comments
Creates a review comment on the diff of a specified pull request. To add a regular comment to a pull request timeline, see "Create an issue comment."
If your comment applies to more than one line in the pull request diff, you should use the parameters line, side, and optionally start_line and start_side in your request.
The position parameter is closing down. If you use position, the line, side, start_line, and start_side parameters are not required.
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.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
pull_number (integer) (required)
The number that identifies the pull request.
body (string) (required)
The text of the review comment.
commit_id (string) (required)
The SHA of the commit needing a comment. Not using the latest commit SHA may render your comment outdated if a subsequent commit modifies the line you specify as the position.
path (string) (required)
The relative path to the file that necessitates a comment.
position (integer)
This parameter is closing down. Use line instead. The position in the diff where you want to add a review comment. Note this value is not the same as the line number in the file. The position value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.
side (string)
In a split diff view, the side of the diff that the pull request's changes appear on. Can be LEFT or RIGHT. Use LEFT for deletions that appear in red. Use RIGHT for additions that appear in green or unchanged lines that appear in white and are shown for context. For a multi-line comment, side represents whether the last line of the comment range is a deletion or addition. For more information, see "Diff view options" in the GitHub Help documentation.
Can be one of: LEFT, RIGHT
line (integer)
Required unless using subject_type:file. The line of the blob in the pull request diff that the comment applies to. For a multi-line comment, the last line of the range that your comment applies to.
start_line (integer)
Required when using multi-line comments unless using in_reply_to. The start_line is the first line in the pull request diff that your multi-line comment applies to. To learn more about multi-line comments, see "Commenting on a pull request" in the GitHub Help documentation.
start_side (string)
Required when using multi-line comments unless using in_reply_to. The start_side is the starting side of the diff that the comment applies to. Can be LEFT or RIGHT. To learn more about multi-line comments, see "Commenting on a pull request" in the GitHub Help documentation. See side in this table for additional context.
Can be one of: LEFT, RIGHT, side
in_reply_to (integer)
The ID of the review comment to reply to. To find the ID of a review comment with "List review comments on a pull request". When specified, all parameters other than body in the request body are ignored.
subject_type (string)
The level at which the comment is targeted.
Can be one of: line, file
201 - Created
403 - Forbidden
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X POST \
https://api.github.com/repos/OWNER/REPO/pulls/PULL_NUMBER/comments \
-d '{
"body": "Great stuff!",
"commit_id": "6dcb09b5b57875f334f61aebed695e2e4193db5e",
"path": "file1.txt",
"start_line": 1,
"start_side": "RIGHT",
"line": 2,
"side": "RIGHT"
}'
Response schema (Status: 201):
Same response schema as Get a review comment for a pull request.
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. 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.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
pull_number (integer) (required)
The number that identifies the pull request.
comment_id (integer) (required)
The unique identifier of the comment.
body (string) (required)201 - Created
404 - Resource not found
Request:
curl -L \
-X POST \
https://api.github.com/repos/OWNER/REPO/pulls/PULL_NUMBER/comments/COMMENT_ID/replies \
-d '{
"body": "Great stuff!"
}'
Response schema (Status: 201):
Same response schema as Get a review comment for a pull request.