Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Create Project with template over REST call

Langer Lukas August 6, 2025

Hello!
I am trying to create a project over a REST call (POST) via Postman, but I am only gettig Error 400 back.

I got the code from the Atlassian Support, just changed some values for my reasons.

Error I am getting back in Postman is:
"Invalid request payload. Refer to the REST API documentation and try again."

 

I allready did the stringify workaround, but I am sending the call as JSON via Postman.

AND I am using this code in an Automation to create a project from a web request.

 

The Postman code might be wrong, but the web request should work.

 

Here is my code - values are cleared for Data privacy reasons, but in my code they are filled correctly.

 

{

"details": {

  "key": "TSTPFV",

  "name": "Testproject in Postman for validation",

  "description": "",

  "accessLevel": "OPEN",

  "leadAccountId": "--",

  "projectTypeKey": "software",

  "enableComponents": true

 },

  "template": {

   "scope": {

    "type": "GLOBAL"

    }

   "project": {

    "pcri": "pcri:project:id:--",

    "fieldLayoutSchemeId": "pcri:fieldLayoutSchemeId:id:--",

    "issueTypeSchemeId": "pcri:issueTypeScheme:id:--",

    "notificationSchemeId": "pcri:notificationScheme:id:--",

    "permissionSchemeId": "pcri:permissionScheme:id:--",

    "workflowSchemeId": "pcri:workflowScheme:id:--"

    }

   "board": {

    "pcri": "pcri:board:id:--",

    "name": "TSTPFV board",

    "enableSprint": false,

    "columns": [

     {

      "name": "Backlog",

      "statusIds": [

       "pcri:status:id:--"

      ]

     },

 {

      "name": "Selected for Development",

      "statusIds": [

       "pcri:status:id:--"

      ]

     },

     {

      "name": "In Progress",

      "statusIds": [

       "pcri:status:id:3"

      ]

     },

     {

      "name": "Done",

      "statusIds": [

       "pcri:status:id:--"

      ]

     }

    ]

   }

  }

 }

3 answers

1 accepted

0 votes
Answer accepted
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 6, 2025

HI @Langer Lukas 

Which API endpoint are you using to create a project?

I just did this on my free tier and it worked, the payload in Postman I used as example

 

{
"assigneeType": "UNASSIGNED",
"avatarId": 10200,
"description": "API test",
"key": "API",
"leadAccountId": "<account_id>",
"name": "API cretaed project",
"projectTemplateKey": "com.pyxis.greenhopper.jira:gh-simplified-agility-kanban",
"projectTypeKey": "software",
}
Langer Lukas August 12, 2025

Maybe the title of the post was a little bit confusing:

I want to create a project by sending a web request triggered by an automation in Jira (JSM).

The code I posted is the code I got from an Atlassian developer.

 

As he says, the code should create a project, using my custom template - not one jira is providing.

 

So I am looking for a code to create a new project using a custom template triggered by an automation inside jira.

 

BR

Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 12, 2025

Hi @Langer Lukas 

That code seems like in an app or on server/DC, not cloud.

As creating a board on a project is a different API endpoint and can't be used in the project endpoint, as can be viewed in the api documentation.

Just as permission and workflow schemes are different endpoints to call to set these on a project.

