Skip to main content
POST
Replace all existing permissions for a role with a new set of permissions. This operation will remove any existing permissions and set only the provided ones. Requires Super Admin or HR Manager permissions.
This endpoint replaces ALL existing permissions. Any permissions not included in the request will be removed.

Path Parameters

string
required
The unique identifier of the role (UUID format)Example: "550e8400-e29b-41d4-a716-446655440000"

Request Body

The request body should be an array of permission objects.
string
required
The action that can be performed (e.g., “read”, “write”, “delete”)Example: "read"
string
required
The resource the permission applies to (e.g., “employees”, “departments”)Example: "employees"
object
Optional conditions that must be met for the permission to applyExample: {"department": "engineering"}

Response

boolean
Indicates if the request was successful
object
The updated role object with new permissions