GitHub Pulls API

Interact with GitHub Pull Requests.

GitHub OpenAPI
Business capability
Software Construction Management BC-4200.40

Operations 36

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

3 of 36 operations are conformant: apis.io called them with no credentials and the responses matched this contract. Checked 2026-11-12. how this works · status file

GET /repos/{owner}/{repo}/pulls List pull requests in a repository · List pull requests conformant #
Ask an LLM
“What pull requests are open in a repository right now?”
“Can I list only the pull requests targeting a particular base branch?”
Tell an agent
List the open pull requests in {owner}/{repo}.
Show {state} pull requests in {owner}/{repo} that target base branch {base}.
POST /repos/{owner}/{repo}/pulls Open a pull request · Create a pull request #
Ask an LLM
“How do I open a pull request from my feature branch into main?”
“Can I open a pull request as a draft?”
Tell an agent
Open a pull request in {owner}/{repo} from {head} into {base} titled {title}.
Create a draft pull request in {owner}/{repo} merging {head} into {base}, draft set to {draft}.
GET /repos/{owner}/{repo}/pulls/comments List review comments across all PRs in a repo · List review comments in a repository conformant #
Ask an LLM
“What line-level code review comments have been left across every pull request in a repository?”
“Can I pull all diff review comments in a repo posted since a date?”
Tell an agent
List code review comments on all pull requests in {owner}/{repo}.
Show every diff review comment across {owner}/{repo} since {since}.
GET /repos/{owner}/{repo}/pulls/comments/{comment_id} Get one pull request review comment · Get a review comment for a pull request #
Ask an LLM
“What does a specific inline review comment on a pull request diff say?”
“Which file and line is a given review comment attached to?”
Tell an agent
Get pull request review comment {comment_id} in {owner}/{repo}.
Show the file, line and text of diff review comment {comment_id} in {owner}/{repo}.
PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id} Edit a pull request review comment · Update a review comment for a pull request #
Ask an LLM
“Can I edit the text of an inline review comment on a pull request?”
“How do I correct a line comment I left on a diff?”
Tell an agent
Change pull request review comment {comment_id} in {owner}/{repo} to {body}.
Edit my inline diff comment {comment_id} on {owner}/{repo} so it reads {body}.
DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id} Delete a pull request review comment · Delete a review comment for a pull request #
Ask an LLM
“Can I delete an inline code review comment I left on a pull request diff?”
“What's the way to remove a line comment from a PR review?”
Tell an agent destructive · confirm first
Delete pull request review comment {comment_id} in {owner}/{repo}.
Remove the inline diff comment {comment_id} from {owner}/{repo}.
GET /repos/{owner}/{repo}/pulls/{pull_number} Get a pull request by number · Get a pull request #
Ask an LLM
“What's the status, branches and mergeability of a specific pull request?”
“Can I fetch one pull request's details by its number?”
Tell an agent
Get pull request #{pull_number} in {owner}/{repo}.
Show the title, branches and state of PR {pull_number} in {owner}/{repo}.
PATCH /repos/{owner}/{repo}/pulls/{pull_number} Edit, close or retarget a pull request · Update a pull request #
Ask an LLM
“Can I change the base branch a pull request merges into?”
“How do I close a pull request without merging it?”
Tell an agent
Change the base branch of PR #{pull_number} in {owner}/{repo} to {base}.
Set pull request {pull_number} in {owner}/{repo} to state {state}.
GET /repos/{owner}/{repo}/pulls/{pull_number}/comments List review comments on one pull request · List review comments on a pull request #
Ask an LLM
“What inline code review comments were left on a particular pull request?”
“Can I sort a PR's diff comments by when they were updated?”
Tell an agent
List all inline diff comments on PR #{pull_number} in {owner}/{repo}.
Show diff comments on pull request {pull_number} of {owner}/{repo} since {since}.
POST /repos/{owner}/{repo}/pulls/{pull_number}/comments Comment on a line in a pull request diff · Create a review comment for a pull request #
Ask an LLM
“How do I leave a comment on a specific line of code in a pull request?”
“Can I comment on a range of lines, or on a whole file, in a PR diff?”
Tell an agent
Comment {body} on line {line} of {path} in PR #{pull_number} of {owner}/{repo} at commit {commit_id}.
Add a diff comment {body} on lines {start_line} to {line} of {path} in PR {pull_number}, {owner}/{repo}, commit {commit_id}.
POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies Reply to a pull request review comment · Create a reply for a review comment #
Ask an LLM
“Can I reply in-thread to someone's inline review comment on a pull request?”
“Which comment id do I use when answering a code review comment?”
Tell an agent
Reply {body} to review comment {comment_id} on PR #{pull_number} in {owner}/{repo}.
Answer the reviewer's comment {comment_id} in PR {pull_number} of {owner}/{repo} with {body}.
GET /repos/{owner}/{repo}/pulls/{pull_number}/commits List the commits in a pull request · List commits on a pull request #
Ask an LLM
“Which commits make up a pull request?”
“Is there a cap on how many commits I can list for a pull request?”
Tell an agent
List the commits on PR #{pull_number} in {owner}/{repo}.
Show the commits included in pull request {pull_number} of {owner}/{repo}.
POST /repos/{owner}/{repo}/pulls/{pull_number}/copilot-code-review Request a Copilot code review for a pull request #
GET /repos/{owner}/{repo}/pulls/{pull_number}/files List the files changed in a pull request · List pull requests files #
Ask an LLM
“Which files does a pull request touch, and how many lines changed in each?”
“What's the maximum number of files returned for a very large pull request?”
Tell an agent
List the files changed in PR #{pull_number} of {owner}/{repo}.
Show additions and deletions per file for pull request {pull_number} in {owner}/{repo}.
GET /repos/{owner}/{repo}/pulls/{pull_number}/merge Check whether a pull request was merged · Check if a pull request has been merged #
Ask an LLM
“Has a given pull request actually been merged into its base branch?”
“Can I check merge status with just the HTTP response code?”
Tell an agent
Check whether PR #{pull_number} in {owner}/{repo} has been merged.
Confirm whether pull request {pull_number} in {owner}/{repo} was merged into its base branch.
PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge Merge a pull request · Merge a pull request #
Ask an LLM
“How do I merge a pull request through the API?”
“Can I squash or rebase instead of making a merge commit?”
Tell an agent
Merge PR #{pull_number} in {owner}/{repo}.
Merge pull request {pull_number} in {owner}/{repo} using the {merge_method} method.
PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge-async Merge a pull request asynchronously #
GET /repos/{owner}/{repo}/pulls/{pull_number}/merge-async/{uuid} Get the result of an asynchronous merge #
GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers List pending reviewers on a pull request · Get all requested reviewers for a pull request #
Ask an LLM
“Whose review is still pending on a pull request?”
“Which users or teams have been asked to review this PR but haven't yet?”
Tell an agent
List the requested reviewers on PR #{pull_number} in {owner}/{repo}.
Show who still owes a review on pull request {pull_number} of {owner}/{repo}.
POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers Request reviews on a pull request · Request reviewers for a pull request #
Ask an LLM
“How do I ask specific people to review my pull request?”
“Can I request a review from a whole team instead of individuals?”
Tell an agent
Request reviews from {reviewers} on PR #{pull_number} in {owner}/{repo}.
Ask team {team_reviewers} to review pull request {pull_number} in {owner}/{repo}.
DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers Cancel review requests on a pull request · Remove requested reviewers from a pull request #
Ask an LLM
“Can I withdraw a review request I sent to someone on a pull request?”
“What's the way to take a team off a PR's requested reviewers?”
Tell an agent destructive · confirm first
Remove the review request for {reviewers} on PR #{pull_number} in {owner}/{repo}.
Cancel review requests to {reviewers} and team {team_reviewers} on pull request {pull_number} of {owner}/{repo}.
POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers/rerequest Rerequest reviewers for a pull request #
GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews List the reviews on a pull request · List reviews for a pull request #
Ask an LLM
“Who has approved or requested changes on a pull request?”
“In what order were the reviews on this PR submitted?”
Tell an agent
List the reviews on PR #{pull_number} in {owner}/{repo}.
Show approvals and change requests on pull request {pull_number} of {owner}/{repo}.
POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews Start or submit a review on a pull request · Create a review for a pull request #
Ask an LLM
“How do I approve a pull request through the API?”
“Can I submit a review that requests changes and includes several line comments at once?”
Tell an agent
Review PR #{pull_number} in {owner}/{repo} with event {event}.
Leave a new review on pull request {pull_number} in {owner}/{repo} saying {body} with line comments {comments}.
GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id} Get one review on a pull request · Get a review for a pull request #
Ask an LLM
“What did a specific review on a pull request say, and was it an approval?”
“Can I look up a single PR review by its review id?”
Tell an agent
Get review {review_id} on PR #{pull_number} in {owner}/{repo}.
Show the state and summary of review {review_id} on pull request {pull_number} of {owner}/{repo}.
PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id} Edit a pull request review's summary · Update a review for a pull request #
Ask an LLM
“Can I change the summary text of a review I already left on a pull request?”
“How do I reword the top-level comment of my PR review?”
Tell an agent
Change the summary of review {review_id} on PR #{pull_number} in {owner}/{repo} to {body}.
Rewrite my review {review_id} summary on pull request {pull_number} of {owner}/{repo} as {body}.
DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id} Delete an unsubmitted pull request review · Delete a pending review for a pull request #
Ask an LLM
“Can I throw away a pending review I haven't submitted yet?”
“Is it possible to delete a review after it has been submitted?”
Tell an agent destructive · confirm first
Delete my pending review {review_id} on PR #{pull_number} in {owner}/{repo}.
Discard unsubmitted review {review_id} on pull request {pull_number} of {owner}/{repo}.
GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments List the comments within one review · List comments for a pull request review #
Ask an LLM
“Which line comments belong to one particular pull request review?”
“Can I see only the comments a reviewer left as part of a single review?”
Tell an agent
List only the comments belonging to review {review_id} on PR #{pull_number} in {owner}/{repo}.
Show the line comments grouped under review {review_id} of pull request {pull_number}, {owner}/{repo}.
PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals Dismiss a review on a pull request · Dismiss a review for a pull request #
Ask an LLM
“Can I dismiss a stale change request so it no longer blocks a pull request?”
“What permissions do I need to dismiss a review on a protected branch?”
Tell an agent destructive · confirm first
Dismiss review {review_id} on PR #{pull_number} in {owner}/{repo} with message {message}.
Clear the blocking review {review_id} from pull request {pull_number} of {owner}/{repo}, explaining {message}.
POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events Submit a pending pull request review · Submit a review for a pull request #
Ask an LLM
“How do I submit a review I started earlier but left pending?”
“Can I finalize a pending review as an approval or a change request?”
Tell an agent
Submit pending review {review_id} on PR #{pull_number} in {owner}/{repo} as {event}.
Finalize my draft review {review_id} on pull request {pull_number} of {owner}/{repo} with event {event} and note {body}.
PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch Bring a pull request branch up to date with base · Update a pull request branch #
Ask an LLM
“Can I update a pull request's branch with the latest changes from its base branch?”
“Is there a safeguard so the update fails if the PR head changed underneath me?”
Tell an agent
Update the branch of PR #{pull_number} in {owner}/{repo} with the latest base changes.
Merge base into pull request {pull_number} of {owner}/{repo} only if its head is {expected_head_sha}.
GET /repos/{owner}/{repo}/stacks List pull request stacks conformant #
POST /repos/{owner}/{repo}/stacks Create a pull request stack #
GET /repos/{owner}/{repo}/stacks/{stack_number} Get a pull request stack #
POST /repos/{owner}/{repo}/stacks/{stack_number}/add Add pull requests to a pull request stack #
POST /repos/{owner}/{repo}/stacks/{stack_number}/unstack Remove pull requests from a pull request stack #

