Assign a role to a user (admin)
PUT /auth/users/{ref}/role
PUT
/auth/users/{ref}/role
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” ref
required
integer format: int64
Request Body required
Section titled “Request Body required ”object
role_id
required
string format: uuid
Responses
Section titled “ Responses ”Role assigned
Role change refused — would leave the system with
zero users holding system.admin (last-admin
invariant guard). Grant the capability to another
user first.
object
error
required
Human-readable error summary
string
Example
the request could not be completedAuthentication required, missing, or invalid
object
error
required
Human-readable error summary
string
Example
the request could not be completedExample
{ "error": "authentication required: sign in and retry with a valid session or API token"}Authenticated but missing required capabilities
object
error
required
Human-readable error summary
string
Example
the request could not be completedResource not found
object
error
required
Human-readable error summary
string
Example
the request could not be completed