# Bitbucket Pull Requests API

**Canonical:** https://apis.io/apis/bitbucket/bitbucket-pull-requests-api/  
**Provider:** Bitbucket — https://apis.io/providers/bitbucket/  
**Base URL:** https://api.bitbucket.org/2.0  
**Documentation:** https://developer.atlassian.com/bitbucket/api/2/reference/

Bitbucket Pull Requests API is one of 23 APIs that [Bitbucket](https://apis.io/providers/bitbucket/) publishes on the [APIs.io](https://apis.io/) network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification. This API exposes 8 JSON Schema definitions. Tagged areas include Pull Requests. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, authentication docs, an AsyncAPI specification, and 8 JSON Schemas.

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.

## Operations (37)

| Method | Path | Summary |
|---|---|---|
| GET | `/repositories/{workspace}/{repo_slug}/commit/{commit}/pullrequests` | List pull requests that contain a commit |
| GET | `/repositories/{workspace}/{repo_slug}/default-reviewers` | List default reviewers |
| DELETE | `/repositories/{workspace}/{repo_slug}/default-reviewers/{target_username}` | Remove a user from the default reviewers |
| GET | `/repositories/{workspace}/{repo_slug}/default-reviewers/{target_username}` | Get a default reviewer |
| PUT | `/repositories/{workspace}/{repo_slug}/default-reviewers/{target_username}` | Add a user to the default reviewers |
| GET | `/repositories/{workspace}/{repo_slug}/effective-default-reviewers` | List effective default reviewers |
| GET | `/repositories/{workspace}/{repo_slug}/pullrequests` | List pull requests |
| POST | `/repositories/{workspace}/{repo_slug}/pullrequests` | Create a pull request |
| GET | `/repositories/{workspace}/{repo_slug}/pullrequests/activity` | List a pull request activity log |
| GET | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}` | Get a pull request |
| PUT | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}` | Update a pull request |
| GET | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/activity` | List a pull request activity log |
| DELETE | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/approve` | Unapprove a pull request |
| POST | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/approve` | Approve a pull request |
| GET | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments` | List comments on a pull request |
| POST | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments` | Create a comment on a pull request |
| DELETE | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}` | Delete a comment on a pull request |
| GET | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}` | Get a comment on a pull request |
| PUT | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}` | Update a comment on a pull request |
| DELETE | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}/resolve` | Reopen a comment thread |
| POST | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/comments/{comment_id}/resolve` | Resolve a comment thread |
| GET | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/commits` | List commits on a pull request |
| POST | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/decline` | Decline a pull request |
| GET | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diff` | List changes in a pull request |
| GET | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/diffstat` | Get the diff stat for a pull request |
| POST | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/merge` | Merge a pull request |
| GET | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/merge/task-status/{task_id}` | Get the merge task status for a pull request |
| GET | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/patch` | Get the patch for a pull request |
| DELETE | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/request-changes` | Remove change request for a pull request |
| POST | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/request-changes` | Request changes for a pull request |
| GET | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/statuses` | List commit statuses for a pull request |
| GET | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks` | List tasks on a pull request |
| POST | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks` | Create a task on a pull request |
| DELETE | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks/{task_id}` | Delete a task on a pull request |
| GET | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks/{task_id}` | Get a task on a pull request |
| PUT | `/repositories/{workspace}/{repo_slug}/pullrequests/{pull_request_id}/tasks/{task_id}` | Update a task on a pull request |
| GET | `/workspaces/{workspace}/pullrequests/{selected_user}` | List workspace pull requests for a user |

## Machine-readable artifacts (16)

