---
ai:
  exclude: true
search:
  tags:
    - issue
    - POST
seo:
  description: >-
    Perform a transition on an… Reference for the POST
    /api/2/issue/{issueIdOrKey}/transitions endpoint in the Jira Software Data
    Center REST API Reference.
sidebar:
  label: Perform a transition on an issue
  badge: POST
title: Perform a transition on an issue
type: openapi-operation
---
Perform a transition on an issue.
When performing the transition you can update or set other issue fields.
The fields that can be set on transition, in either the fields parameter or the update parameter can be determined using the /rest/api/2/issue/&#123;issueIdOrKey&#125;/transitions?expand=transitions.fields resource.
If a field is not configured to appear on the transition screen, then it will not be in the transition metadata, and a field validation error will occur if it is submitted.
The updateHistory param adds the issues retrieved by this method to the current user's issue history, if set to true (by default, the issue history does not include issues retrieved via the REST API).
You can view the issue history in the Jira application, via the Issues dropdown or by using the lastViewed JQL field in an issue search.

`POST /api/2/issue/{issueIdOrKey}/transitions`

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

Issue update bean

- `fields` (object)
- `historyMetadata` (HistoryMetadata)
- `properties` (EntityPropertyBean[])
- `transition` (TransitionBean)
- `update` (object)

Request body example:

```json
{
  "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**

- `204` — Returns a response indicating the result of the transition operation.
- `400` — Returned if the transition is not valid for the issue, or the user does not have permission to transition the issue.
- `404` — Returned if the issue does not exist.
- `500` — If transition ID is incorrect.
