GET /courses/:courseId/content

GET /courses/:courseId/content

GET /api/courses/[courseId]/content - Get course content with modules and activities Supports preview mode: instructors can preview their own courses regardless of publish status Verify authentication with Clerk Get user's profile for permission checking Fetch course with instructor_id for permission checking Check permissions: allow access if: 1. User is admin/super_admin 2. User is the instructor (can preview their own courses, including drafts) 3. Course is published (anyone can view published courses) Fetch modules Continue with empty modules array Fetch activities for each module

Endpoint

GET /courses/:courseId/content

Authentication

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

Path Parameters

ParameterTypeDescription
courseIdstringPath parameter

Error Responses

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

Example Request

curl -X GET "https://api.allurelms.com/courses/courseId-value/content" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json"