Create Project Jira Rest Call Not Working returning 400

I tried to access Jira Rest Call for Creating a Project in My cloud Jira App.


And Tried to get all Project also using this rest Call But every time it Returning 400 status Code.

Here Is RequestJSON BOdy

{"key":"EX","name":"Example","projectTypeKey":"business","projectTemplateKey":"com.atlassian.jira-core-project-templates:jira-core-simplified-project-management","description":"Example Project description","lead":"Chakresh Tiwari"}

Any Suggestions where I am Making mistakes what I can Correct.


@ChakreshTiwari - there should be a verbose error response that the method returns. I’d venture to guess that it’s your lead value, because everything else seems fairly generic; however, check the error response body.

Thanks for Your suggestion and I tried passing accountid and email consectively but both are giving the same error I have attached the screenshot whatever I am passing in request Body Please check this and tell me where I am wrong. In response, I am getting HTML with status code 400.

<!doctype html>
<html lang="en">

<title>HTTP Status 400 – Bad Request</title>

<h1>HTTP Status 400 – Bad Request</h1>
<hr class="line" />
<p><b>Type</b> Status Report</p>
<p><b>Message</b> Claim &#39;qsh&#39; is missing.</p>
<p><b>Description</b> The server cannot or will not process the request due to something that is perceived to be a
client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
<hr class="line" />
<h3>Apache Tomcat/9.0.24</h3>


So any suggestion i want to create a project using rest call but its not working.
Thanks for Help

Ah, the error that you’re seeing doesn’t have anything to do with your POST body request. You aren’t generating a valid qsh (query string hash) value for your request on the backend.

Check out the following docs about the qsh:

Yes i am passing jwt token also. like this Is it not correct way??


For this request also same thing.

JWT should be passed in the header. See the docs that I referenced in the last reply.

Secondly, the qsh — are you calculating a qsh value and passing that?

I passed data like this [{"notificationScheme":10000,"projectTemplateKey":"com.atlassian.jira-core-project-templates:jira-core-simplified-project-management","avatarId":10409,"issueSecurityScheme":10001,"name":"Example","description":"Example Project description","assigneeType":"PROJECT_LEAD","leadAccountId":{"present":true},"projectTypeKey":"business","key":"EX"}]

and i passed jwt in header also but still giving the same error. I checked that link also. Can You please help me to fix this.

And what of your qsh value?

qsh value is that jwt token which i am passing in header if not can you please how to get this value and how to pass.

The doc I referenced earlier has instructions on how to manually calculate the qsh value, which you need to include in your JWT claim.

How are you generating your JWT token? With a helper library like atlassian-jwt, or rolling it with your own code/functions?

I am getting jwt from browser after installing app when i loaded frontend then in elements inside head JWT is there from there i am copying and using.