latestOpenAPI 3.1.02026-08-153864115.7 MB

c301132dbfd7

Courses

Create course

Create a new course within an experience, with optional chapters, lessons, and a certificate.

Required permissions:

  • courses:update
post/courses

Request body

certificate_after_completion_enabledboolean nullable

Whether the course awards students a PDF certificate after completing all lessons.

experience_idstring required

The unique identifier of the experience to create the course in (e.g., "exp_XXXXX").

orderstring nullable

The decimal order position of the course within its experience. Use fractional values (e.g., "1.5") to place between existing courses.

require_completing_lessons_in_orderboolean nullable

Whether students must complete each lesson sequentially before advancing to the next one.

taglinestring nullable

A short tagline displayed beneath the course title (e.g., "Master the fundamentals of design").

titlestring required

The display title of the course (e.g., "Introduction to Web Development").

visibility'visible' | 'hidden'

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

Example request

{
  "experience_id": "exp_xxxxxxxxxxxxxx",
  "order": "123.45"
}

Response

A successful response

certificate_after_completion_enabledboolean nullable required

Whether students receive a PDF certificate after completing all lessons in this course. Null if the setting has not been configured.

chapters_countinteger required

The total number of chapters in this course, including chapters whose lessons are all hidden from the current user.

completed_lessons_countinteger required

The number of lessons in this course that the current user has marked as completed. Zero when the request is not made on behalf of a user.

cover_imagestring nullable required

The URL of the course cover image shown on preview cards. Null if no cover image has been uploaded.

created_atstring date-time required

The datetime the course was created.

descriptionstring nullable required

A brief summary of the course content and objectives. Null if no description has been set.

idstring required

The unique identifier for the course.

language'en' | 'es' | 'it' | 'pt' | 'de' | 'fr' | 'pl' | 'ru' | 'nl' | 'ca' | 'tr' | 'sv' | 'uk' | 'no' | 'fi' | 'sk' | 'el' | 'cs' | 'hr' | 'da' | 'ro' | 'bg' required

The available languages for a course

latest_lesson_created_atstring date-time nullable required

The creation timestamp of the most recently added lesson visible to the current user. Null if the course has no lessons.

lesson_unlock_daysinteger[] required

The distinct drip schedules, in days after the course start, of lessons visible to the current user. Combine with startedAt to work out which have unlocked. Empty when the user has not started the course or no lesson is on a schedule.

orderstring required

The sort position of this course within its parent experience, as a decimal for flexible ordering.

require_completing_lessons_in_orderboolean required

Whether students must complete each lesson sequentially before advancing to the next one.

started_atstring date-time nullable required

The earliest time the current user is known to have started this course. Null if they have not started it. Drip unlock schedules are measured from this point.

taglinestring nullable required

A short marketing tagline displayed beneath the course title. Null if no tagline has been set.

titlestring nullable required

The display name of the course shown to students. Null if no title has been set.

total_duration_secondsinteger required

The combined duration in seconds of every hosted video across the lessons visible to the current user.

total_lessons_countinteger required

The number of lessons in this course visible to the current user.

updated_atstring date-time required

The datetime the course was last updated.

visibility'visible' | 'hidden' required

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

Example response

{
  "chapters": [
    {
      "id": "chap_xxxxxxxxxxxxx",
      "lessons": [
        {
          "id": "lesn_xxxxxxxxxxxxx",
          "order": 42,
          "thumbnail": {
            "url": "https://media.whop.com/abc123/optimized.jpg"
          },
          "title": "Understanding Candlestick Patterns",
          "video_asset": {
            "duration_seconds": 42
          }
        }
      ],
      "order": 42,
      "title": "Getting Started"
    }
  ],
  "chapters_count": 42,
  "completed_lessons_count": 42,
  "cover_image": "https://assets.whop.com/images/course-cover.jpg",
  "created_at": "2023-12-01T05:00:00.401Z",
  "description": "Learn advanced trading strategies from industry experts.",
  "id": "cors_xxxxxxxxxxxxx",
  "latest_lesson_created_at": "2023-12-01T05:00:00.401Z",
  "lesson_unlock_days": [
    42
  ],
  "order": "123.45",
  "resume_lesson": {
    "id": "lesn_xxxxxxxxxxxxx"
  },
  "started_at": "2023-12-01T05:00:00.401Z",
  "tagline": "Master the fundamentals in 30 days",
  "thumbnail": {
    "content_type": "image/jpeg",
    "filename": "document.pdf",
    "optimized_url": "https://media.whop.com/abc123/optimized.jpg",
    "source_url": "https://media.whop.com/abc123/original.jpg"
  },
  "title": "Introduction to Technical Analysis",
  "total_duration_seconds": 42,
  "total_lessons_count": 42,
  "updated_at": "2023-12-01T05:00:00.401Z"
}