---
ai:
  exclude: true
search:
  tags:
    - issue
    - PUT
seo:
  description: >-
    Moves (ranks) issues before or after a given issue.… Reference for the PUT
    /agile/1.0/issue/rank endpoint in the Jira Software Data Center REST API
    Reference.
sidebar:
  label: Rank issues before or after a given issue
  badge: PUT
title: Rank issues before or after a given issue
type: openapi-operation
---
Moves (ranks) issues before or after a given issue. At most 50 issues may be ranked at once. This operation may fail for some issues, although this will be rare. In that case the 207 status code is returned for the whole response and detailed information regarding each issue is available in the response body. If rankCustomFieldId is not defined, the default rank field will be used.

`PUT /agile/1.0/issue/rank`

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

Bean which contains list of issues to rank and information where it should be ranked.

- `issues` (string[])
- `rankAfterIssue` (string)
- `rankBeforeIssue` (string)
- `rankCustomFieldId` (integer<int64>)

Request body example:

```json
{
  "issues": [
    "PR-1",
    "10001",
    "PR-3"
  ],
  "rankAfterIssue": "PR-4",
  "rankBeforeIssue": "PR-4",
  "rankCustomFieldId": 10521
}
```

**Responses**

- `204` — Empty response is returned if operation was successful.
- `207` — Returns the list of issue with status of rank operation.
- `400` — Returned if the request is invalid.
- `401` — Returned if the user is not logged in.
- `403` — Returned if user does not a have valid license or does not have permission to rank.
