---
title: "Update a custom role."
method: PUT
path: "/access-control/roles/{roleUID}"
tags: ["access_control", "enterprise"]
---

# Update a custom role.

`PUT /access-control/roles/{roleUID}`

You need to have a permission with action `roles:write` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.

## Path parameters

- `roleUID` string, required

## Request body

- UpdateRoleCommand
  - `description` string, required
  - `displayName` string, required
  - `global` boolean
  - `group` string, required
  - `hidden` boolean
  - `name` string
  - `permissions` Permission[]
    - `action` string
    - `created` string, date-time
    - `scope` string
    - `updated` string, date-time

## Response `200`

(empty)

- RoleDTO
  - `created` string, date-time, required
  - `delegatable` boolean
  - `description` string, required
  - `displayName` string, required
  - `global` boolean
  - `group` string, required
  - `hidden` boolean
  - `mapped` boolean
  - `name` string, required
  - `permissions` Permission[]
    - `action` string
    - `created` string, date-time
    - `scope` string
    - `updated` string, date-time
  - `uid` string, required
  - `updated` string, date-time, required
  - `version` integer, required

## Other responses

- `400` — BadRequestError is returned when the request is invalid and it cannot be processed.
- `403` — ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource.
- `404` — NotFoundError is returned when the requested resource was not found.
- `500` — InternalServerError is a general error indicating something went wrong internally.

---

[API](https://skmtc.net/grafana/apis/http-api.md) · [All operations](https://skmtc.net/grafana/apis/http-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/grafana/http-api/versions/df55ba1718ba/schema)
