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

Granting access for existing group to a private repository using REST API 2.0

I am trying to add an existing group to a private bitbucket repository using REST API 2.0. I am not able to find any endpoint or curl command in the documentation.

I came across a similar question asked in 2020, and one of the answers says "At the moment there is no support for adding users/groups to a repo via API 2.0 in Bitbucket Cloud".

Is it still the same or now the REST API 2.0 support for adding groups?

1 answer

1 accepted

1 vote
Answer accepted
Mark C Atlassian Team Apr 21, 2022

Hi @Vinay Cheguri

Welcome to the community.

Unfortunately, there's still no API 2.0 endpoint for adding user groups to a repository.
However, until we get a replacement for it, you can continue to use the API version 1 for adding user groups to a repository.

You can check the documentation on this link (Under "PUT group privileges on a repository") for more information.

Here's the exact endpoint:

PUT{workspace_id}/{repo_slug}/{group_owner}/{group_slug} --data "{privilege}"

As an example, if your repository is: some_workspace/some_repo

And your user group name is: some_group

The API endpoint would look like these in a CURL command:

curl --request PUT --user bb_username:app_password --data read

Btw, please also make sure you're using an App password (as your password credential) as we recently deprecated the Atlassian account password.

Hope it helps and do let me know if you have further questions that I can help with.

Mark C

Thanks, @Mark C  for providing the replacement option

Suggest an answer

Log in or Sign up to answer

Atlassian Community Events