REST API startup-help - create user

Hello everybody,

I need some way to get new users automatically onboarded and started to play around with the JIRA Cloud REST API but I need some help to get started.

So I need to get authenticated first to send API requests via REST, I’ve already generated an Token for that. And I’ve found the right POST request via curl for creating a new user account. My problem is to get those two combined.

So the curl command for authenticating looks like that:

curl -D- \
   -u \
   -X GET \
   -H "Content-Type: application/json" \

and the command for creating a new user:

curl --request POST \
  --url '' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "emailAddress": "",
  "displayName": "New User"

If I try to authenticate with the first one (seems to work) and use the second command after that, it seems that I’m not authenticated anymore or it is a new session or something like that.

Some help would be appreciated :slight_smile:


Hi Ulrich,

you have to send the authentication information for each request you are performing. This means for your second request you have to add -u \ as well. Does this work for you?

Please take care about this deprecation notice for Jira cloud regarding cookie based authentication if you have thought about to use it:

1 Like

that worked! thanks a lot man!

Was too simple… I’ve got an error that I need a username, but that error was about creating the user not the authentication itself. Unfortunatly the documentation says that the username is not requiered.

Thanks again!

1 Like