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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to create project in bit bucket using bit bucket REST API?


We are trying to create projects in bit bucket automatically.

Tried the following  options and it didn't work. can some one guide?

1. curl -k -X POST --user UID:PWD "" -d "name=vptest"

2. curl -X POST -v -u UID:PWD "" -H "Content-Type: application/json" -d '{"scm": "git", "is_private": "true", "fork_policy": "no_public_forks"}'

3. curl-k -X POST --user "UID:PWD"'test_project'



3 answers

1 accepted

0 votes
Answer accepted
edwin Community Leader Jan 13, 2018

Hi Vaasanthi,

You can use this python api.

pip install stashy
import stashy

bitbucket = stashy.connect(host, user, pass)
bitbucket.projects.create("TEST", "Test")

I am able to create a project in Bibucket server using this API:


curl -D- -u username:Password -d "{ \"key\": \"PRA\", \"name\": \"My project\", \"description\": \"My First project through API\" }" -H "C
ontent-Type: application/json" http://servername:7990/rest/api/1.0/projects

I have a similar request


curl -D- -u username:Password -d "{ \"key\": \"PRA\", \"name\": \"My project VVP\", \"description\": \"My First project through API\" }" -H "Content-Type: application/json"

* replaced with my URL.



but i got an error

{"errors":[{"context":null,"message":"You are not permitted to access this resource","exceptionName":"com.atlassian.bitbucket.AuthorisationException"}]


I am a admin, so what is missing here.

Hi Vasanthi,


Were you able to create project using API?

Suggest an answer

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

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,786 views 10 16
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you