# Assign Role

Assign Role; User ID, Role ID

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

About

This endpoint modifies a user’s permissions by assigning a new role. It updates the role of a specific user by user ID. The new role ID must be provided in the request body.

Example

curl -X PUT "https://api.picussecurity.com/v1/users/12345/role" \
  -H "Access-Token: YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "role_id": 2
  }'
{
  "success": true
}

Path Parameters

  • userId (required, uint): ID of the user whose role will be changed
Path Params
uint64
required

User ID whose role will be updated

Body Params
uint64
required

Role ID to assign to the user

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json