List pull requests
author=me listing contains open pull requests authored by the API key ownerâs linked GitHub account. Use author=all to include other authors, or provide a GitHub login. head_branch and head_owner narrow the source branch and repository owner, including forks. The endpoint reference describes every filter and response field.
Results use data and next_page_token. Pass a returned token as page_token with the same repository, credential, organization, filters, and page size. Continue even when data is empty; stop when the token is null. Tokens expire after 10 minutes. Expired or incompatible tokens return 400 invalid_request.
Listings use live GitHub search and can change between pages. They do not provide a historical snapshot or an exhaustive export when GitHubâs search limit is reached. Check coverage.limitations and narrow the filters when necessary.
Read one pull request
The repository ID and pull-request number identify different resources. Use the repositoryâs provider ID in the first path segment and its local pull-request number in the final segment. An opaque PRid from a response cannot replace the number.
include=threads; repeated include parameters select both sections. Use include=none for core metadata without checks or threads. none cannot be combined with another section. See the endpoint reference for the generated schema.
Use the CLI
Use CodeRabbit CLI 0.9.4 or later. After signing in with an agentic organization key, the CLI returns the same JSON as the API:--include none for core metadata only. Continue a listing with --page-token, or continue review threads with --thread-page-token. Keep the same repository, organization, and filters when using either token.
Read CodeRabbit review state
UseGET /v1/repositories/{repository_id}/pull-requests/{pull_request_number}/review to read the existing CodeRabbit review observation shown by Triage. It uses the same authentication, repository access checks, and read quota as the other pull-request reads.
get_pull_request_review with repository_id and pull_request_number. The connection must include account:read and pull_requests:read consent.
The response keeps the providerâs current head_sha separate from the observationâs target_commit_sha. A missing or different target is not evidence that the current head was reviewed. Even a completed observation does not prove that review results were published.
unconfirmed means progress has not been confirmed recently. It does not establish that execution stopped, and it preserves the original observation timestamp and target. review: null means no usable observation is available; it does not prove that no review ran. The indexed observation can lag the providerâs current head.
See the review-state reference for the generated response fields and statuses. This read does not start a review.
Interpret observations
These fields do not establish that CodeRabbit finished reviewing the current head. A bot comment, an unknown review state, or passing checks alone does not prove completion. Merge eligibility can also depend on branch rules and the acting userâs permissions.
Continue review threads
Threads have their own page token underthreads.next_page_token. Reuse it as thread_page_token while preserving include=threads and the thread filters. Thread roots default to unresolved CodeRabbit threads. thread_author=all includes other authors, while reply context retains its original authors.
replies_complete and reply_count on each thread. Reply context can be incomplete; follow the threadâs source link for the full discussion. Thread and review data can change without a new commit.
On a fresh read, expected_head_sha is a comparison value: a different current head returns 200 with head_changed: true and the current head_sha. This does not wait for a review or mean that a review completed.
If the head changes during a read or between thread pages, the API returns 409 head_changed. Restart without the page token.
Access and recovery
Every request checks current access. A PR outside the selected installation, an inaccessible repository, or a repository that has been deleted and recreated under the same name returns404 not_found. The endpoint does not grant access based on a repository name or a previously issued cursor.
For 503 unavailable, retry after the dependency recovers. For 429 rate_limit_exceeded, respect Retry-After and error.retry_after when present. Avoid frequent polling; these reads share the public API request budget.
Whatâs next
List pull requests
Explore the filters and paginated response schema.
Read a pull request
Inspect review, merge, check, and thread fields.
Read CodeRabbit review state
Inspect the existing review observation and its target commit.