v56

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

Merge a pull request

Merges a pull request into the base branch. 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."

put/repos/{owner}/{repo}/pulls/{pull_number}/merge

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.

Request body

commit_titlestring

Title for the automatic commit message.

commit_messagestring

Extra detail to append to automatic commit message.

shastring

SHA that pull request head must match to allow merge.

merge_method'merge' | 'squash' | 'rebase'

The merge method to use.

Response

if merge was successful

shastring required
mergedboolean required
messagestring required