> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blinkops.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Pull Requests

Returns all pull requests on the specified repository.

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](https://developer.atlassian.com/cloud/bitbucket/rest/intro/#filtering) for more details.

<Note>
  External Documentation

  To learn more, visit the [Bitbucket documentation](https://developer.atlassian.com/cloud/bitbucket/rest/api-group-pullrequests/#api-repositories-workspace-repo-slug-pullrequests-get).
</Note>

## Parameters

<div className="integrations-table">
  | Parameter      | Description                                                                                                                              |
  | -------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
  | Repo Slug      | This can either be the repository slug or the UUID of the repository,<br />surrounded by curly-braces, for example: `{repository UUID}`. |
  | State          | Only return pull requests that are in this state.                                                                                        |
  | Workspace Slug | This can either be the workspace ID (slug) or the workspace UUID<br />surrounded by curly-braces, for example: `{workspace UUID}`.       |
</div>

## Example Output

```json theme={"dark"}
{
	"values": [
		{
			"comment_count": 1,
			"task_count": 1,
			"type": "<string>",
			"id": 200,
			"title": "<string>",
			"description": "<string>",
			"state": "<string>",
			"merge_commit": null,
			"close_source_branch": false,
			"closed_by": null,
			"author": {
				"display_name": "<string>",
				"links": {
					"self": {
						"href": "<string>"
					},
					"avatar": {
						"href": "<string>"
					},
					"html": {
						"href": "<string>"
					}
				},
				"type": "<string>",
				"uuid": "<string>",
				"account_id": "<string>",
				"nickname": "<string>"
			},
			"reason": "<string>",
			"created_on": "2025-04-06T08:43:32.831168+00:00",
			"updated_on": "2025-04-06T08:43:33.717193+00:00",
			"destination": {
				"branch": {
					"name": "<string>"
				},
				"commit": {
					"hash": "<string>",
					"links": {
						"self": {
							"href": "<string>"
						},
						"html": {
							"href": "<string>"
						}
					},
					"type": "<string>"
				},
				"repository": {
					"type": "<string>",
					"full_name": "<string>",
					"links": {
						"self": {
							"href": "<string>"
						},
						"html": {
							"href": "<string>"
						},
						"avatar": {
							"href": "<string>"
						}
					},
					"name": "<string>",
					"uuid": "<string>"
				}
			},
			"source": {
				"branch": {
					"name": "<string>",
					"links": {}
				},
				"commit": {
					"hash": "<string>",
					"links": {
						"self": {
							"href": "<string>"
						},
						"html": {
							"href": "<string>"
						}
					},
					"type": "<string>"
				},
				"repository": {
					"type": "<string>",
					"full_name": "<string>",
					"links": {
						"self": {
							"href": "<string>"
						},
						"html": {
							"href": "<string>"
						},
						"avatar": {
							"href": "<string>"
						}
					},
					"name": "<string>",
					"uuid": "<string>"
				}
			},
			"links": {
				"self": {
					"href": "<string>"
				},
				"html": {
					"href": "<string>"
				},
				"commits": {
					"href": "<string>"
				},
				"approve": {
					"href": "<string>"
				},
				"request-changes": {
					"href": "<string>"
				},
				"diff": {
					"href": "<string>"
				},
				"diffstat": {
					"href": "<string>"
				},
				"comments": {
					"href": "<string>"
				},
				"activity": {
					"href": "<string>"
				},
				"merge": {
					"href": "<string>"
				},
				"decline": {
					"href": "<string>"
				},
				"statuses": {
					"href": "<string>"
				}
			},
			"summary": {
				"type": "<string>",
				"raw": "<string>",
				"markup": "<string>",
				"html": "<string>"
			},
			"draft": false
		},
		{
			"comment_count": 1,
			"task_count": 0,
			"type": "<string>",
			"id": 137,
			"title": "<string>",
			"description": "<string>",
			"state": "<string>",
			"merge_commit": null,
			"close_source_branch": true,
			"closed_by": null,
			"author": {
				"display_name": "<string>",
				"links": {
					"self": {
						"href": "<string>"
					},
					"avatar": {
						"href": "<string>"
					},
					"html": {
						"href": "<string>"
					}
				},
				"type": "<string>",
				"uuid": "<string>",
				"account_id": "<string>",
				"nickname": "<string>"
			},
			"reason": "<string>",
			"created_on": "2025-04-06T08:43:32.831168+00:00",
			"updated_on": "2025-04-06T08:43:33.717193+00:00",
			"destination": {
				"branch": {
					"name": "<string>"
				},
				"commit": {
					"hash": "<string>",
					"links": {
						"self": {
							"href": "<string>"
						},
						"html": {
							"href": "<string>"
						}
					},
					"type": "<string>"
				},
				"repository": {
					"type": "<string>",
					"full_name": "<string>",
					"links": {
						"self": {
							"href": "<string>"
						},
						"html": {
							"href": "<string>"
						},
						"avatar": {
							"href": "<string>"
						}
					},
					"name": "<string>",
					"uuid": "<string>"
				}
			},
			"source": {
				"branch": {
					"name": "<string>",
					"links": {}
				},
				"commit": {
					"hash": "<string>",
					"links": {
						"self": {
							"href": "<string>"
						},
						"html": {
							"href": "<string>"
						}
					},
					"type": "<string>"
				},
				"repository": {
					"type": "<string>",
					"full_name": "<string>",
					"links": {
						"self": {
							"href": "<string>"
						},
						"html": {
							"href": "<string>"
						},
						"avatar": {
							"href": "<string>"
						}
					},
					"name": "<string>",
					"uuid": "<string>"
				}
			},
			"links": {
				"self": {
					"href": "<string>"
				},
				"html": {
					"href": "<string>"
				},
				"commits": {
					"href": "<string>"
				},
				"approve": {
					"href": "<string>"
				},
				"request-changes": {
					"href": "<string>"
				},
				"diff": {
					"href": "<string>"
				},
				"diffstat": {
					"href": "<string>"
				},
				"comments": {
					"href": "<string>"
				},
				"activity": {
					"href": "<string>"
				},
				"merge": {
					"href": "<string>"
				},
				"decline": {
					"href": "<string>"
				},
				"statuses": {
					"href": "<string>"
				}
			},
			"summary": {
				"type": "<string>",
				"raw": "<string>",
				"markup": "<string>",
				"html": "<string>"
			},
			"draft": false
		}
	],
	"pagelen": 85,
	"size": 3,
	"page": 1
}
```

## Workflow Library Example

[List Pull Requests with Bitbucket and Send Results Via Email](https://library.blinkops.com/workflows/list-pull-requests-with-bitbucket-and-send-results-via-email)

<div className="iframe-wrapper">
  <div className="iframe-media">
    <img src="https://mintcdn.com/blinkops-2/ojHYuDeYX5FWuN8a/img/Icons/play-box.svg?fit=max&auto=format&n=ojHYuDeYX5FWuN8a&q=85&s=b8af968e71438a9499c3223c9bd29fb2" alt="Workflow Library" width="16" height="16" data-path="img/Icons/play-box.svg" />

    Preview this Workflow on desktop
  </div>

  <iframe className="iframe" src="https://library.blinkops.com/workflows/list-pull-requests-with-bitbucket-and-send-results-via-email/canvas" />
</div>
