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
| Parameter | Type | Description |
|---|---|---|
activityId | string | Path parameter |
Error Responses
| Status Code | Error Code | Description |
|---|---|---|
| 401 | HTTP_401 | Unauthorized |
| 404 | HTTP_404 | Not Found |
| 404 | HTTP_404 | Not Found |
| 404 | HTTP_404 | Not Found |
| 404 | HTTP_404 | Not Found |
| 403 | HTTP_403 | Forbidden |
| 500 | HTTP_500 | Internal Server Error |
| 401 | HTTP_401 | Unauthorized |
| 404 | HTTP_404 | Not Found |
| 400 | HTTP_400 | Bad Request |
| 400 | HTTP_400 | Bad Request |
| 404 | HTTP_404 | Not Found |
| 404 | HTTP_404 | Not Found |
| 404 | HTTP_404 | Not Found |
| 403 | HTTP_403 | Forbidden |
| 500 | HTTP_500 | Internal Server Error |
| 500 | HTTP_500 | Internal Server Error |
| 401 | HTTP_401 | Unauthorized |
| 404 | HTTP_404 | Not Found |
| 404 | HTTP_404 | Not Found |
| 404 | HTTP_404 | Not Found |
| 404 | HTTP_404 | Not Found |
| 403 | HTTP_403 | Forbidden |
| 500 | HTTP_500 | Internal Server Error |
| 500 | HTTP_500 | Internal Server Error |
Example Request
curl -X DELETE "https://api.allurelms.com/activities/activityId-value" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json"