---
title: List pull requests
description: Open pull and merge requests, newest first.
url: https://www.hacktron.ai/docs/api/pull-requests/list-pull-requests
---

# List pull requests

Returns open pull and merge requests, most recently updated first. Send `repository_id`, from [`GET /repos`](/docs/api/repos/list-repos), to list one repository. Without it, the list covers up to 20 of the organisation's enabled repositories, those with automatic reviews on first, and `truncated` is `true` when the organisation has more.

- `mine=true` keeps the pull requests you opened, matched through the source control accounts you linked to Hacktron. With no account linked, nothing matches.
- `limit` caps the list across all repositories. It isn't paginated, so narrow it with `repository_id` or `mine`.
- `errors` names the repositories or providers that couldn't be read, so the list may be incomplete when it isn't empty. Repositories Hacktron can't review, such as GitHub repositories connected with a personal access token, are left out without an entry.

Look one up with [`GET /pull-requests/details`](/docs/api/pull-requests/get-pull-request) to see Hacktron's review of it.

## Request

`GET /pull-requests`

Send an [API key](/docs/api/authentication) with the `read` scope in the `X-Api-Key` header.

:::examples

```bash title="Request" wrap=false
curl "https://api.hacktron.ai/v1/pull-requests?mine=true" \
  -H "X-Api-Key: $HACKTRON_API_KEY"
```

```json title="Response 200 OK" showLineNumbers=false wrap=false
{
  "data": [
    {
      "repository_id": "123e4567-e89b-12d3-a456-426614174000",
      "repository": "acme/api",
      "provider": "github",
      "number": 42,
      "title": "Add link previews",
      "url": "https://github.com/acme/api/pull/42",
      "author": "alice",
      "is_yours": true,
      "draft": false,
      "source_branch": "feat/link-previews",
      "target_branch": "main",
      "updated_at": "2026-11-08T09:41:20.000Z"
    }
  ],
  "errors": [],
  "truncated": false
}
```

:::

### Query parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `repository_id` | string (uuid) | Id from the repository list. Without it, open pull requests across the organisation's enabled repositories are listed. |
| `mine` | boolean | Only pull requests the caller opened, among each repository's most recently updated open pull requests, matched through the caller's source control accounts linked to Hacktron; with none linked nothing matches. Default `false`. |
| `limit` | number | At most this many, across repositories. Not paginated: narrow with repository_id or mine. Default `20`. At least 1. At most 50. |

## Responses

### 200 OK

| Field | Type | Description |
| --- | --- | --- |
| `data` | array of object, required | Open pull requests, most recently updated first. |
| `data[].repository_id` | string (uuid), required | Id from the repository list. |
| `data[].repository` | string, required | Repository full name. |
| `data[].provider` | string, required | One of `github`, `gitlab`, `bitbucket`, or `azure`. |
| `data[].number` | number, required | |
| `data[].title` | string, required | |
| `data[].url` | string, required | Web link to the pull request. |
| `data[].author` | string, required, nullable | The author's name on the provider. |
| `data[].is_yours` | boolean, required | Whether the caller opened it, matched through their linked source control accounts. |
| `data[].draft` | boolean, required | |
| `data[].source_branch` | string, required | |
| `data[].target_branch` | string, required | |
| `data[].updated_at` | string, required, nullable | Last update, or creation where the provider reports no update time. |
| `errors` | array of string, required | Repositories, or whole providers, whose pull requests could not be read; when not empty the list may be incomplete. Repositories Hacktron can't review, such as GitHub ones connected with a personal access token, are left out without an entry. |
| `truncated` | boolean, required | True when the organisation has more enabled repositories than one listing searches; pass repository_id to list a specific one. |

### 400 Bad Request

The repository isn't enabled for Hacktron, or its provider has no PR reviews here.

### 404 Not Found

The repository isn't connected to the organisation.

### 503 Service Unavailable

The repository's provider could not be read; try again later.
