---
title: "Update a role"
method: PATCH
path: "/authorization/roles/{roleId}"
tags: ["Authorization"]
---

# Update a role

`PATCH /authorization/roles/{roleId}`

## Request

- Base URL: `https://example.itential.io`
- URL: `https://example.itential.io/authorization/roles/{roleId}`
- Auth: none declared

Updates a role.

## Path parameters

- `roleId` string, required

## Request body

- object
  - `updates` AuthorizationRolesRoleIdPatchRequestBodyContentApplicationJsonSchemaUpdates
    - `description` string
    - `allowedMethods` IapRolesSchemaAllowedMethodsItems[]
      - `name` string
      - `provenance` string
    - `allowedViews` IapRolesSchemaAllowedViewsItems[]
      - `path` string
      - `provenance` string

## Response `200`

The output of the role update.

- AuthorizationUpdateRoleResponse200
  - `status` 'OK' | 'Created': The status of the API request.
  - `message` string: Message containing either confirmation of the operation or the reason for the failure of the operation.
  - `data` IapRolesSchema: This is the schema for an IAP role stored in Mongo
    - `provenance` string, required
    - `name` string, required
    - `description` string, required
    - `allowedMethods` IapRolesSchemaAllowedMethodsItems[], required
      - `name` string
      - `provenance` string
    - `allowedViews` IapRolesSchemaAllowedViewsItems[], required
      - `path` string
      - `provenance` string
    - `_meta` IapRolesSchemaMeta
      - `created` string
      - `updated` string

## Other responses

- `500`: Error response from API

---

[API](https://skmtc.dev/itential/apis/itential-2.md) - [All operations](https://skmtc.dev/itential/apis/itential-2/llms.txt) - [OpenAPI document](https://skmtc.dev/itential/apis/itential-2/revisions/2095cc90e583?raw)
