This document explains how to delete a role via the /api/role/delete endpoint. ⚠️ Ensure you have proper authorization before performing this action.

Request Method

  • HTTP Method: DELETE
  • Path: /api/role/delete/{roleId}
  • Description: Removes a specified role from the system. The {roleId} parameter is required and represents the unique identifier of the role.

Parameters

Name Type Required Description
roleId string ✅ Yes The ID of the role to be deleted.

Example Request

DELETE /api/role/delete/12345 HTTP/1.1
Host: yourdomain.com
Authorization: Bearer <token>

Response Format

  • Success (200): {"status": "success", "message": "Role deleted successfully."}
  • Error (404): {"error": "Role not found."}

Notes

  • ⚠️ Deleting a role may affect associated users or permissions. Always verify dependencies before deletion.
  • 📚 For more details on role management, see Documentation/en/Manage/Role/Manage.
role_deletion_flow