---
ai:
  exclude: true
search:
  tags:
    - role
    - POST
seo:
  description: >-
    Partially updates a roles name or description. Reference for the POST
    /api/2/role/{id} endpoint in the Jira Software Data Center REST API
    Reference.
sidebar:
  label: Partially updates a role's name or description
  badge: POST
title: Partially updates a role's name or description
type: openapi-operation
---
Partially updates a roles name or description.

`POST /api/2/role/{id}`

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

- `description` (string)
- `name` (string)

Request body example:

```json
{
  "description": "role description",
  "name": "MyRole"
}
```

**Responses**

- `200` — Returns updated role.
- `400` — Returned when both name and description are not given or name field is invalid (empty or starts or ends with whitespace).
- `401` — Returned if the requesting user is not logged in.
- `403` — Returned if the requesting user is not an admin or a sysadmin.
- `404` — Returned if the role with the given id does not exist.

Response example, 200:

```json
{
  "actors": [
    {
      "name": "jira-developers"
    }
  ],
  "description": "A project role that represents developers in a project",
  "id": 10360,
  "name": "Developers",
  "self": "http://www.example.com/jira/rest/api/2/project/MKY/role/10360"
}
```
