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 "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.

Examples:

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

Request

Responses

Enrolls saved successfully