Skip to main content

Update role

PUT 

/v1/roles-with-permissions/:roleId

Update role

This endpoint allows updating a role's details and associated permissions within the system. It accepts a roleId as a path parameter and a JSON payload containing the new role details and permissions. The operation validates the input, checks for role existence, ensures uniqueness of permissions, and updates the database accordingly. Successful updates return a 204 No Content status; errors may result in 400 Bad Request (for duplicate permissions), 404 Not Found (if the role or permissions don't exist), or 500 Internal Server Error.

Request

Path Parameters

    role_id stringrequired

    Role id

    roleId uuidrequired

Body

required
    daily_limit int32nullable
    monthly_limit int32nullable
    name stringrequired
    permissions uuid[]required
    single_tx_limit int32nullable
    wallet_id uuidrequired

Responses

Role and its permissions updated

Loading...