Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Branch Permission


I would like to write a script and/or golang program that can access the bitbucket cloud repo and modify the permission to

- add one or more user to the Merge via pull request option
- remove one or more user from the Merge via pull request option
- allow Write Access to a branch for one or more user

Am sure some api's exist and would appreciate if someone points me to the right path.

2 answers

0 votes

Hello @Jayaraj Wilson ,

Here's the endpoint to create branch permission, and here's the one to modify an existing one.

All three use cases you described refer to updating a branch restriction, so the latter endpoint is what you're looking for.

Hope this helps.


0 votes
Jimmy Seddon Community Leader Apr 13, 2020

Hi @Jayaraj Wilson,

Here is the REST API documentation for BitBucket Cloud, specifically looking at a pullrequest by id:

I hope that's what you were looking to find.


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,804 views 0 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you