Apps documentation
Issue Templates for Jira
Cloud Server/Data Center
Issue Templates for Jira

Cloud

Server/Data Center

Documentation
FAQ
Release notes
Articles & Videos
Last updated Jul 3, 2023

Create issue and apply template with Jira REST API

You can use Jira REST API to Create issue and add to the body of the request’s issue.templates.automation property.

{ 
  "properties": [
    { "key": "issue.templates.automation", 
      "value": { 
        "applyTemplate": "TEMPLATE-1"
      }
    }
  ]
}
Note
You need to construct a minimal required payload to create the issue.

Provide:

  • Project
  • Issue type
  • Summary
  • other required fields from your issue type

Example

TEMPLATE-1 is an issue key of your template. As soon as you click Create, TEMPLATE-1 will be applied to the issue. It may overwrite provided summary based on your template’s scope.

Use the example below to create similar configuration.

{
    "fields": {
        "project": {
            "key": "JSA"
        },
        "summary": "Create issue from Postman",
        "issuetype": {
            "id": "10000"
        }
    },
    "properties": [
            {
                "key": "issue.templates.automation",
                "value": {
                "applyTemplate": "TEMPLATE-1",
                "variables": {
                    "MyDynamicVariable": "abc"
                }
            }
            }
    ]
}

You can also provide values for dynamic variables defined in your primary template as shown above.