I have a team on my bitbucket account, myteam
, which contains a project named mainproject
. Whenever I want to create a repository inside I only need to
The content type has to be specified to curl
with this argument: -H "Content-Type: application/json"
. Then the json
data would be accessed normally. So the final command would look like this:
$ curl -X POST -v -u myaccount:passwd "https://api.bitbucket.org/2.0/repositories/myteam/repo2" -H "Content-Type: application/json" -d '{"has_wiki": true, "is_private": true, "project": {"key": "PRJ_KEY"}}'