---
ai:
  exclude: true
search:
  tags:
    - epic
    - PUT
seo:
  description: >-
    Moves (ranks) an epic before or after… Reference for the PUT
    /agile/1.0/epic/{epicIdOrKey}/rank endpoint in the Jira Software Data Center
    REST API Reference.
sidebar:
  label: Rank an epic relative to another
  badge: PUT
title: Rank an epic relative to another
type: openapi-operation
---
Moves (ranks) an epic before or after a given epic. If rankCustomFieldId is not defined, the default rank field will be used.

`PUT /agile/1.0/epic/{epicIdOrKey}/rank`

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

Bean which contains the information where the given epic should be ranked.

- `rankAfterEpic` (string)
- `rankBeforeEpic` (string)
- `rankCustomFieldId` (integer<int64>)

Request body example:

```json
{
  "rankAfterEpic": "10001",
  "rankBeforeEpic": "10000",
  "rankCustomFieldId": 10521
}
```

**Responses**

- `204` — Empty response is returned if operation was successful.
- `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. To rank issues user have to have schedule issue permission for epics that they want to rank.
- `404` — Returned when the given epics in the path parameter or the request body do not exist.
