Get a pull request
Returns one pull request: its queue entry and readiness if it has ever been submitted to a queue, and ci, the head commit’s CI jobs counted with the URLs of the lists. Poll it: ci.pollAfterSeconds says when to read again, and a request that sends the last ETag in If-None-Match gets 304 when nothing changed.
Authorizations
An API key, sent as Authorization: Bearer <key>. An organization admin creates one in the Trunk app under Settings → Developer → API Keys and chooses the merge-queue permissions it holds; a key with none can read merge queues but change nothing. Those permissions scope merge queue only: every key can use the Flaky Tests and Dynamic CI endpoints, including their writes, whatever permissions it holds.
Path Parameters
The pull request's id.
"0f8fad5b-d9cb-469f-a165-70867728950e"
Response
The pull request
A pull request Trunk has indexed. There is no nested repository object — resolve repositoryId with GET /v2/repositories/{id}.
"0f8fad5b-d9cb-469f-a165-70867728950e"
"7c9e6679-7425-40de-944b-e07fc1f90ae7"
4901
"feat: terminate /v2 at the gateway"
"phil/implement-remaining-apis"
The head commit of the pull request as Trunk last indexed it. Compare against a verification run's testedPullRequests[].sha to tell whether a run tested the current head or a superseded one — a mismatch means the branch moved after that run started.
"9c58bf40e5c1a2b3d4e5f60718293a4b5c6d7e8f"
The branch this pull request targets. Must match the queue's targetBranch to be enqueueable — readiness.doesBaseBranchMatch reports that check.
"main"
"octocat"
True when this pull request's queue entry is non-terminal.
true
"2026-07-28T10:55:00.000Z"
Omitted until the provider sync has populated it.
"https://github.com/acme/widgets/pull/4901"
The pull request's state at the provider, as Trunk last indexed it — not its queue state, which is QueueEntry.state.
open, closed, merged "open"
A pull request's queue membership. There is at most one ever — re-submitting the same pull request mutates this record rather than adding another.
The pull request's page in the Trunk web app. Absent when the repository has no keyed organization.
"https://app.trunk.io/acme/pull/4901?repo=1a2b3c4d"
Whether the authenticated user authored this pull request. Provided on the queue pull-request list (GET /merge-queues/{id}/pull-requests); absent elsewhere and when the caller is not a signed-in user.
true
CI on the head commit. Null when the repository has no CI data. Absent from lists, from a lookup of more than one pull request, and when the CI read failed.