For a board the Jira Cloud Software api needs to be used. (https://developer.atlassian.com/cloud/jira/software/rest/api-group-board/#api-group-board )

Langer Lukas August 12, 2025

Hi @Marc - Devoteam
Ahh ok - that would explain a lot.

So if I want to create a project out of a custom template using API on cloud, I would need the code you provided?

Or could I also use this code:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-templates/#api-rest-api-3-project-template-post

 

Thanks for the help!

Langer Lukas August 12, 2025

Also - what value does "projectTemplateKey" need, if I want to use my custom template from my cloud.

Thanks!

Langer Lukas August 12, 2025

Hi @Marc - Devoteam
One question:
When defining the field sector, I got the values for all of them, but 

  • issueLayouts
  • fieldLayouts

Where can I find the correct values that need to be given here?

 

Thank you!

Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 12, 2025

Hi @Langer Lukas 

I think this can't be don yet, as the link references a non existing page.

And I found this feature request https://jira.atlassian.com/browse/JRACLOUD-74697 

You might want to check this for clarity with Atlassian Support

0 votes
Langer Lukas August 12, 2025

I think I solved my biggest mistake.
I thought, that it would be possible to use one of my custom created templates, that are used in MY cloud as a template in the API call. But this does not work.

The "Create project" POST is a basic project, that would not look different if I clicked on "create project" in Jira.

The new "Create custom project" POST from API v3 needs me to set the values I would like to use - so I need to find out, what templates I am using and set the IDs of all the schemes.

 

The only thing I need to know now is:
Will the code work as a web request triggered by an automation if it looks like this:

 

"details": {
"accessLevel": "OPEN",
"additionalProperties": {},
"assigneeType": "UNASSIGNED",
"avatarId": 11000,
"categoryId": 11000,
"description": "{{issue.description}}",
"enableComponents": true,
"key": "{{issue.customfield_11201}}",
"language": "en",
"leadAccountId": "{{creator.accountId}}",
"name": "{{issue.summary}}",
},
"template": {
"boards": {
"boards": [
{}
]
},
"field": {
"customFieldDefinitions": [
{}
],
"fieldLayoutScheme": {},
"fieldLayouts": [
{}
],
"issueLayouts": [
{}
],
"issueTypeScreenScheme": {},
"screenScheme": [
{}
],
"screens": [
{}
]
},
"issueType": {
"issueTypeHierarchy": [
{}
],
"issueTypeScheme": {},
"issueTypes": [
{}
]
},
"notification": {
"description": "<string>",
"name": "<string>",
"notificationSchemeEvents": [
{}
],
"onConflict": "FAIL",
"pcri": {}
},
"permissionScheme": {
"addAddonRole": true,
"description": "<string>",
"grants": [
{}
],
"name": "<string>",
"onConflict": "FAIL",
"pcri": {}
},
"project": {
"fieldLayoutSchemeId": {},
"issueSecuritySchemeId": {},
"issueTypeSchemeId": {},
"issueTypeScreenSchemeId": {},
"notificationSchemeId": {},
"pcri": {},
"permissionSchemeId": {},
"projectTypeKey": "software",
"workflowSchemeId": {}
},
"role": {
"roleToProjectActors": {},
"roles": [
{}
]
},
"scope": {
"type": "GLOBAL"
},
"security": {
"description": "Newly created issue security scheme",
"name": "New Security Scheme",
"pcri": {},
"securityLevels": [
{}
]
},
"workflow": {
"statuses": [
{}
],
"workflowScheme": {},
"workflows": [
{}
]
}
}
0 votes
Aaron Pavez _ServiceRocket_
Community Champion
August 6, 2025

Hi @Langer Lukas 

According to Postman, this is the body you need:

https://www.postman.com/api-evangelist/atlassian-jira/request/l0flj0q/create-project

The JIRA API

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-projects/#api-rest-api-3-project-post

The body:

 

{
"key": "<string>",
"name": "<string>",
"projectTypeKey": "<string>",
"projectTemplateKey": "<string>",
"description": "<string>",
"lead": "<string>",
"leadAccountId": "<string>",
"url": "<string>",
"assigneeType": "<string>",
"avatarId": "<long>",
"issueSecurityScheme": "<long>",
"permissionScheme": "<long>",
"notificationScheme": "<long>",
"categoryId": "<long>"
}
An example that works, taken from here:
{
"key""SOF",
 "name""Software Sample",
 "projectTypeKey""software",
 "projectTemplateKey""com.pyxis.greenhopper.jira:gh-scrum-template",
 "description""Example Project description",
 "leadAccountId""61f93c0fb3ec760068c11a32",
 "assigneeType""PROJECT_LEAD",
 "avatarId""27370"
 }'
Also make sure you have the administer jira global permissions. 
Regards
Langer Lukas August 6, 2025

Hi @Aaron Pavez _ServiceRocket_
So I downloaded the Postman Collection of REST API v3 from the Atlassian Developer site (The Jira Cloud platform REST API)

There I started the "Create custom project" POST call.

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-project-templates/#api-rest-api-3-project-template-post

 

with the code I did post here.

The code I got from an Atlassian Developer.

So here is the thing:
I want to create a project using a custom template. The project should be created by an automation via web request.

 

Regards

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
ENTERPRISE
TAGS
AUG Leaders

Atlassian Community Events