Skip to main content

Save Enrolls

PUT 

/user-svc/enrolls

Enroll a list of users by contact or user Id to acquire a role. Works on future or current users.

A user can only enroll an other user to a role if the user "owns" that role. A user who owns a role can enroll others in that roll in any app. The same request might contain enrolls for different apps.

A user "owns" a role in the following cases:

  • A static role where the role ID is prefixed with the caller's slug.
  • Any dynamic or static role where the caller is an admin (has *:admin postfix of that role).

Examples:

  • A user with the slug joe-doe owns roles like joe-doe:* such as joe-doe:any-custom-role.
  • A user with any slug who has the role my-service:admin owns my-service:* roles such as my-service:user.
  • A user with any slug who has the role user-svc:org:{%orgId}:admin owns user-svc:org:{%orgId}:* such as user-svc:org:{%orgId}:user.

Request

Responses

Enrolls saved successfully