Pull requests

Merge pull request

Merges a GitHub pull request when it is open and mergeable, or adds it to the merge queue when its base branch requires one. With bypass_rules, merges a blocked pull request with your GitHub account when it can bypass the branch's rules. Returns 403 when the organization's security policy blocks agent merges.

post/v1/replica/{id}/pull-requests/merge

Request

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

Path parameters

idstring uuid required

Replica ID

Headers

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

API version. 2026-10-07 returns snake_case responses. See versioning.

Request body

pr_urlstring uri required
merge_method'merge' | 'squash' | 'rebase'

Defaults to merge_rules.default_merge_method. Ignored on merge queue branches, where the queue picks, unless bypassing rules.

bypass_rulesboolean

Merge right away, skipping any merge queue, when the pull request is blocked and merge_rules.viewer_can_bypass is true. Merges as your GitHub account, so it needs a personal API key with GitHub connected.

Response

Success

successtrue required
queuedboolean required

True when the pull request joined the merge queue instead of merging right away.

Changes

No recorded changes to this operation across all 1 revision of this API.