--- title: "API: unenrollLearningModules" slug: "api-unenrolllearningmodules" updated: 2022-08-31T17:52:48Z published: 2022-08-31T17:52:48Z canonical: "support.smarteru.com/api-unenrolllearningmodules" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.smarteru.com/llms.txt > Use this file to discover all available pages before exploring further. # API: unenrollLearningModules - Starting June 1, 2022, SmarterU will require all API calls to POST to HTTPS. Any POST to HTTP will result in the SU:01 error (i.e., No POST data detected.). - If you are viewing the help in a language other than English, please change your language to English before copying and pasting any code. All API attributes and functions are in English. - Tags are required unless specified. ## Description The unenrollLearningModules method does a [batch unenroll](/v1/docs/enrollment-report-unenrolling-learners#performing-a-batch-unenroll). ## Who Has Access [Administrators or owners](/v1/docs/user-profile-information#access-level) have access to the unenrollLearningModules method. ## API Call XML Package ```markup unenrollLearningModules ``` ## ## LearningModuleEnrollment Tag Group The LearningModuleEnrollment tag group is a container for the course unenrollments. ```markup ``` The LearningModuleEnrollment tag may contain the following. ### Unenrollment A container for a course unenrollment. Refer to [Unenrollment Tag Group](/v1/docs/api-unenrolllearningmodules#unenrollment-tag-group). ## Unenrollment Tag Group The Unenrollment tag group is a container for a course unenrollment. ```markup ``` Each course unenrollment is contained in an Unenrollment tag and may contain the following. The unenrollLearningModules method supports up to 100 unenrollments per call. ### AccountUserLearningModuleRelID The course enrollment's system-generated identifier. This is the AccountUserLearningModuleRelID value returned by [enrollLearningModules](/v1/docs/api-enrolllearningmodules), and the ID value returned by [getLearnerReport](/v1/docs/api-getlearnerreport). ## **API Response XML Package** The [API response XML package](/v1/docs/api-response-xml-package) will always include a Result, Info, and [Errors](/v1/docs/api-unenrolllearningmodules#error-codes) tag. ```markup ``` The Unenrollments tag is a container for the course unenrollments processed by the unenrollLearningModules method. Each course unenrollment is contained in an Unenrollment tag and may contain the following. ### **AccountUserLearningModuleRelID** The course enrollment's system-generated identifier. Because this method can be used to perform multiple unenrollments, be sure to check the [Errors tag for error codes](/v1/docs/api-unenrolllearningmodules#error-codes). It's possible for the Result tag to return *Success* even when errors are returned. ### Example API Response XML Package Below is an example of an API response XML package. ```markup Failed 17335503 ULM:03 Unenrollment 1 - The AccountUserLearningModuleRelID provided is not valid. ``` ## **Error Codes** | Error Code | Message | | --- | --- | | ULM:01 | AccountUserLearningModuleRelID provided is not valid. | | ULM:02 | The required permissions are not met to call the unenrollLearningModules method. | | ULM:03 | Unenrollment %blocknum% - The AccountUserLearningModuleRelID provided is not valid. | | ULM:04 | Unenrollment %blocknum% - The AccountUserLearningModuleRelID provided is already in the unenrollment queue. | | ULM:05 | Unenrollment %blocknum% - The AccountUserLearningModuleRelID provided is a duplicate of the AccountUserLearningModuleRelID from Unenrollment %blocknum%. | ## Related - [API: enrollLearningModules](/api-enrolllearningmodules.md) - [API: getLearnerReport](/api-getlearnerreport.md) - [Enrollment Report: Unenrolling Learners](/enrollment-report-unenrolling-learners.md) - [Unenrolling Users from Courses](/unenrolling-users-from-courses.md)