User Roles

Route Capability Description
Attach role
POST /users/:user_id/roles
users.roles-attach Attach a role to a user for your organization
Detach role
DELETE /users/:user_id/roles
users.roles-detach Detach a role from a user for your organization

Attach role

 POST /users/:user_id/roles 

Attach a role to a user for your organization or suborganization.
You can only use your own (sub)organizations.
You can add maximum 1 role for each user in an organization, a user can belong to multiple organizations.

Request attributes

Field Type Information
role_id

integer

required, must be a valid role_id and must be active
organization_id integer required, must be a valid organization_id and must be active.

Sample Request

{
	"organization_id":1,
	"role_id":1
}

Detach role

 DELETE /users/:user_id/roles 

Detach a role from a user for your organization or suborganization.
You can only use your own (sub)organizations.

Request attributes

Field Type Information
organization_id integer required, must be a valid organization_id and must be active.

Sample Request

{
	"organization_id":1,
}