Update a repo's project via REST API

Is there a way via the API to update which project a Bitbucket repo is part of? It appears that the repositories endpoint only has a GET, not a POST.

I’m not creating a Marketplace app; I’m looking to write a script that I can run in my browser (via a local php server) that will generate a list of all repos with a checkbox next to each; on clicking a submit button it would update the project of the selected repos.

I know how to generate the page; I’ve done that for a number of Jira scripts I’ve written. But I can’t find anything in the API that would allow me to update repo properties.

https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories

@EstherStrom, welcome to the Atlassian developer community.

The repositories endpoint you sited is about searching through public repos. If you have the list of repositories that you own, you’ll need the full URL with workspace and repo_slug. For that, you can PUT /2.0/repositories/{workspace}/{repo_slug} with a body like:

{
    "project": {
        "key": "MARS"
    }
}

Or with a UUID like:

{
    "project": {
        "key": "{ba516952-992a-4c2d-acbd-17d502922f96}"
    }
}

For details see: PUT /2.0/repositories/{workspace}/{repo_slug}

Thanks! I’ll give that a shot.