DELETE /enrollments/:enrollmentId

DELETE /enrollments/:enrollmentId

GET /api/enrollments/[enrollmentId] - Get a single enrollment Check authentication with Clerk Get user's profile Fetch the enrollment with course details Check access permissions PATCH /api/enrollments/[enrollmentId] - Update an enrollment Check authentication with Clerk Get user's profile Fetch the existing enrollment Check permissions Parse request body Build update object Learners can only update last_accessed_at Only admins can change enrollment status Update the enrollment DELETE /api/enrollments/[enrollmentId] - Drop/delete an enrollment Check authentication with Clerk Get user's profile Fetch the existing enrollment Check permissions Learners can drop (set status to 'dropped'), admins can hard delete Hard delete for admins Soft delete (drop) for learners

Endpoint

DELETE /enrollments/:enrollmentId

Authentication

This endpoint requires authentication. Include your authentication token in the request headers.

Path Parameters

ParameterTypeDescription
enrollmentIdstringPath parameter

Error Responses

Status CodeError CodeDescription
401HTTP_401Unauthorized
404HTTP_404Not Found
404HTTP_404Not Found
403HTTP_403Forbidden
500HTTP_500Internal Server Error
401HTTP_401Unauthorized
404HTTP_404Not Found
404HTTP_404Not Found
403HTTP_403Forbidden
403HTTP_403Forbidden
400HTTP_400Bad Request
500HTTP_500Internal Server Error
500HTTP_500Internal Server Error
401HTTP_401Unauthorized
404HTTP_404Not Found
404HTTP_404Not Found
403HTTP_403Forbidden
500HTTP_500Internal Server Error
500HTTP_500Internal Server Error
500HTTP_500Internal Server Error

Example Request

curl -X DELETE "https://api.allurelms.com/enrollments/enrollmentId-value" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json"