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

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

const courseChapter = await client.courseChapters.update('chap_xxxxxxxxxxxxx', { title: 'title' });

console.log(courseChapter.id);
{
  "id": "chap_xxxxxxxxxxxxx",
  "title": "<string>",
  "order": 42,
  "lessons": [
    {
      "id": "lesn_xxxxxxxxxxxxx",
      "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
Example:

"chap_xxxxxxxxxxxxx"

Body

application/json

Parameters for UpdateChapter

title
string
required

The title of the chapter

Response

A successful response

A chapter from the courses app

id
string
required

The ID of the chapter. Looks like chap_XXX

Example:

"chap_xxxxxxxxxxxxx"

title
string
required

The title of the chapter

order
integer
required

The order of the chapter within its course

Example:

42

lessons
object[]
required

The lessons in this chapter