- Get started
- About
- Quick guide
- Use cases
- Glossary
- Migration
- Configuration
- Global configuration
- Project configuration
- Repository
- Template configuration
- Template scope
- Manage templates
- Supported fields
- Permissions
- Using templates
- Create issue from template
- Create issue structures
- Apply template to existing issue
- Recreate issue
- Use template custom field on issue create screen
- Default templates
- Direct link
- JQL searchers
- Variables
- Static variables
- Dynamic variables
- App Integrations
- Team-managed projects
- Jira Software
- Jira Service Management
- Advanced Roadmaps
- Issue Checklist for Jira
- Advanced
- Automation
- Legacy automation action
- REST API
- Create issue and apply template with Jira REST API
- Security
- Security statement
- App permissions
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.