Enroll User
enroll_userEnroll a user in a Canvas course with a chosen role, optional section, and enrollment state; returns the created enrollment object including its ID and state.
Instructions
Enroll a user in a course with a given role (StudentEnrollment, TeacherEnrollment, TaEnrollment, ObserverEnrollment, or DesignerEnrollment) and return the created enrollment object, including its id and enrollment_state. Use list_course_enrollments with a user_id filter to check a user's existing enrollments before enrolling them again, and remove_enrollment to conclude, deactivate, or permanently delete this enrollment afterward — enroll_user itself has no way to undo what it creates. Omitting enrollment_state leaves it at Canvas's documented default of "invited", so the user must accept a course invitation before the enrollment becomes active; pass enrollment_state: "active" to skip that step. Omitting course_section_id leaves Canvas to place the enrollment in the course's default section — read list_sections for the ID of a specific one. limit_privileges_to_course_section confines the user to that section: for teachers and TAs that includes grading privileges, and a section-limited student sees no user outside their own sections, teachers included. Both are left entirely unset when omitted, so the request is unchanged from a call that does not pass them. Requires permission to manage enrollments in the course; Canvas rejects the call otherwise.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| type | Yes | The enrollment type | |
| user_id | Yes | The Canvas user ID to enroll | |
| course_id | Yes | The Canvas course ID | |
| enrollment_state | No | Initial enrollment state (defaults to invited) | |
| course_section_id | No | The section to enroll the user into (from `list_sections`); omitted = the course's default section | |
| limit_privileges_to_course_section | No | Restrict the user to seeing and interacting with users in course_section_id only |