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

# Pull requests API

> Read the pull requests Decimal opened in your connected repositories.

Decimal opens pull requests when it proposes a change to code or docs, such as a [knowledge gap](https://docs.decimal.app/api-reference/gaps/overview.md) that targets your docs repository. The Pull requests API reads them, with the changes Decimal proposed and the ticket that started them.

| Endpoint | Scope |
| - | - |
| [List pull requests](https://docs.decimal.app/api-reference/pull-requests/list-pull-requests.md) | `pull_requests:read` |
| [Get a pull request](https://docs.decimal.app/api-reference/pull-requests/get-a-pull-request.md) | `pull_requests:read` |

## Pull requests

| Field | Meaning |
| - | - |
| `source`, `repository`, `number`, `url` | The code host (`github`), the `owner/repo`, and the pull request's number and link there |
| `state` | `open`, `merged`, or `closed` |
| `head_ref` | The branch Decimal pushed to |
| `files` | The changes Decimal proposed when it opened the pull request. Commits pushed later aren't included |
| `created_by_decimal` | Whether Decimal opened it |
| `ticket_id` | The Decimal ticket it was opened for |

`GET /v0/pull_requests` returns pull requests newest first. Filter with `state` and `repository` (as `owner/repo`), and page with `limit` and `starting_after`.

```bash theme={null}
curl "https://api.getdecimal.ai/v0/pull_requests?state=open&repository=acme/docs" \
  -H "Authorization: Bearer sk-de-..."
```

Decimal never merges a pull request. Review, merge, or close it on the code host as usual.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.