logoBack to App page
Issue Templates for Jira
Cloud Data Center
Documentation
FAQ
Release notes
Migration to Cloud
Issue Templates for Jira
Cloud Data Center
Documentation
FAQ
Release notes
Migration to Cloud
Last updated Sep 23, 2026

Applying templates with the REST API in Issue Templates for Jira Cloud

With Issue Templates for Jira you’re not limited to using a template with Jira only. You can also use external software to trigger different events in Jira and apply a template immediately.

With this feature you can:

  • connect this function with Zapier, Jenkins, or Bitbucket for example, to automatically create an issue and apply a template with data from a received e-mail.
  • use templates from Jira Automation and apply them to an issue in any moment on any action in automation.
  • synchronize it with Requirements and Test Management for Jira , so when a user creates an issue with a specific status a selected template can be applied and values filled.
  • use variables with REST API.
Warning

To use Apply template with REST API enable the Apply template option in global configuration - Visibility.

Example

Use case:

Automatic tests with Jenkins are launched, but they fail. Jenkins creates a job and then a Jira issue using REST API. It applies a template afterwards, which fills necessary information and creates a structure, used by a developer and tester to fix the error.

Configuration - Generate a token

To connect Issue Templates with external software to use API, you need to generate a token.

  1. Go to Api Tokens tab in the global configuration of Issue Templates (Marketplace Apps>Issue Templates>Configuration>API Tokens).

  2. Click Generate WebTrigger URL.

    API Tokens tab in Issue Templates global configuration with the Generate WebTrigger Url button highlighted
    Issue Templates for Jira - API Tokens tab: Generate WebTrigger URL

  3. Your Web Trigger URL has been generated. Don’t share the URL publicly. If you use the URL in a configuration and delete the URL later with the bin button, your configuration will stop working.

  4. Click Generate token to create a new token for a specific user.

    API Tokens tab with the generated Web Trigger URL and the Generate token button highlighted
    Issue Templates for Jira - API Tokens tab: generated Web Trigger URL and Generate token button

  5. Create a Label and select a user that you want to generate the token for.

    Generate token dialog with the Label and User fields highlighted
    Issue Templates for Jira - Generate token: label and user

  6. A token is generated for this user.

    Warning

    Make sure you copy and store the token, because it won’t be accessible later.

    Generate token dialog showing the new API token and a confirmation that it was copied to the clipboard
    Issue Templates for Jira - Generated API token copied to clipboard

Configuration - REST API

Follow these steps to use REST API (with Postman as an example). In this scenario a specific template will be applied to a specific issue.

  1. Select GET and paste the WebTrigger URL created earlier.

  2. Insert templateId and issueId.

    Info
    • issueId is the ID (for example, 48311) or the issue key (for example, TEM-123) of an issue that you want the template to be applied to.

    • templateId is the issue key of a template you want to use.

      You can use both issuekey and issueId parameters.

      Go to Atlassian documentation to find out how to check an issue ID.

    Postman GET request to the Web Trigger URL with templateId and issueId query parameters highlighted
    GET with query parameters applies a template without variables. To pass variables, use POST (see Use variables with REST API).

  3. Navigate to the Authorization tab.

  4. Paste the user token that you copied when it was created.

  5. Click Send.

    Postman Authorization tab with Bearer Token type, the token value, and the Send button highlighted
    Postman - Authorization tab with Bearer Token

Result

Status Meaning
200 Accepted
400 Bad request - wrong payload (body)
401 There is no token
403 Incorrect token/invalid license

Configuration - REST API in Jira Automation

You can use REST API with Jira Automation.

In this scenario you can apply a specific template to each new issue that is created. Follow the steps below:

  1. Create a new Automation rule and set When: Work item created.
  2. Select Then and choose Send web request.
  3. Enter your WebTrigger URL that was generated earlier in Issue Templates for Jira and add issueId={{issue.id}}&templateId=10032 at the end.
Example

https://11037d47-9c1c-48c5-91dc-17f8cd51d247.hello.atlassian-dev.net/x1/pXmIy_HsDH_yyTeDmhVajNamxtM?issueId={{issue.id}}&templateId=10032

  • issueId is the ID of an issue that you want the template to be applied to. You can use variables, so it is applied to any new issue or input a specific ID.

  • templateId is the issue key of a template you want to use.

    You can use both issuekey and issueId parameters.

    Go to Atlassian documentation to find out how to check an issue ID.

  1. Set the HTTP method to GET.
  2. Make sure your Web request body is Empty.
  3. As a key use Authorization and as a value use the user token that was generated earlier.
Jira Automation rule with Work item created trigger and Send web request action using GET, empty body, and Authorization header
Jira Automation - Send web request to the Web Trigger URL

Result

Whenever a new issue is created the automation rule will apply template with the ID 10032 to that issue.

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.

Example
{
    "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.

Use variables with REST API

To pass variables, send a POST request to your Web Trigger URL with a JSON body. In the variables object, each key is the name of a variable from a template.

Example
POST https://<app-id>.hello.atlassian-dev.net/x1/<trigger-id>
Authorization: Bearer <API token>
Content-Type: application/json
{
  "issueId": "TEM-11060",
  "templateId": "47967",
  "variables": {
    "Priority": "High",
    "Environment": ["staging", "production"],
    "Assignee": { "accountId": "5fe1b767332c3a0107660843" },
    "Reviewers": [
      { "accountId": "5ae1847f4b0cbc29b7b59a49" },
      { "accountId": "5fe1b767332c3a0107660843" }
    ]
  }
}

Body fields:

Field Type Required Description
issueId string Yes The ID ("48311") or the issue key ("TEM-123") of the issue that you want the template to be applied to. Always use quotes.
templateId string Yes The ID or the issue key of the template you want to use. Always use quotes.
variables object No Values for template variables. Each key is the name of a variable from the template.
Warning

Always put issueId and templateId values in quotes. An unquoted number (for example, "issueId": 48311) fails validation and the whole body is ignored without an error message.

Info
  • GET doesn’t support variables. If you send a body with a GET request, the body is ignored.
  • To send variables with POST, put issueId and templateId in the body, not in the query string.
  • Other request formats aren’t supported yet. We plan to add them in a future release.
  • The 200 response with {"success": true} confirms that the request was received. It doesn’t confirm that the body is valid. The template is applied asynchronously, usually within 10–20 seconds.

Allowed value types:

Type Example Usage
string “High” Single text value
string[] [“staging”, “production”] Multiple values (multi-select, labels)
{accountId} {“accountId”: “5fe1”} Single user
{accountId}[] Set of values above Multiple users
{label, value} {“label”: “High”, “value”: “1”} Option with a label and a value