Skip to main content
The Pull Requests API provides comprehensive endpoints for managing pull requests, reviews, comments, and code suggestions.

Overview

All pull request endpoints are available through the tRPC API at /trpc/pulls.*.

List Pull Requests

List pull requests for a repository.

Response


Get Pull Request

Get a single pull request by repository and number.

Response

Includes full PR details plus stack information if part of a stacked diff:

Create Pull Request

Create a new pull request.
Creating a non-draft PR automatically triggers an async AI review.

Update Pull Request

Update PR title, body, or draft status.

Check Mergeability

Check if a PR can be merged without conflicts.

Response


Merge Pull Request

Merge a pull request using the specified strategy.

Response


Close / Reopen


Reviews

Add Review

Submit a review on a pull request.

List Reviews


Comments

Add Comment

Add a comment to a pull request. Supports inline file comments.

List Comments

Get File Comments

Get inline comments for a specific file.

Update / Delete Comment

Resolve / Unresolve Comment Thread


Code Suggestions

Add Suggestion

Add a comment with a code suggestion that can be applied directly.

Apply Suggestion

Apply a code suggestion, creating a commit with the change.

Response


Labels

Get Labels

Add / Remove Label


Reviewer Management

Request Review

Request a review from a user.

Remove Review Request

List Reviewers


Inbox Endpoints

Get Inbox Summary

Get counts for each inbox section.

Response

PRs Awaiting Review

Get PRs where you’ve been requested as a reviewer.

My Open PRs

Get your own open PRs awaiting reviews from others.

Participated PRs

Get PRs you’ve commented on or reviewed.

Diff & Commits

Get PR Diff

Get parsed file changes with hunks.

Response

Get PR Commits

Get commits included in the pull request.

Response


AI Review

Get AI Review

Get the most recent AI-generated review.

Response

Trigger AI Review

Manually trigger an AI review (useful for drafts or re-reviews).

Conflicts

Get Conflict Details

Get detailed conflict information for a PR.

Response


Usage Examples

TypeScript Client