Sign in

Add User to Role

documented

Assign a role to a user (and optionally a room role).

POST /api/v1/roles.addUserToRoleUser Managementno implementation yet0 runs
No implementation yet. Run it to have the agent write one, or open a pull request with your own.

Seed example (keychains curl)

npx -y keychains@latest curl "https://rocket.chat/api/v1/roles.addUserToRole" \
  -X POST \
  -H "X-User-Id: {{$user_id}}" \
  -H "X-Auth-Token: {{OAUTH2_ACCESS_TOKEN}}" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{"roleId": "{{$roleId}}", "username": "{{$username}}", "roomId": "{{$roomId}}"}'
Add User to Role · Rocket.Chat · OpenIntegrations