---
ai:
  exclude: true
search:
  tags:
    - applicationrole
    - PUT
seo:
  description: >-
    Updates the ApplicationRoles with the passed data… Reference for the PUT
    /api/2/applicationrole endpoint in the Jira Software Data Center REST API
    Reference.
sidebar:
  label: Update application roles
  badge: PUT
title: Update application roles
type: openapi-operation
---
Updates the ApplicationRoles with the passed data if the version hash is the same as the server. 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. It is acceptable to pass only the roles that are updated as roles that are present in the server but not in data to update with, will not be deleted.

`PUT /api/2/applicationrole`

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

the data to update the roles 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 ApplicationRoles 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"
}
```
