Lesstep
Bitbucket Data Center · REST API · October 24, 2026

Bitbucket Data Center: "You are attempting to modify a pull request based on out-of-date information"

Bitbucket Data Center (formerly Bitbucket Server) gives every pull request a version number, and a change such as a merge or a decline names the version it was based on. When the pull request has been updated since, Bitbucket refuses the change with this message instead of applying it to something the requester did not see. It is not a permission problem and not a merge conflict: the usual fix is to read the pull request again and repeat the action, after a look at what changed.

The answer

HTTP/1.1 409 Conflict
Content-Type: application/json

{"errors": [{"message": "You are attempting to modify a pull request based on out-of-date information.",
             "exceptionName": "com.atlassian.bitbucket.pull.PullRequestOutOfDateException",
             "currentVersion": 14, "expectedVersion": 12, ...}]}

When it happens

What to do

  1. In the browser: reload the pull request, look at what changed, and repeat the action.
  2. In a script: read the pull request first (GET /rest/api/latest/projects/{project}/repos/{repo}/pull-requests/{id}), take its version, and send it: POST …/merge?version=N, and the same for …/decline and …/reopen. The API documentation says to fetch the pull request from the server before the operation and look for its version attribute.
  3. Before merging with the version you just read, check that it is still the pull request you checked: a version read right before the merge passes the check for whatever the pull request has become. Compare its fromRef.latestCommit with the commit your review or build was based on.
  4. For approvals, the API definition marks the version parameter of PUT …/participants/{userSlug} as deprecated and says to send the last reviewed commit in the request body instead (lastReviewedCommit). Bitbucket then answers 409 when the pull request "has been updated since the last reviewed commit specified by the request".

Bitbucket pull requests in IntelliJ IDEA

Pull Request Inbox for Bitbucket, a plugin by Lesstep for JetBrains IDEs 2024.1 or later, lists the pull requests that wait for your review in an IDE tool window, from Bitbucket Cloud and, in beta, from Bitbucket Data Center 8.9 or later with a personal HTTP access token, sent only to that server. In Data Center it reads the pull request just before it approves, declines or merges, and sends that version. It does not stop at the version: from version 1.0.28 (merging) and 1.0.29 (approving) it compares the source branch's latest commit with the one on your screen, and when new commits came in after you opened the pull request, it does not merge or approve and reloads the pull request with them. From 1.0.30, a line comment on a file that a push changed since is not added either. The review inbox, diffs and discussions are free; approving, commenting and merging are Pro (US$1.50 a month, with a 30-day trial).

Get it on JetBrains Marketplace

Bitbucket and Atlassian are trademarks of Atlassian; IntelliJ IDEA is a trademark of JetBrains s.r.o. This page is not affiliated with or endorsed by Atlassian or JetBrains.

More: You are not permitted to access this resource (Data Center) · Bitbucket's diff limits · Bitbucket pull request plugins for IntelliJ IDEA, compared · 日本語