---
title: "Delete a custom instance role"
method: DELETE
path: "/admin/roles/{roleId}"
tags: ["Admin"]
---

# Delete a custom instance role

`DELETE /admin/roles/{roleId}`

## Request

- Base URL: `https://cloud.kaneo.app/api`
- URL: `https://cloud.kaneo.app/api/admin/roles/{roleId}`
- Auth: HTTP bearer

Delete a role that no user has. Requires the `roles:manage` permission; API keys are rejected.

## Path parameters

- `roleId` string, required

## Response `200`

The deleted role

- DeletedInstanceRole
  - `id` string, required

## Other responses

- `401`: Missing or invalid credentials
- `403`: The caller lacks the instance permission or used an API key
- `404`: Role not found
- `409`: Users still have this role (code ROLE_IN_USE)
- `429`: The API key exceeded its rate limit or usage quota. Wait the number of seconds in Retry-After before retrying. The X-RateLimit headers are sent only when the rate limit was hit.

## Changes

- **2026-10-27** `8f3ec578c70a`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/usekaneo/apis/kaneo-api/changes/admin/roles/:roleId/delete.md)

---

[API](https://skmtc.dev/usekaneo/apis/kaneo-api.md) - [All operations](https://skmtc.dev/usekaneo/apis/kaneo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/usekaneo/apis/kaneo-api/revisions/741a49dfb347?raw)
