---
ai:
  exclude: true
search:
  tags:
    - issue
    - POST
seo:
  description: >-
    Creates issues or sub-tasks from a JSON… Reference for the POST
    /api/2/issue/bulk endpoint in the Jira Software Data Center REST API
    Reference.
sidebar:
  label: Create an issue or sub-task from json - bulk operation.
  badge: POST
title: Create an issue or sub-task from json - bulk operation.
type: openapi-operation
---
Creates issues or sub-tasks from a JSON representation. Creates many issues in one bulk operation.
Creating a sub-task is similar to creating a regular issue. More details can be found in createIssue section.

`POST /api/2/issue/bulk`

**Request body** (`application/json`)

Issues update bean

- `issueUpdates` (IssueUpdateBean[])

Request body example:

```json
{
  "issueUpdates": [
    {
      "fields": "{\n\"assignee\": {\n    \"name\": \"bob\"\n},\n\"resolution\": {\n    \"name\": \"Fixed\"\n}",
      "historyMetadata": {
        "activityDescription": "text description",
        "activityDescriptionKey": "plugin.activity.i18.key",
        "actor": {
          "avatarUrl": "http://mysystem.com/avatar/tony.jpg",
          "displayName": "Tony",
          "displayNameKey": "tony",
          "id": "tony",
          "type": "mysystem-user",
          "url": "http://mysystem.com/user/tony"
        },
        "cause": {
          "avatarUrl": "http://mysystem.com/avatar/tony.jpg",
          "displayName": "Tony",
          "displayNameKey": "tony",
          "id": "tony",
          "type": "mysystem-user",
          "url": "http://mysystem.com/user/tony"
        },
        "description": "The issue was created.",
        "descriptionKey": "plugin.changereason.i18.key",
        "emailDescription": "email description",
        "emailDescriptionKey": "plugin.email.i18.key",
        "extraData": {
          "keyvalue": "extra data",
          "goes": "here"
        },
        "generator": {
          "avatarUrl": "http://mysystem.com/avatar/tony.jpg",
          "displayName": "Tony",
          "displayNameKey": "tony",
          "id": "tony",
          "type": "mysystem-user",
          "url": "http://mysystem.com/user/tony"
        },
        "type": "myplugin:type"
      },
      "properties": [
        {
          "key": "issue.support",
          "value": "{\"hipchat.room.id\":\"support-123\",\"support.time\":\"1m\"}"
        }
      ],
      "transition": {
        "description": "Close the issue.",
        "fields": {
          "property1": {
            "allowedValues": [
              "red",
              "blue",
              "default value"
            ],
            "autoCompleteUrl": "/rest/api/2/customFieldOption/10000",
            "defaultValue": {},
            "fieldId": "customfield_10000",
            "hasDefaultValue": true,
            "name": "My Multi Select",
            "operations": [
              "set",
              "add"
            ],
            "required": true,
            "schema": {}
          },
          "property2": {
            "allowedValues": [
              "red",
              "blue",
              "default value"
            ],
            "autoCompleteUrl": "/rest/api/2/customFieldOption/10000",
            "defaultValue": {},
            "fieldId": "customfield_10000",
            "hasDefaultValue": true,
            "name": "My Multi Select",
            "operations": [
              "set",
              "add"
            ],
            "required": true,
            "schema": {}
          }
        },
        "id": "2",
        "name": "Close Issue",
        "opsbarSequence": 10,
        "to": {
          "description": "The issue is currently being worked on.",
          "iconUrl": "http://localhost:8090/jira/images/icons/progress.gif",
          "id": "10000",
          "name": "In Progress",
          "self": "http://localhost:8090/jira/rest/api/2.0/status/10000",
          "statusCategory": {
            "colorName": "blue-gray",
            "id": 1,
            "key": "new",
            "name": "To Do",
            "self": "http://localhost:8090/jira/rest/api/2.0/statuscategory/1"
          },
          "statusColor": "green"
        }
      },
      "update": "\"comment\": [\n    {\n        \"add\": {\n            \"body\": \"Bug has been fixed.\"\n        }\n    }\n]"
    }
  ]
}
```

**Responses**

- `201` — Returns a link to the created issues.
- `400` — Returned if the input is invalid (e.g. missing required fields, invalid field values, and so forth).

Response example, 201:

```json
{
  "errors": [
    {
      "elementErrors": {
        "errorMessages": [
          "string"
        ],
        "errors": {
          "property1": "string",
          "property2": "string"
        }
      },
      "failedElementNumber": 0,
      "status": 0
    }
  ],
  "issues": [
    {
      "id": "string",
      "key": "string",
      "self": "string"
    }
  ]
}
```
