---
search:
  tags:
    - administration
    - PUT
seo:
  description: >-
    What this does: Completely replaces a custom role with new data. All…
    Reference for the PUT /administration/roles/{id} endpoint in the Leadtime
    Public API API.
sidebar:
  badge: PUT
  label: Update role
title: Update role
type: openapi-operation
---
**What this does:**
Completely replaces a custom role with new data. All fields must be provided - this is a full replacement, not a partial update.

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

**What must be provided:**
- name: Role display name
- icon: Icon identifier
- type: Role type (normal or guest)
- description: Role description (can be empty string)
- parentId: Parent role ID (can be undefined)
- permissions: Complete permission map (all permissions must be specified)

**Permission validation:**
- All permissions are validated against disallowed permissions for the role type
- Guest roles cannot have certain permissions (e.g., workspace administration)
- Invalid permission combinations are rejected

**Use cases:**
- Completely redesign a role's permissions and properties
- Migrate a role from one parent to another
- Update role metadata (name, description, icon) along with permissions

**Note:** For partial updates, use PATCH /roles/:id instead.

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