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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

how to set mainbranch in bitbucket via api v2

I connect to the question, I need to periodically create new branches and change main branch

but I can not appoint main branch

this action is not mentioned in the documentation


not working, I send

'type': 'branch',
'name': 'branch_name'}


not working, I send

{'parents': 'master', 'branch': 'branch_name'}


1 answer

2 votes

Hello Денис

With the v2 API being so new we have noticed a few people asking the same. This short answer if you can make modifications to the main branch within the v2 API is no. The longer answer is there are feature requests and there is more to come within the v2 API in the future. With the changes spawned from GDPR, there is work that needs to be done beforehand. There is a feature request I would suggest you vote and watch to receive updates on its status. You may find this request at Issue #13306.

I hope this proves helpful and helps to clarify what is possible within the v2 API.

Stephen Sifers

I understand everything, but the task has been hanging since 2016, how many votes do you need to solve this problem?

Hello Денис,

Feature requests don’t always come down to votes themselves, there are other factors which may cause one feature to move to production and other features to have to wait. The best explanation of how new features get approved is within the Implementation of New Features Policy. This policy explains all of what is evaluated when a new feature gets approved.

I hope this is helpful in explaining what is needed to approve a feature request.

Stephen Sifers

@Stephen Sifers a year later and this hasn't been prioritized or worked on. what gives?

so almost a year again and yet feature is not implemented. What it will take to prioritize this feature, if voting doesn't play a role ?

Like # people like this

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events