---
title: "Get pull requests"
method: POST
path: "/v1/replica/{id}/pull-requests/details"
tags: ["Pull requests"]
---

# Get pull requests

`POST /v1/replica/{id}/pull-requests/details`

## Request

- Base URL: `https://api.replicas.dev`
- URL: `https://api.replicas.dev/v1/replica/{id}/pull-requests/details`
- Auth: HTTP bearer

Returns state, checks, reviews, and mergeability for up to 20 pull requests the replica opened. Get URLs from Get replica.

## Path parameters

- `id` string, uuid, required

## Headers

- `X-Replicas-Api-Version` '2026-10-07'

## Request body

- WorkspacePullRequestDetailsRequest
  - `pr_urls` string[], required

## Response `200`

Success

- WorkspacePullRequestDetailsResponse
  - `pull_requests` object[], required
    - `url` string, uri, required
    - `details` PullRequestDetails, required
      - `url` string, uri, required
      - `repo_name` string, required
      - `owner` string, required
      - `repo` string, required
      - `number` integer, required
      - `title` string, required
      - `state` 'open' | 'merged' | 'closed' | 'draft', required
      - `author_login` string, nullable, required
      - `head_branch` string, required
      - `base_branch` string, required
      - `stack` PullRequestStack, required: GitHub stack metadata. Null for standalone GitHub pull requests and GitLab merge requests.
        - `number` integer, required
        - `size` integer, required
        - `position` integer, required: 1-based order from the stack base to its top pull request.
        - `base_branch` string, required
      - `mergeability` 'mergeable' | 'blocked' | 'behind' | 'conflicts' | 'draft' | 'unknown', required: Whether the code host will currently accept a merge. Mirrors GitHub's mergeable_state and GitLab's detailed_merge_status, so it captures branch protection outcomes that state and ciStatus cannot: blocked means a rule such as a required review is unsatisfied, behind means the branch is out of date with its base, and unknown means the host has not finished computing mergeability.
      - `merge_queue` 'enabled' | 'queued', nullable, required: Set when the base branch merges through GitHub's merge queue; queued once this pull request is in it.
      - `ci_status` 'success' | 'failure' | 'pending' | 'none', required
      - `additions` integer, nullable, required: Added lines, or null when the code host does not provide complete diff data.
      - `deletions` integer, nullable, required: Deleted lines, or null when the code host does not provide complete diff data.
      - `changed_files` integer, required
      - `comment_count` integer, required
      - `checks` PullRequestChecksSummary, required: Check counts across the pull request head commit, spanning both commit statuses and check runs.
        - `total` integer, required
        - `passing` integer, required
        - `failing` integer, required
        - `pending` integer, required
      - `check_items` PullRequestCheck[]: Individual provider-reported checks and their current statuses.
        - `name` string, required
        - `status` 'success' | 'failure' | 'pending', required
        - `status_label` string
        - `description` string
        - `url` string, uri
        - `required` true: Present when the base branch's protection or rulesets require this check.
      - `merge_blockers` string[]: Normalized reasons the code host currently blocks the merge.
      - `merge_rules` PullRequestMergeRules: The base branch's classic protection and rulesets combined, with the repository's merge settings.
        - `required_approvals` integer, required
        - `approvals` integer, required: Current approvals from people with write access.
        - `code_owner_review` boolean, required
        - `dismiss_stale_reviews` boolean, required: Reported for rulesets only.
        - `merge_methods` string[], required: Methods both the repository and the branch's rules allow.
        - `default_merge_method` 'merge' | 'squash' | 'rebase', required
        - `auto_merge` 'available' | 'enabled', nullable, required
        - `viewer_can_bypass` boolean, required: Whether your GitHub account can merge without meeting the rules, on GitHub or with bypass_rules.
      - `can_approve` boolean, required: Whether the requesting user's connected GitHub account can currently submit an approving review.
      - `updated_at` string, date-time, required
    - `error` string, nullable, required

## Other responses

- `401`: Unauthorized - Invalid or missing API key
- `404`: Resource not found
- `500`: Internal server error

---

[API](https://skmtc.dev/replicas/apis/replicas-api.md) - [All operations](https://skmtc.dev/replicas/apis/replicas-api/llms.txt) - [OpenAPI document](https://skmtc.dev/replicas/apis/replicas-api/revisions/2703ac1c9cb7?raw)
