openapi: 3.0.3
info:
version: 1.1.4
title: GitHub Application About Requests API
description: 'Use the REST API to retrieve information about GitHub Apps and GitHub App
installations.'
license:
name: MIT
url: https://spdx.org/licenses/MIT
termsOfService: https://docs.github.com/articles/github-terms-of-service
contact:
name: Support
url: https://support.github.com/contact?tags=dotcom-rest-api
x-github-plan: ghes
x-github-release: 3.9
servers:
- url: '{protocol}://{hostname}/api/v3'
variables:
hostname:
description: Self-hosted Enterprise Server hostname
default: HOSTNAME
protocol:
description: Self-hosted Enterprise Server protocol
default: http
tags:
- name: Requests
paths:
/app/installation-requests:
get:
summary: GitHub List Installation Requests for the Authenticated App
description: Lists all the pending installation requests for the authenticated GitHub App.
tags:
- Requests
operationId: listInstallationRequestsForTheAuthenticatedApp
externalDocs:
description: API method documentation
url: https://docs.github.com/enterprise-server@3.9/rest/apps/apps#list-installation-requests-for-the-authenticated-app
parameters:
- $ref: '#/components/parameters/per-page'
- $ref: '#/components/parameters/page'
responses:
'200':
description: List of integration installation requests
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/integration-installation-request'
examples:
exampleKey1:
$ref: '#/components/examples/integration-installation-request-paginated'
'304':
$ref: '#/components/responses/not_modified'
'401':
$ref: '#/components/responses/requires_authentication'
x-github:
githubCloudOnly: false
enabledForGitHubApps: true
category: apps
subcategory: apps
security:
- bearerHttpAuthentication: []
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews:
get:
summary: GitHub Get Pull Request Review Protection
description: Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
tags:
- Requests
operationId: getPullRequestReviewProtection
externalDocs:
description: API method documentation
url: https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#get-pull-request-review-protection
parameters:
- $ref: '#/components/parameters/owner'
- $ref: '#/components/parameters/repo'
- $ref: '#/components/parameters/branch'
- in: header
name: Authorization
schema:
type: string
example: example_value
- in: header
name: X-GitHub-Api-Version
schema:
type: string
default: '2022-11-28'
example: example_value
- in: header
name: Accept
schema:
type: string
default: application/vnd.github+json
example: example_value
responses:
'200':
description: Response
content:
application/json:
schema:
$ref: '#/components/schemas/protected-branch-pull-request-review'
examples:
default:
$ref: '#/components/examples/protected-branch-pull-request-review'
x-github:
githubCloudOnly: false
enabledForGitHubApps: true
category: branches
subcategory: branch-protection
security:
- bearerHttpAuthentication: []
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
patch:
summary: GitHub Update Pull Request Review Protection
description: 'Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub''s products](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
Updating pull request review enforcement requires admin or owner permissions to the repository and branch protection to be enabled.
**Note**: Passing new arrays of `users` and `teams` replaces their previous values.'
tags:
- Requests
operationId: updatePullRequestReviewProtection
externalDocs:
description: API method documentation
url: https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#update-pull-request-review-protection
parameters:
- $ref: '#/components/parameters/owner'
- $ref: '#/components/parameters/repo'
- $ref: '#/components/parameters/branch'
- in: header
name: Authorization
schema:
type: string
example: example_value
- in: header
name: X-GitHub-Api-Version
schema:
type: string
default: '2022-11-28'
example: example_value
- in: header
name: Accept
schema:
type: string
default: application/vnd.github+json
example: example_value
requestBody:
required: false
content:
application/json:
schema:
type: object
properties:
dismissal_restrictions:
type: object
description: Specify which users, teams, and apps can dismiss pull request reviews. Pass an empty `dismissal_restrictions` object to disable. User and team `dismissal_restrictions` are only available for organization-owned repositories. Omit this parameter for personal repositories.
properties:
users:
type: array
description: The list of user `login`s with dismissal access
items:
type: string
teams:
type: array
description: The list of team `slug`s with dismissal access
items:
type: string
apps:
type: array
description: The list of app `slug`s with dismissal access
items:
type: string
dismiss_stale_reviews:
type: boolean
description: Set to `true` if you want to automatically dismiss approving reviews when someone pushes a new commit.
require_code_owner_reviews:
type: boolean
description: Blocks merging pull requests until [code owners](https://docs.github.com/enterprise-server@3.9/articles/about-code-owners/) have reviewed.
required_approving_review_count:
type: integer
description: Specifies the number of reviewers required to approve pull requests. Use a number between 1 and 6 or 0 to not require reviewers.
require_last_push_approval:
type: boolean
description: 'Whether the most recent push must be approved by someone other than the person who pushed it. Default: `false`'
default: false
bypass_pull_request_allowances:
type: object
description: Allow specific users, teams, or apps to bypass pull request requirements.
properties:
users:
type: array
description: The list of user `login`s allowed to bypass pull request requirements.
items:
type: string
teams:
type: array
description: The list of team `slug`s allowed to bypass pull request requirements.
items:
type: string
apps:
type: array
description: The list of app `slug`s allowed to bypass pull request requirements.
items:
type: string
examples:
default:
value:
dismissal_restrictions:
users:
- octocat
teams:
- justice-league
apps:
- octoapp
bypass_pull_request_allowances:
users:
- octocat
teams:
- justice-league
apps:
- octoapp
dismiss_stale_reviews: true
require_code_owner_reviews: true
required_approving_review_count: 2
require_last_push_approval: true
responses:
'200':
description: Response
content:
application/json:
schema:
$ref: '#/components/schemas/protected-branch-pull-request-review'
examples:
default:
$ref: '#/components/examples/protected-branch-pull-request-review'
'422':
$ref: '#/components/responses/validation_failed'
x-github:
githubCloudOnly: false
enabledForGitHubApps: true
category: branches
subcategory: branch-protection
security:
- bearerHttpAuthentication: []
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
delete:
summary: GitHub Delete Pull Request Review Protection
description: Protected branches are available in public repositories with GitHub Free and GitHub Free for organizations, and in public and private repositories with GitHub Pro, GitHub Team, GitHub Enterprise Cloud, and GitHub Enterprise Server. For more information, see [GitHub's products](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
tags:
- Requests
operationId: deletePullRequestReviewProtection
externalDocs:
description: API method documentation
url: https://docs.github.com/enterprise-server@3.9/rest/branches/branch-protection#delete-pull-request-review-protection
parameters:
- $ref: '#/components/parameters/owner'
- $ref: '#/components/parameters/repo'
- $ref: '#/components/parameters/branch'
- in: header
name: Authorization
schema:
type: string
example: example_value
- in: header
name: X-GitHub-Api-Version
schema:
type: string
default: '2022-11-28'
example: example_value
- in: header
name: Accept
schema:
type: string
default: application/vnd.github+json
example: example_value
responses:
'204':
description: Response
'404':
$ref: '#/components/responses/not_found'
x-github:
githubCloudOnly: false
enabledForGitHubApps: true
category: branches
subcategory: branch-protection
security:
- bearerHttpAuthentication: []
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repos/{owner}/{repo}/pulls:
get:
summary: GitHub List Pull Requests
description: 'Lists pull requests in a specified repository.
Draft pull requests are available in public repositories with GitHub
Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing
plans, and in public and private repositories with GitHub Team and GitHub Enterprise
Cloud. For more information, see [GitHub''s products](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products)
in the GitHub Help documentation.
This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."
- **`application/vnd.github.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.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
- **`application/vnd.github.html+json`**: Returns HTML rendered from the body''s markdown. Response will include `body_html`.
- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.
- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message.
- **`application/vnd.github.patch`**: For more information, see "[git-format-patch](https://git-scm.com/docs/git-format-patch)" in the Git documentation.'
tags:
- Requests
operationId: listPullRequests
externalDocs:
description: API method documentation
url: https://docs.github.com/enterprise-server@3.9/rest/pulls/pulls#list-pull-requests
parameters:
- $ref: '#/components/parameters/owner'
- $ref: '#/components/parameters/repo'
- name: state
description: Either `open`, `closed`, or `all` to filter by state.
in: query
required: false
schema:
type: string
enum:
- open
- closed
- all
default: open
example: open
- name: head
description: 'Filter pulls by head user or head organization and branch name in the format of `user:ref-name` or `organization:ref-name`. For example: `github:new-script-format` or `octocat:test-branch`.'
in: query
required: false
schema:
type: string
example: example_value
- name: base
description: 'Filter pulls by base branch name. Example: `gh-pages`.'
in: query
required: false
schema:
type: string
example: example_value
- name: sort
description: What to sort results by. `popularity` will sort by the number of comments. `long-running` will sort by date created and will limit the results to pull requests that have been open for more than a month and have had activity within the past month.
in: query
required: false
schema:
type: string
enum:
- created
- updated
- popularity
- long-running
default: created
example: created
- name: direction
description: 'The direction of the sort. Default: `desc` when sort is `created` or sort is not specified, otherwise `asc`.'
in: query
required: false
schema:
type: string
enum:
- asc
- desc
example: asc
- $ref: '#/components/parameters/per-page'
- $ref: '#/components/parameters/page'
- in: header
name: Authorization
schema:
type: string
example: example_value
- in: header
name: X-GitHub-Api-Version
schema:
type: string
default: '2022-11-28'
example: example_value
- in: header
name: Accept
schema:
type: string
default: application/vnd.github+json
example: example_value
responses:
'200':
description: Response
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/pull-request-simple'
examples:
default:
$ref: '#/components/examples/pull-request-simple-items'
headers:
Link:
$ref: '#/components/headers/link'
'304':
$ref: '#/components/responses/not_modified'
'422':
$ref: '#/components/responses/validation_failed'
x-github:
githubCloudOnly: false
enabledForGitHubApps: true
category: pulls
subcategory: pulls
x-api-evangelist-certified: '2025-07-16'
x-api-naftiko-published: '2025-07-25'
security:
- bearerHttpAuthentication: []
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
post:
summary: GitHub Create Pull Request
description: 'Draft pull requests are available in public repositories with GitHub Free and GitHub Free for organizations, GitHub Pro, and legacy per-repository billing plans, and in public and private repositories with GitHub Team and GitHub Enterprise Cloud. For more information, see [GitHub''s products](https://docs.github.com/enterprise-server@3.9/github/getting-started-with-github/githubs-products) in the GitHub Help documentation.
To open or update a pull request in a public repository, you must have write access to the head or the source branch. For organization-owned repositories, you must be a member of the organization that owns the repository to open or update a pull request.
This endpoint triggers [notifications](https://docs.github.com/enterprise-server@3.9/github/managing-subscriptions-and-notifications-on-github/about-notifications). Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-server@3.9/rest/overview/rate-limits-for-the-rest-api#about-secondary-rate-limits)" and "[Best practices for using the REST API](https://docs.github.com/enterprise-server@3.9/rest/guides/best-practices-for-using-the-rest-api)."
This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."
- **`application/vnd.github.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.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.
- **`application/vnd.github.html+json`**: Returns HTML rendered from the body''s markdown. Response will include `body_html`.
- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`.
- **`application/vnd.github.diff`**: For more information, see "[git-diff](https://git-scm.com/docs/git-diff)" in the Git documentation. If a diff is corrupt, contact us through the [GitHub Support portal](https://support.github.com/). Include the repository name and pull request ID in your message.'
tags:
- Requests
operationId: createPullRequest
externalDocs:
description: API method documentation
url: https://docs.github.com/enterprise-server@3.9/rest/pulls/pulls#create-a-pull-request
parameters:
- $ref: '#/components/parameters/owner'
- $ref: '#/components/parameters/repo'
- in: header
name: Authorization
schema:
type: string
example: example_value
- in: header
name: X-GitHub-Api-Version
schema:
type: string
default: '2022-11-28'
example: example_value
- in: header
name: Accept
schema:
type: string
default: application/vnd.github+json
example: example_value
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
title:
type: string
description: The title of the new pull request. Required unless `issue` is specified.
head:
type: string
description: 'The name of the branch where your changes are implemented. For cross-repository pull requests in the same network, namespace `head` with a user like this: `username:branch`.'
head_repo:
type: string
description: The name of the repository where the changes in the pull request were made. This field is required for cross-repository pull requests if both repositories are owned by the same organization.
format: repo.nwo
example: octo-org/octo-repo
base:
type: string
description: The name of the branch you want the changes pulled into. This should be an existing branch on the current repository. You cannot submit a pull request to one repository that requests a merge to a base of another repository.
body:
type: string
description: The contents of the pull request.
maintainer_can_modify:
type: boolean
description: Indicates whether [maintainers can modify](https://docs.github.com/enterprise-server@3.9/articles/allowing-changes-to-a-pull-request-branch-created-from-a-fork/) the pull request.
draft:
type: boolean
description: Indicates whether the pull request is a draft. See "[Draft Pull Requests](https://docs.github.com/enterprise-server@3.9/articles/about-pull-requests#draft-pull-requests)" in the GitHub Help documentation to learn more.
issue:
type: integer
format: int64
example: 1
description: An issue in the repository to convert to a pull request. The issue title, body, and comments will become the title, body, and comments on the new pull request. Required unless `title` is specified.
required:
- head
- base
examples:
default:
value:
title: Amazing new feature
body: Please pull these awesome changes in!
head: octocat:new-feature
base: master
responses:
'201':
description: Response
content:
application/json:
schema:
$ref: '#/components/schemas/pull-request'
examples:
default:
$ref: '#/components/examples/pull-request'
headers:
Location:
example: https://api.github.com/repos/octocat/Hello-World/pulls/1347
schema:
type: string
'403':
$ref: '#/components/responses/forbidden'
'422':
$ref: '#/components/responses/validation_failed'
x-github:
triggersNotification: true
githubCloudOnly: false
enabledForGitHubApps: true
category: pulls
subcategory: pulls
security:
- bearerHttpAuthentication: []
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repos/{owner}/{repo}/pulls/comments/{comment_id}:
get:
summary: GitHub Get Review Comment for Pull Request
description: 'Provides details for a specified review comment.
This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/getting-started-with-the-rest-api#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`.'
tags:
- Requests
operationId: getReviewCommentForPullRequest
externalDocs:
description: API method documentation
url: https://docs.github.com/enterprise-server@3.9/rest/pulls/comments#get-a-review-comment-for-a-pull-request
parameters:
- $ref: '#/components/parameters/owner'
- $ref: '#/components/parameters/repo'
- $ref: '#/components/parameters/comment-id'
- in: header
name: Authorization
schema:
type: string
example: example_value
- in: header
name: X-GitHub-Api-Version
schema:
type: string
default: '2022-11-28'
example: example_value
- in: header
name: Accept
schema:
type: string
default: application/vnd.github+json
example: example_value
responses:
'200':
description: Response
content:
application/json:
schema:
$ref: '#/components/schemas/pull-request-review-comment'
examples:
default:
$ref: '#/components/examples/pull-request-review-comment-2'
'404':
$ref: '#/components/responses/not_found'
x-github:
githubCloudOnly: false
enabledForGitHubApps: true
category: pulls
subcategory: comments
security:
- bearerHttpAuthentication: []
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
patch:
summary: GitHub Update Review Comment for Pull Request
description: 'Edits the content of a specified review comment.
This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-server@3.9/rest/using-the-rest-api/getting-started-with-the-rest-api#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`.'
tags:
- Requests
operationId: updateReviewCommentForPullRequest
externalDocs:
description: API method documentation
url: https://docs.github.com/enterprise-server@3.9/rest/pulls/comments#update-a-review-comment-for-a-pull-request
parameters:
- $ref: '#/components/parameters/owner'
- $ref: '#/components/parameters/repo'
- $ref: '#/components/parameters/comment-id'
- in: header
name: Authorization
schema:
type: string
example: example_value
- in: header
name: X-GitHub-Api-Version
schema:
type: string
default: '2022-11-28'
example: example_value
- in: header
name: Accept
schema:
type: string
default: application/vnd.github+json
example: example_value
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
body:
type: string
description: The text of the reply to the review comment.
required:
- body
examples:
default:
value:
body: I like this too!
responses:
'200':
description: Response
content:
application/json:
schema:
$ref: '#/components/schemas/pull-request-review-comment'
examples:
default:
$ref: '#/components/examples/pull-request-review-comment-2'
x-github:
githubCloudOnly: false
enabledForGitHubApps: true
category: pulls
subcategory: comments
security:
- bearerHttpAuthentication: []
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
delete:
summary: GitHub Delete Review Comment for Pull Request
description: Deletes a review comment.
tags:
- Requests
operationId: deleteReviewCommentForPullRequest
externalDocs:
description: API method documentation
url: https://docs.github.com/enterprise-server@3.9/rest/pulls/comments#delete-a-review-comment-for-a-pull-request
parameters:
- $ref: '#/components/parameters/owner'
- $ref: '#/components/parameters/repo'
- $ref: '#/components/parameters/comment-id'
- in: header
name: Authorization
schema:
type: string
example: example_value
- in: header
name: X-GitHub-Api-Version
schema:
type: string
default: '2022-11-28'
example: example_value
- in: header
name: Accept
schema:
type: string
default: application/vnd.github+json
example: example_value
responses:
'204':
description: Response
'404':
$ref: '#/components/responses/not_found'
x-github:
githubCloudOnly: false
enabledForGitHubApps: true
category: pulls
subcategory: comments
security:
- bearerHttpAuthentication: []
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
/repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions:
get:
summary: GitHub List Reactions for Pull Request Review Comment
description: List the reactions to a [pull request review comment](https://docs.github.com/enterprise-server@3.9/rest/pulls/comments#get-a-review-comment-for-a-pull-request).
tags:
- Requests
operationId: listReactionsForPullRequestReviewComment
externalDocs:
description: API method documentation
url: https://docs.github.com/enterprise-server@3.9/rest/reactions/reactions#list-reactions-for-a-pull-request-review-comment
parameters:
- $ref: '#/components/parameters/owner'
- $ref: '#/components/parameters/repo'
- $ref: '#/components/parameters/comment-id'
- name: content
description: Returns a single [reaction type](https://docs.github.com/enterprise-server@3.9/rest/reactions/reactions#about-reactions). Omit this parameter to list all reactions to a pull request review comment.
in: query
required: false
schema:
type: string
enum:
- '+1'
- '-1'
- laugh
- confused
- heart
- hooray
- rocket
- eyes
example: '+1'
- $ref: '#/components/parameters/per-page'
- $ref: '#/components/parameters/page'
- in: header
name: Authorization
schema:
type: string
example: example_value
- in: header
name: X-GitHub-Api-Version
# --- truncated at 32 KB (1000 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/github/refs/heads/main/openapi/github-requests-api-openapi.yml