- **OpenAPI** — https://raw.githubusercontent.com/api-evangelist/bitbucket/refs/heads/main/openapi/bitbucket-pull-requests-api-openapi.yml
- **Documentation** — https://developer.atlassian.com/bitbucket/api/2/reference/
- **Authentication** — https://developer.atlassian.com/cloud/bitbucket/rest/intro/#authentication
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/bitbucket/refs/heads/main/json-schema/bitbucket-cloud-rest-api-repository-schema.json
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/bitbucket/refs/heads/main/json-schema/bitbucket-cloud-rest-api-pullrequest-schema.json
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/bitbucket/refs/heads/main/json-schema/bitbucket-cloud-rest-api-pipeline-schema.json
- **JSONSchema** — https://raw.githubusercontent.com/api-evangelist/bitbucket/refs/heads/main/json-schema/bitbucket-cloud-rest-api-commit-schema.json
- **JSONStructure** — https://raw.githubusercontent.com/api-evangelist/bitbucket/refs/heads/main/json-structure/bitbucket-cloud-rest-api-repository-structure.json
- **JSONStructure** — https://raw.githubusercontent.com/api-evangelist/bitbucket/refs/heads/main/json-structure/bitbucket-cloud-rest-api-pullrequest-structure.json
- **JSONStructure** — https://raw.githubusercontent.com/api-evangelist/bitbucket/refs/heads/main/json-structure/bitbucket-cloud-rest-api-pipeline-structure.json
- **JSONStructure** — https://raw.githubusercontent.com/api-evangelist/bitbucket/refs/heads/main/json-structure/bitbucket-cloud-rest-api-commit-structure.json
- **Examples** — https://raw.githubusercontent.com/api-evangelist/bitbucket/refs/heads/main/examples/bitbucket-cloud-rest-api-repository-example.json
- **Examples** — https://raw.githubusercontent.com/api-evangelist/bitbucket/refs/heads/main/examples/bitbucket-cloud-rest-api-pullrequest-example.json
- **Examples** — https://raw.githubusercontent.com/api-evangelist/bitbucket/refs/heads/main/examples/bitbucket-cloud-rest-api-pipeline-example.json
- **Examples** — https://raw.githubusercontent.com/api-evangelist/bitbucket/refs/heads/main/examples/bitbucket-cloud-rest-api-commit-example.json
- **AsyncAPI** — https://raw.githubusercontent.com/api-evangelist/bitbucket/refs/heads/main/asyncapi/bitbucket-cloud-webhooks-asyncapi.yml

## Other Bitbucket APIs (12)

- [Bitbucket Addon API](https://apis.io/apis/bitbucket/bitbucket-addon-api/)
- [Bitbucket Branch restrictions API](https://apis.io/apis/bitbucket/bitbucket-branch-restrictions-api/)
- [Bitbucket Branching model API](https://apis.io/apis/bitbucket/bitbucket-branching-model-api/)
- [Bitbucket Commit statuses API](https://apis.io/apis/bitbucket/bitbucket-commit-statuses-api/)
- [Bitbucket Commits API](https://apis.io/apis/bitbucket/bitbucket-commits-api/)
- [Bitbucket Deployments API](https://apis.io/apis/bitbucket/bitbucket-deployments-api/)
- [Bitbucket Downloads API](https://apis.io/apis/bitbucket/bitbucket-downloads-api/)
- [Bitbucket GPG API](https://apis.io/apis/bitbucket/bitbucket-gpg-api/)
- [Bitbucket Issue tracker API](https://apis.io/apis/bitbucket/bitbucket-issue-tracker-api/)
- [Bitbucket Pipelines API](https://apis.io/apis/bitbucket/bitbucket-pipelines-api/)
- [Bitbucket Projects API](https://apis.io/apis/bitbucket/bitbucket-projects-api/)
- [Bitbucket properties API](https://apis.io/apis/bitbucket/bitbucket-properties-api/)

## Tags

Pull Requests

---

Profiled by [API Evangelist](https://apievangelist.com) and published on [APIs.io](https://apis.io/apis/bitbucket/bitbucket-pull-requests-api/). The API's provider profile, Kin Score and agent-readiness rating are at https://apis.io/providers/bitbucket/.
