---
title: "Update role permissions on asset"
method: PUT
path: "/api/v1/permissions/role/{roleId}/asset/{assetId}"
tags: ["Permissions"]
---

# Update role permissions on asset

`PUT /api/v1/permissions/role/{roleId}/asset/{assetId}`

## Request

- Base URL: `https://jostens.com`
- URL: `https://jostens.com/api/v1/permissions/role/{roleId}/asset/{assetId}`
- Auth: none declared

Updates permissions for a specific role on a host or folder. Automatically breaks permission inheritance if the asset currently inherits. Only admin users can access this endpoint. Omitting a scope preserves existing permissions; empty array removes permissions.

## Path parameters

- `roleId` string, required
- `assetId` string, required

## Query parameters

- `cascade` boolean

## Request body

- UpdateRolePermissionsForm
  - `permissions` object, required: Permission assignments by scope (INDIVIDUAL, HOST, FOLDER, CONTENT, etc.) with permission levels (READ, WRITE, PUBLISH, EDIT_PERMISSIONS, CAN_ADD_CHILDREN). Omitting a scope preserves existing permissions. Empty array [] removes permissions for that scope.

## Response `200`

Permissions updated successfully

- ResponseEntityUpdateRolePermissionsView
  - `errors` ErrorEntity[]
    - `errorCode` string
    - `message` string
    - `fieldName` string
  - `entity` UpdateRolePermissionsView
    - `roleId` string, required: Role identifier
    - `roleName` string, required: Role name
    - `asset` RolePermissionAssetView, required: The updated asset with new permission assignments for this role
      - `id` string, required: Asset identifier (host identifier for HOST type, folder inode for FOLDER type)
      - `type` 'HOST' | 'FOLDER', required: Asset type
      - `name` string, required: Asset name (hostname for HOST, folder name for FOLDER)
      - `path` string, required: Full path to the asset
      - `hostId` string, required: Host identifier (same as id for HOST type, parent host for FOLDER type)
      - `canEditPermissions` boolean, required: Whether the requesting user can edit permissions on this asset
      - `inheritsPermissions` boolean, required: Whether this asset inherits permissions from its parent
      - `permissions` object, required: Map of permission scopes (INDIVIDUAL, CONTENT, FOLDER, HOST, etc.) to lists of permission level names (READ, WRITE, PUBLISH, EDIT_PERMISSIONS, CAN_ADD_CHILDREN)
        - `empty` boolean
  - `messages` MessageEntity[]
    - `message` string
  - `i18nMessagesMap` object
  - `permissions` string[]
  - `pagination` Pagination
    - `currentPage` integer
    - `perPage` integer
    - `totalEntries` integer

## Other responses

- `400`: Bad request - invalid permission level or scope
- `401`: Unauthorized - authentication required
- `403`: Forbidden - user lacks EDIT_PERMISSIONS on asset or is not admin
- `404`: Role or asset not found
- `500`: Failed to update permissions

---

[API](https://skmtc.dev/jostens/apis/dotcms-rest-api.md) - [All operations](https://skmtc.dev/jostens/apis/dotcms-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/jostens/apis/dotcms-rest-api/revisions/63810c01a4c9?raw)
