BitBucket Cloud API Fork repository to team ownership

Previously, we were able to log into BitBucket Cloud API with the team account credentials, but this seems to have been disabled. We looked into using an individual account, but there does not appear to be a way to fork a repository, and have the owner set as the team.

Version 2 of the API doesn't appear to have the ability to fork a repo (closest is only showing forks). Version 1 of the API states "Forks a new repository under the account of the currently authenticated user.".

There does not appear to be any API at all for transferring ownership to the team account either.

It would be best to still be able to use the API under the team account, rather than needing to fork it in an individual account and attempt to transfer ownership.

How can we accomplish the said task given the present APIs?

1 answer

0 votes

Hi David, with the version 2 of the API is not possible to fork a repository. We have already a Feature request for that, and you can find it at Fork repositories using API v2.

In the meantime you can still use the version 1, however please note that version 1 is no longer officially supported. 

Let us know if you have any questions!

Best regards,


Hi Ana,

As mentioned, I've already determined how to fork a repository. The issue is that I need the repository to be owned by the team and not owned by the authenicated account.

Previously it was achieved by being logged in on the team account, but that is no longer possible.

There is also no API to transfer ownership to a team (or even transfer ownership in general?)


Hi David! Currently it's not possible to use the API to transfer the ownership of a repo, but we have a Feature request for that at Change repository ownership through the API. You can vote for it, watch it or add a comment.

The only way to transfer a repository at the moment is via the web interface.

Hope this helps :)


Suggest an answer

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

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables ROLLBAR_ACCESS_TOKEN...

216 views 0 12
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you