v8

OpenAPI 3.1.02026-08-033623795.0 MB
Course lessons

Retrieve course lesson

Retrieves the details of an existing course lesson.

Required permissions:

  • courses:read
get/course_lessons/{id}

Path parameters

idstring required
Example:lesn_xxxxxxxxxxxxx

The unique identifier of the lesson to retrieve.

Response

A successful response

contentstring nullable required

The Markdown content body of the lesson. Null if the lesson has no text content.

created_atstring date-time required

The datetime the lesson was created.

days_from_course_start_until_unlockinteger nullable required

The number of days after a student starts the course before this lesson becomes accessible. Null if the lesson is available immediately.

embed_idstring nullable required

The external video identifier for embedded video lessons, such as a YouTube video ID or Loom share ID. Null if the lesson has no embed.

embed_type'youtube' | 'loom' required

The type of embed for a lesson

idstring required

The unique identifier for the lesson.

lesson_type'text' | 'video' | 'pdf' | 'multi' | 'quiz' | 'knowledge_check' required

The available types for a lesson

orderinteger required

The sort position of this lesson within its parent chapter, starting from zero.

titlestring required

The display name of the lesson shown to students. Maximum 120 characters.

visibility'visible' | 'hidden' required

The available visibilities for a lesson. Determines how / whether a lesson is visible to users.

Example response

{
  "assessment_questions": [
    {
      "created_at": "2023-12-01T05:00:00.401Z",
      "id": "crsaq_xxxxxxxxxxxx",
      "image": {
        "content_type": "image/jpeg",
        "filename": "document.pdf",
        "url": "https://media.whop.com/abc123/optimized.jpg"
      },
      "options": [
        {
          "id": "crsaqo_xxxxxxxxxxx",
          "order": 42
        }
      ],
      "order": 42
    }
  ],
  "attachments": [
    {
      "content_type": "image/jpeg",
      "filename": "document.pdf",
      "url": "https://media.whop.com/abc123/optimized.jpg"
    }
  ],
  "content": "In this lesson, we will cover the basics of technical analysis...",
  "created_at": "2023-12-01T05:00:00.401Z",
  "days_from_course_start_until_unlock": 42,
  "embed_id": "dQw4w9WgXcQ",
  "id": "lesn_xxxxxxxxxxxxx",
  "main_pdf": {
    "content_type": "image/jpeg",
    "filename": "document.pdf",
    "url": "https://media.whop.com/abc123/optimized.jpg"
  },
  "order": 42,
  "thumbnail": {
    "url": "https://media.whop.com/abc123/optimized.jpg"
  },
  "title": "Understanding Candlestick Patterns",
  "video_asset": {
    "created_at": "2023-12-01T05:00:00.401Z",
    "duration_seconds": 42,
    "finished_uploading_at": "2023-12-01T05:00:00.401Z",
    "id": "mux_xxxxxxxxxxxxxx",
    "updated_at": "2023-12-01T05:00:00.401Z"
  }
}