---
title: "Delete role and reassign users"
method: DELETE
path: "/api/v1/roles/{role_name}"
tags: ["Roles"]
---

# Delete role and reassign users

`DELETE /api/v1/roles/{role_name}`

Permanently removes a role from the environment and reassigns users who had that role to a different role. Use this endpoint when you need to clean up unused roles or restructure your access control system. The role cannot be deleted if it has dependent roles (roles that extend it) unless you specify a replacement role. If users are assigned to the role being deleted, you must provide a reassign_role_name to move those users to a different role before deletion can proceed. This action cannot be undone, so ensure no critical users depend on the role before deletion.

## Path parameters

- `role_name` string, required

## Query parameters

- `reassign_role_id` string
- `reassign_role_name` string

## Response `200`

Role successfully deleted and users reassigned. No content returned.

- unknown

---

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