Skip to main content

Register a user to a learning path

Depending on the learning path settings, users can register by themselves (only to the public trainings) or be assigned to the learning path by administrators or managers (to any training). In both cases the same mutation createLpIndividualMembership should be used.
If the learning path has Stripe integration enabled (i.e. has an associated Stripe product), enrollment behaves differently: the learner is automatically enrolled once their Stripe payment is completed, and anonymous user contexts can no longer self-enroll. See Enrollment access with Stripe for details.
In case if the user is being registered to a learning path not by themselves, the current API user should be associated with ADMINISTRATOR scope. See more about the user context scope here.
The mutation accepts the following arguments: As a result, CreateLpIndividualMembershipResponse object will be returned that contains the following properties: IndividualMembership object Below is an example of registering a user by passing their userContextUuid to the learning path with ID 40:

Unenroll a user from a learning path

In general, the unenrollment process follows the same rules and behavior as enrollment: a user can be unregistered from any previously enrolled learning path by themselves or by administrator. In both cases removeLpIndividualMembership mutation should be used. Mutation accepts the same arguments as createLpIndividualMembership. As a result, SuccessResponse object will be returned: Below is an example of mutation to unregister the current API user from the learning path with ID 40: