---
title: "Permanently delete a role"
method: DELETE
path: "/roles/{roleId}"
tags: ["Role"]
---

# Permanently delete a role

`DELETE /roles/{roleId}`

Deletes the role identified by `roleId` under the tenant specified by the required `tenant-id` header. Use this to remove a role that is no longer needed; the role must exist at the time of the call. Returns 204 with no response body on success. Returns 400 if the `tenant-id` header is absent or blank. Note: if the role does not exist, the current implementation returns 500 rather than 404 (tracked in CP-36405); verify the ID via `GET /roles`.

## Path parameters

- `roleId` string, required

## Headers

- `tenant-id` string

## Response `204`

Role deleted successfully

## Other responses

- `400` — Bad request - Invalid request parameters or missing required headers
- `401` — Authentication required - Valid authentication token is missing or invalid
- `403` — Forbidden - User does not have the required permissions to delete roles
- `500` — Internal server error - An unexpected error occurred while processing the request. No response body is returned. Note: a non-existent role ID currently also surfaces here as a 500 rather than a 404, since not-found conditions are not distinguished from other failures (tracked in CP-36405).

---

[API](https://skmtc.net/certifyos/apis/certify-api-layer.md) · [All operations](https://skmtc.net/certifyos/apis/certify-api-layer/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/certifyos/certify-api-layer/revisions/563848e0ecc0/schema)
