Send GET /api/v1/courses/<course_id>/enrollments?per_page=100 with your Bearer token
Handle pagination by following the 'next' Link header until exhausted
Filter the returned enrollment objects by the 'type' field (StudentEnrollment, TeacherEnrollment, etc.) as needed
To add an enrollment, POST to /api/v1/courses/<course_id>/enrollments with a JSON body containing enrollment[user_id], enrollment[type], and enrollment[enrollment_state]
To remove an enrollment, send DELETE /api/v1/courses/<course_id>/enrollments/<enrollment_id> with the task parameter set to 'delete' or 'conclude'
Known gotchas
Concluded enrollments are returned by default; use ?state[]=active to limit results to active enrollments only
The user must already exist in Canvas before you can enroll them; create the user first via POST /api/v1/accounts/<account_id>/users if needed
Bulk-enrolling more than a few hundred users in rapid succession can trigger Canvas rate limiting; add retry logic with exponential backoff on HTTP 403 or 429 responses
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp