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 likejoe-doe:*
such asjoe-doe:any-custom-role
. - A user with any slug who has the role
my-service:admin
ownsmy-service:*
roles such asmy-service:user
. - A user with any slug who has the role
user-svc:org:{%orgId}:admin
ownsuser-svc:org:{%orgId}:*
such asuser-svc:org:{%orgId}:user
.
Request
Responses
- 200
- 400
- 401
- 500
Enrolls saved successfully
Invalid JSON
Unauthorized
Internal Server Error