Update User Role

Allowed Scopes: experimental:user:role:manage

Make a user of the company the token resolves to a requester or a controller in that company: the user gets that role and loses the other one. Only users whose roles in the company are requester and/or controller can be changed, and never the user the token acts on behalf of, so the admin and accountOwner roles are never granted or removed. Companies whose users are managed by an HRIS integration are refused.

Send the user's roles as you last read them (roles on the user) in currentRoles: the change is only applied if they still are the user's roles. Otherwise, because the roles were changed in the meantime, 409 is returned and nothing changes: read the user again and decide whether to retry. Asking for the role the user already has changes nothing.

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

ID of the user to update.

Body Params
string
enum
required

The role the user gets in the company.

Allowed:
currentRoles
array of strings
required

The user's roles in the company, as you last read them.

currentRoles*
Allowed:
Headers
string

ID of the company the request acts on. Required with an organisation-level token; not needed with a company-level token.

Responses

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