Bitbucket api 2.0 pullrequest post

I try to use the API 2.0 to Create a pull request i have the following Web request

With the following body

{
  "title": "pr test",
  "source": {
    "branch": {
      "name": "feature/WindowsFormApp"
    }
  },
  "destination": {
    "branch": {
      "name": "develop"
    }
  },
  "reviewers": [
    {
      "uuid": "557058:4fab1d49-ac88-45e1-a137-60b6f891f651"
    },
    {
      "uuid": "557058:b05c824e-01d3-4284-9c38-b2e5ee0732b7"
    }
  ]
}

And i get the following response :
{“type”: “error”, “error”: {“message”: “Something went wrong”, “id”: “d4a7d5c4bbb644c39dca37dbaf554dc0”}}

Why?

To anyone wondering, if you come across this. The problem was with the UUID of the reviewers i put the wrong ID. I put the Account_ID that you received from the endpoint /user/{username} but you have to put in the UUID, I mistakenly thought they were the same thing.

1 Like