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

const client = new Whop({
  apiKey: process.env['WHOP_API_KEY'], // This is the default and can be omitted
});

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,
          "video_asset": {
            "signed_playback_id": "<string>",
            "signed_thumbnail_playback_token": "<string>",
            "duration_seconds": 42
          },
          "thumbnail": {
            "url": "<string>"
          }
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

A company API key, company scoped JWT, app API key, or user OAuth token. You must prepend your key/token with the word 'Bearer', which will look like Bearer ***************************

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 unique identifier for the course.

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
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 datetime the course was created.

Example:

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

updated_at
string<date-time>
required

The datetime the course was last updated.

Example:

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

chapters
object[]
required

The chapters in this course