Skip to main content
GET
/
courses
/
{id}
JavaScript
import Whop from '@whop/sdk';

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

const course = await client.courses.retrieve('cors_xxxxxxxxxxxxx');

console.log(course.id);
{
  "id": "cors_xxxxxxxxxxxxx",
  "title": "<string>",
  "tagline": "<string>",
  "cover_image": "<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,
  "order": "123.45",
  "visibility": "visible",
  "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

Path Parameters

id
string
required

The ID of the course

Example:

"cors_xxxxxxxxxxxxx"

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

cover_image
string | null
required

The URL of the course's cover image, which is shown in course preview cards

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

order
string
required

The order of the course within its experience

Example:

"123.45"

visibility
enum<string>
required

The visibility of the course. Determines how / whether this course is visible to users.

Available options:
visible,
hidden
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