Addon
Branch restrictions
Branching model
Commit statuses
Commits
Deployments
Downloads
Issue tracker
Pipelines
Projects
Pullrequests
Refs
Reports
Repositories
Snippets
Source
Ssh
Teams
Users
Webhooks
Workspaces
Other operations

Rate this page:

Pullrequests

Pull requests are a feature that makes it easier for developers to collaborate using Bitbucket. They provide a user-friendly web interface for discussing proposed changes before integrating them into the official project.

List pull requests for a user

GET /2.0/pullrequests/{selected_user}

Returns all pull requests authored by the specified user.

By default only open pull requests are returned. This can be controlled using the state query parameter. To retrieve pull requests that are in one of multiple states, repeat the state parameter for each individual state.

This endpoint also supports filtering and sorting of the results. See filtering and sorting for more details.

OAuth scopes required
pullrequest

Request

Path parameters
selected_user Required

string

This can either be the username of the pull request author, the author's UUID surrounded by curly-braces, for example: {account UUID}, or the author's Atlassian ID.

Query parameters
state

string

Only return pull requests that are in this state. This parameter can be repeated.

Valid values: MERGED, SUPERSEDED, OPEN, DECLINED

Example

1
2
3
4
curl --request GET \
  --url 'https://api.bitbucket.org/2.0/pullrequests/{selected_user}' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Accept: application/json'

Responses

All pull requests authored by the specified user.

Content typeValue
application/json

Paginated Pull Requests

List pull requests that contain a commit

GET /2.0/repositories/{workspace}/{repo_slug}/commit/{commit}/pullrequests

Returns a paginated list of all pull requests as part of which this commit was reviewed. Pull Request Commit Links app must be installed first before using this API; installation automatically occurs when 'Go to pull request' is clicked from the web interface for a commit's details.

Request

Path parameters
workspace Required

string

This can either be the workspace ID (slug) or the workspace UUID surrounded by curly-braces