Skip to main content
POST
/
api
/
v1
/
shared
/
users
/
role
/
bulk
Bulk Update User Roles
curl --request POST \
  --url https://api.example.com/api/v1/shared/users/role/bulk \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "userIds": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ],
  "role": "<string>"
}
'
{
  "results": [
    {
      "userId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "status": "<string>",
      "error": "<string>"
    }
  ],
  "successCount": 123,
  "failedCount": 123
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Payload for changing many users' roles to the same target role.

userIds
string<uuid>[]
required
role
string
required

Response

Successful Response

Response for the bulk role-update endpoint.

results
BulkRoleUpdateItemDTO · object[]
required
successCount
integer
required
failedCount
integer
required