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

Commit file to a specific branch using Bitbucket API 2.0



I'm trying to commit files to a specific branch (That's already created) using the Bitbucket API. When executing in Postman it creates a commit on master rather than on a specific branch I've specified according to the documentation.

Specifically this is the endpoint I'm using: 

Here's my request:


I've tried omitting parents and just using branch but all attempts fallback to comitting to the master branch.

What's the proper way to call this endpoint to commit to a specified branch?

Thanks in advance.

1 answer

1 accepted

0 votes
Answer accepted

I managed to get it working by posting those Query Parameters as form data as well along with my attached files. I guess I was thrown off a bit when reading the documentation and separated my files in form-data and query parameters attached to the endpoint URL.

Here's the Postman setup I used to get it working:

Screenshot 2020-12-12 at 01.41.23.png

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,741 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