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 a pull request from terminal? getting '400 error'

Currently using Bitbucket Server, I am trying to automate pull requests using a shell script. However I am getting the following error:


Parameter conditions "fork" not met for actual request parameters: create={}

Here is the curl command I am currently using:


curl -v https://MYHOST.MYSERVER/projects/AP/repos/$REPO/pullrequests?create \
--request POST \
--header 'Content-Type: application/json' \
--data '{
"title": "$COMMIT_TEXT",
"description": "automated PR. $COMMIT_TEXT",
"fork_policy": "no_forks",
"source": {
"branch": {
"name": "$NEW_BRANCH"
"destination": {
"branch": {
"name": "develop"
, "close_source_branch": false


1 answer

Hi @John Pooley if that question is related to Bitbucket Server please take a look at REST API docs for creating the pull request:

Maciej Adamczak


hi thank you. I believe this has gotten me somewhat further, I am now get this error:


XSRF Security Token Missing

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