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

# Delete a custom role.

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

Delete a role with the given UID, and it’s permissions. If the role is assigned to a built-in role, the deletion operation will fail, unless force query param is set to true, and in that case all assignments will also be deleted.

You need to have a permission with action `roles:delete` and scope `permissions:type:delegate`. `permissions:type:delegate` scope ensures that users can only delete a custom role with the same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to delete a custom role which allows to do that.

## Path parameters

- `roleUID` string, required

## Query parameters

- `force` boolean
- `global` boolean

## Response `200`

An OKResponse is returned if the request was successful.

- SuccessResponseBody
  - `message` string

## 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.
- `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)
