Creating Projects via REST API in Jira

Still need help?

The Atlassian Community is here for you.

Ask the community

This article was originally created as a practical reference guide for Jira Server and Jira Data Center editions. 

If you are using Jira Cloud please refer to Jira Cloud REST API reference for examples on how to perform this REST call for a Jira Cloud site.

Issue: 

Currently the REST API Manual is missing the complete list of projectTemplateKeys and projectTypeKeys, which are necessary in order to create all the possible project types in Jira, they fall in to three main categories:

Software

Core

Service Management

Below you will find a complete list of these and examples of each. 

List of  projectTypeKey and corresponding projectTemplateKey(s). 

Jira SOFTWARE Projects:

projectTypeKey = software

projectTemplateKey(s): 

Scrum: "com.pyxis.greenhopper.jira:gh-scrum-template"
Kanban: "com.pyxis.greenhopper.jira:gh-kanban-template"
Basic: "com.pyxis.greenhopper.jira:basic-software-development-template"

Example of API call to create a software project:

curl -X POST \
  http://<yourJiraurl>/rest/api/2/project \
  -H 'Authorization: Basic cm9ubmllOlRhdGVyYnVnMTIj' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
 "key": "SOF",
 "name": "Software Sample",
 "projectTypeKey": "software",
 "projectTemplateKey": "com.pyxis.greenhopper.jira:gh-scrum-template",
 "description": "Example Project description",
 "lead": "ronnie",
 "assigneeType": "PROJECT_LEAD",
 "avatarId": 10200
 }'

(warning) As per the REST API documentation if "issueSecurityScheme":, "permissionScheme": or  "notificationScheme": are not specified,  the defaults will be utilized. 

In order to create a Kanban  or basic  type software project we'd just change the "projectTemplateKey" to the appropriate type as listed above.

Jira  CORE or BUSINESS type Projects:

projectTypeKey = business

projectTemplateKey(s): 

Project Management: "com.atlassian.jira-core-project-templates:jira-core-project-management"
Task Management: "com.atlassian.jira-core-project-templates:jira-core-task-management"
Process Management: "com.atlassian.jira-core-project-templates:jira-core-process-management"

Example of API call to create a core/business project:

curl -X POST \
  http://<yourJiraurl>/rest/api/2/project \
  -H 'Authorization: Basic cm9ubmllOlRhdGVyYnVnMTIj' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
 "key": "BUS",
 "name": "Business Sample",
 "projectTypeKey": "business",
 "projectTemplateKey": "com.pyxis.greenhopper.jira:gh-scrum-template",
 "description": "Example Project description",
 "lead": "ronnie",
 "assigneeType": "PROJECT_LEAD",
 "avatarId": 10200
 }'

Jira  Service Management type Projects:

projectTypeKey = service_desk

projectTemplateKey(s): 

Basic: "com.atlassian.servicedesk:basic-service-desk-project"
IT Service Management: "com.atlassian.servicedesk:itil-v2-service-desk-project"
Customer Service: "com.atlassian.servicedesk:customer-service-desk-project"

Example of API call to create a service management project:

curl -X POST \
  http://<yourJiraurl>/rest/api/2/project \
  -H 'Authorization: Basic cm9ubmllOlRhdGVyYnVnMTIj' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -d '{
 "key": "JSD",
 "name": "JSD Sample",
 "projectTypeKey": "service_desk",
 "projectTemplateKey": "com.atlassian.servicedesk:itil-v2-service-desk-project",
 "description": "Example Project description",
 "lead": "ronnie",
 "assigneeType": "PROJECT_LEAD",
 "avatarId": 10200
 }'


Related links

https://docs.atlassian.com/software/jira/docs/api/REST/8.22.4/#project-createProject



Last modified on Sep 15, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.