DELETE /activities/:activityId

DELETE /activities/:activityId

Validation schema for updating an activity JSONB content varies by activity type GET /api/activities/[activityId] Verify user is authenticated with Clerk Fetch activity scoped to tenant Load course to authorize access PATCH /api/activities/[activityId] Verify user is authenticated with Clerk Get user's profile to check permissions Parse and validate request body Additional validation for quiz content Only validate if content is provided and activity is quiz type Fetch activity to verify it exists and get module_id Check if user is the instructor or admin Update the activity DELETE /api/activities/[activityId] Verify user is authenticated with Clerk Get user's profile to check permissions Fetch activity to verify it exists and get module_id Delete the activity

Endpoint

DELETE /activities/:activityId

Authentication

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

Path Parameters

ParameterTypeDescription
activityIdstringPath parameter

Error Responses

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

Example Request

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