Skip to main content
POST
/
courses
JavaScript
import Whop from '@whop/sdk';

const client = new Whop({
  appID: 'app_xxxxxxxxxxxxxx',
  apiKey: 'My API Key',
});

const course = await client.courses.create({ experience_id: 'exp_xxxxxxxxxxxxxx', title: 'title' });

console.log(course.id);
{
  "id": "cors_xxxxxxxxxxxxx",
  "title": "<string>",
  "tagline": "<string>",
  "thumbnail": {
    "id": "<string>",
    "filename": "<string>",
    "content_type": "<string>",
    "optimized_url": "<string>",
    "source_url": "<string>"
  },
  "description": "<string>",
  "language": "en",
  "certificate_after_completion_enabled": true,
  "require_completing_lessons_in_order": true,
  "created_at": "2023-12-01T05:00:00.401Z",
  "updated_at": "2023-12-01T05:00:00.401Z",
  "chapters": [
    {
      "id": "chap_xxxxxxxxxxxxx",
      "title": "<string>",
      "order": 42,
      "lessons": [
        {
          "id": "lesn_xxxxxxxxxxxxx",
          "lesson_type": "text",
          "title": "<string>",
          "order": 42
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

The app API key from an app from the /dashboard/developer page

Body

application/json

Parameters for CreateCourse

experience_id
string
required

The ID of the experience to create the course in

Example:

"exp_xxxxxxxxxxxxxx"

title
string
required

The title of the course

certificate_after_completion_enabled
boolean | null

Whether the course will award its students a PDF certificate after completing all lessons

cover_image
string | null

The cover image URL of the course

require_completing_lessons_in_order
boolean | null

Whether the course requires students to complete the previous lesson before moving on to the next one

tagline
string | null

The tagline of the course

thumbnail
object | null

The thumbnail for the course in png, jpeg, or gif format

Response

A successful response

A course from the courses app

id
string
required

The ID of the course. Looks like cors_XXX

Example:

"cors_xxxxxxxxxxxxx"

title
string | null
required

The title of the course

tagline
string | null
required

A short tagline for the course. It is displayed under the course title in the UI

thumbnail
object | null
required

The thumbnail for the course

description
string | null
required

A short description of the course

language
enum<string>
required

The language spoken in the video content of the course, used to generate closed captions in the right language

Available options:
en,
es,
it,
pt,
de,
fr,
pl,
ru,
nl,
ca,
tr,
sv,
uk,
no,
fi,
sk,
el,
cs,
hr,
da,
ro,
bg
certificate_after_completion_enabled
boolean | null
required

Whether the course will award its students a PDF certificate after completing all lessons

require_completing_lessons_in_order
boolean
required

Whether the course requires students to complete the previous lesson before moving on to the next one

created_at
string<date-time>
required

The timestamp of when the course was created

Example:

"2023-12-01T05:00:00.401Z"

updated_at
string<date-time>
required

The timestamp of when the course was last updated

Example:

"2023-12-01T05:00:00.401Z"

chapters
object[]
required

The chapters in this course