---
search:
  tags:
    - administration
    - PUT
seo:
  description: >-
    What this does: Completely replaces the permissions map… Reference for the
    PUT /administration/roles/{id}/permissions endpoint in the Leadtime Public
    API API.
sidebar:
  badge: PUT
  label: Replace role permissions
title: Replace role permissions
type: openapi-operation
---
**What this does:**
Completely replaces the permissions map for a custom role. This is a full replacement - all permissions must be specified in the request.

**Important restrictions:**
- Base roles cannot have their permissions modified
- Only custom roles can be updated
- All permissions must be provided (this is a complete replacement)

**Permission handling:**
- Permissions are automatically normalized (removed if false, kept if true)
- Permissions are validated against disallowed permissions for the role type
- Guest roles have restrictions on certain permissions
- Invalid permissions are rejected with error messages

**What must be provided:**
- permissions: Complete map of all permissions with boolean values
  - true: Permission is allowed
  - false: Permission is disallowed (will be removed from the map)

**Permission inheritance:**
- If the role has a parent, you can override inherited permissions
- Setting a permission to false explicitly disallows it (even if parent allows it)
- Setting a permission to true explicitly allows it (overrides parent if parent disallows)

**Use cases:**
- Bulk update all permissions for a role
- Copy permissions from another role by providing its complete permission map
- Reset role permissions to a known state
- Apply permission templates to roles

**Note:** For updating a single permission, use PATCH /roles/:id/permissions/:permissionKey instead.

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