---
ai:
  exclude: true
search:
  tags:
    - applicationrole
    - PUT
seo:
  description: >-
    Updates the ApplicationRole with the passed… Reference for the PUT
    /api/2/applicationrole/{key} endpoint in the Jira Software Data Center REST
    API Reference.
sidebar:
  label: Update application role
  badge: PUT
title: Update application role
type: openapi-operation
---
Updates the ApplicationRole with the passed data. Only the groups and default groups setting of the role may be updated. Requests to change the key or the name of the role will be silently ignored.

`PUT /api/2/applicationrole/{key}`

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

the data to update the role with.

- `defaultGroups` (string[])
- `defined` (boolean)
- `groups` (string[])
- `hasUnlimitedSeats` (boolean)
- `key` (string)
- `name` (string)
- `numberOfSeats` (integer<int32>)
- `platform` (boolean)
- `remainingSeats` (integer<int32>)
- `selectedByDefault` (boolean)
- `userCount` (integer<int32>)
- `userCountDescription` (string)

Request body example:

```json
{
  "defaultGroups": [
    "jira-software-users"
  ],
  "defined": false,
  "groups": [
    "jira-software-users",
    "jira-testers"
  ],
  "hasUnlimitedSeats": false,
  "key": "jira-software",
  "name": "Jira Software",
  "numberOfSeats": 10,
  "platform": false,
  "remainingSeats": 5,
  "selectedByDefault": false,
  "userCount": 5,
  "userCountDescription": "5 developers"
}
```

**Responses**

- `200` — Returns the updated ApplicationRole if the update was successful.
- `401` — Returned if the current user does not have permission to edit roles.
- `403` — Returned if the current user is not an administrator.
- `404` — Returned if the role does not exist.
- `412` — Returned if the versionHash is not null and contains a different version to the server.

Response example, 200:

```json
{
  "defaultGroups": [
    "jira-software-users"
  ],
  "defined": false,
  "groups": [
    "jira-software-users",
    "jira-testers"
  ],
  "hasUnlimitedSeats": false,
  "key": "jira-software",
  "name": "Jira Software",
  "numberOfSeats": 10,
  "platform": false,
  "remainingSeats": 5,
  "selectedByDefault": false,
  "userCount": 5,
  "userCountDescription": "5 developers"
}
```