Documentation

📖
Documentation
https://docs.github.com/en/rest/apps
📖
Documentation
https://docs.github.com/en/rest/codes-of-conduct/codes-of-conduct
📖
Documentation
https://docs.github.com/en/rest/emojis
📖
Documentation
https://docs.github.com/en/rest/gitignore
📖
Documentation
https://docs.github.com/en/rest/apps/installations
📖
Documentation
https://docs.github.com/en/rest/enterprise-admin
📖
Documentation
https://docs.github.com/en/rest/activity/events
📖
Documentation
https://docs.github.com/en/rest/orgs
📖
Documentation
https://docs.github.com/en/rest/rate-limit
📖
Documentation
https://docs.github.com/en/enterprise-cloud@latest/rest/scim
📖
Documentation
https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api
📖
Documentation
https://docs.github.com/en/rest/teams
📖
Documentation
https://docs.github.com/en/rest/meta/meta
📖
Documentation
https://docs.github.com/en/rest/actions
📖
Documentation
https://docs.github.com/en/rest/branches
📖
Documentation
https://docs.github.com/en/rest/code-scanning
📖
Documentation
https://docs.github.com/en/rest/collaborators
📖
Documentation
https://docs.github.com/en/rest/dependabot
📖
Documentation
https://docs.github.com/en/rest/webhooks
📖
Documentation
https://docs.github.com/en/rest/pulls
📖
Documentation
https://docs.github.com/en/rest/git/tags
📖
Documentation
https://docs.github.com/en/rest/repos/autolinks
📖
Documentation
https://docs.github.com/en/rest/collaborators/invitations

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/github:github-pulls-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

github-pulls-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Github Pulls API
  version: 1.1.4
  contact:
    name: Support
    url: https://support.github.com/contact?tags=dotcom-rest-api
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
  termsOfService: https://docs.github.com/articles/github-terms-of-service
  x-github-plan: api.github.com
  description: 'Operations tagged pulls across 2 of this provider''s published API definitions: github-github-full.yml, github-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.github.com
tags:


# --- truncated at 32 KB (472 KB total) ---
# Full source: https://artifacts.apis.io/github/openapi/github-pulls-api-openapi.yml