---
search:
  tags:
    - administration
    - DELETE
seo:
  description: >-
    What this does: Soft deletes a custom role from the workspace.… Reference
    for the DELETE /administration/roles/{id} endpoint in the Leadtime Public
    API API.
sidebar:
  badge: DELETE
  label: Delete role
title: Delete role
type: openapi-operation
---
**What this does:**
Soft deletes a custom role from the workspace. The role is marked as deleted but not permanently removed from the database.

**Important restrictions:**
- Base roles (Root, CEO, Team Leader, Staff, Guest) cannot be deleted
- Only custom roles created by users can be deleted
- Attempting to delete a base role will return an error

**What happens to users:**
- All users currently assigned to this role are automatically reassigned to the default Staff role
- This ensures no users are left without a valid role assignment
- The reassignment happens automatically and cannot be prevented

**What happens to child roles:**
- If other roles inherit from this role (have this role as parentId), they will need to be updated separately
- Child roles are not automatically updated when parent is deleted
- You should update child roles before deleting the parent, or reassign them to a different parent

**Use cases:**
- Remove obsolete roles that are no longer needed
- Clean up test roles created during development
- Consolidate roles by removing redundant ones
- Archive roles that are temporarily not in use

**Note:** This is a soft delete - the role can potentially be restored if needed (depending on your data retention policies).

<Operation source="api-reference" id="rolescontroller-deleterole" />
