> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update course

> Update a course's title, description, visibility, thumbnail, or chapter ordering.

Required permissions:
 - `courses:update`



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/whopsdk/openapi.documented.yml patch /courses/{id}
openapi: 3.1.0
info:
  title: Whop API
  description: >-
    The Whop REST API. Please see
    https://docs.whop.com/developer/api/getting-started for more details.
  termsOfService: https://whop.com/tos-developer-api/
  version: 1.0.0
servers:
  - url: https://api.whop.com/api/v1
    description: Production Whop API
security: []
tags:
  - name: Products
    description: Products
  - name: Plans
    description: Plans
  - name: Payments
    description: Payments
  - name: Refunds
    description: Refunds
  - name: Disputes
    description: Disputes
  - name: Dispute alerts
    description: Dispute alerts
  - name: Resolution center cases
    description: Resolution center cases
  - name: Checkout configurations
    description: Checkout configurations
  - name: Setup intents
    description: Setup intents
  - name: Payment methods
    description: Payment methods
  - name: Invoices
    description: Invoices
  - name: Promo codes
    description: Promo codes
  - name: Card transactions
    description: Card transactions
  - name: Ledger accounts
    description: Ledger accounts
  - name: Transfers
    description: Transfers
  - name: Withdrawals
    description: Withdrawals
  - name: Payout methods
    description: Payout methods
  - name: Verifications
    description: Verifications
  - name: Payout accounts
    description: Payout accounts
  - name: Topups
    description: Topups
  - name: Users
    description: Users
  - name: Companies
    description: Companies
  - name: Authorized users
    description: Authorized users
  - name: Fee markups
    description: Fee markups
  - name: Members
    description: Members
  - name: Memberships
    description: Memberships
  - name: Leads
    description: Leads
  - name: Entries
    description: Entries
  - name: Shipments
    description: Shipments
  - name: Reviews
    description: Reviews
  - name: Company token transactions
    description: Company token transactions
  - name: Affiliates
    description: Affiliates
  - name: Experiences
    description: Experiences
  - name: Forums
    description: Forums
  - name: Forum posts
    description: Forum posts
  - name: Chat channels
    description: Chat channels
  - name: Support channels
    description: Support channels
  - name: Messages
    description: Messages
  - name: Reactions
    description: Reactions
  - name: Dm members
    description: Dm members
  - name: Dm channels
    description: Dm channels
  - name: Notifications
    description: Notifications
  - name: Courses
    description: Courses
  - name: Course chapters
    description: Course chapters
  - name: Course lessons
    description: Course lessons
  - name: Course students
    description: Course students
  - name: Course lesson interactions
    description: Course lesson interactions
  - name: Apps
    description: Apps
  - name: Webhooks
    description: Webhooks
  - name: App builds
    description: App builds
  - name: Access tokens
    description: Access tokens
  - name: Account links
    description: Account links
  - name: Files
    description: Files
  - name: Ai chats
    description: Ai chats
  - name: Bounties
    description: Bounties
  - name: Stats
    description: Stats
  - name: Ad campaigns
    description: Ad campaigns
  - name: Ad groups
    description: Ad groups
  - name: Ads
    description: Ads
  - name: Conversions
    description: Conversions
paths:
  /courses/{id}:
    patch:
      tags:
        - Courses
      summary: Update course
      description: >-
        Update a course's title, description, visibility, thumbnail, or chapter
        ordering.


        Required permissions:
         - `courses:update`
      operationId: updateCourse
      parameters:
        - name: id
          in: path
          required: true
          description: >-
            The unique identifier of the course to update (e.g.,
            "course_XXXXX").
          schema:
            type: string
            example: cors_xxxxxxxxxxxxx
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                certificate_after_completion_enabled:
                  type:
                    - boolean
                    - 'null'
                  description: >-
                    Whether the course awards students a PDF certificate after
                    completing all lessons.
                chapters:
                  type:
                    - array
                    - 'null'
                  items:
                    type: object
                    properties:
                      id:
                        type: string
                        description: The ID of the chapter to update
                      lessons:
                        type:
                          - array
                          - 'null'
                        items:
                          type: object
                          properties:
                            chapter_id:
                              type: string
                              description: >-
                                The ID of the chapter this lesson belongs to
                                (for moving between chapters)
                              example: chap_xxxxxxxxxxxxx
                            id:
                              type: string
                              description: The ID of the lesson to update
                            order:
                              type: integer
                              description: The order of the lesson within its chapter
                              example: 42
                            title:
                              type: string
                              description: The title of the lesson
                          required:
                            - chapter_id
                            - id
                            - order
                            - title
                          description: Input for updating a lesson while updating a course
                        description: The lessons to update within this chapter
                      order:
                        type: integer
                        description: The order of the chapter within its course
                        example: 42
                      title:
                        type: string
                        description: The title of the chapter
                    required:
                      - id
                      - order
                      - title
                    description: Input for updating a chapter while updating a course
                  description: >-
                    A list of chapters with nested lessons to reorder or rename
                    in bulk.
                description:
                  type:
                    - string
                    - 'null'
                  description: >-
                    A short description of the course displayed to students on
                    the course page.
                language:
                  oneOf:
                    - $ref: '#/components/schemas/Languages'
                    - type: 'null'
                  description: >-
                    The primary language spoken in the video content of the
                    course.
                order:
                  type:
                    - string
                    - 'null'
                  description: >-
                    The decimal order position of the course within its
                    experience. Use fractional values (e.g., "1.5") to place
                    between existing courses.
                  example: '123.45'
                require_completing_lessons_in_order:
                  type:
                    - boolean
                    - 'null'
                  description: >-
                    Whether students must complete each lesson sequentially
                    before advancing to the next one.
                tagline:
                  type:
                    - string
                    - 'null'
                  description: >-
                    A short tagline displayed beneath the course title (e.g.,
                    "Master the fundamentals of design").
                thumbnail:
                  type:
                    - object
                    - 'null'
                  properties:
                    id:
                      type: string
                      description: The ID of an existing file object.
                  required:
                    - id
                  description: >-
                    The thumbnail image for the course in PNG, JPEG, or GIF
                    format.
                  title: FileInputWithId
                title:
                  type:
                    - string
                    - 'null'
                  description: >-
                    The display title of the course (e.g., "Introduction to Web
                    Development").
                visibility:
                  oneOf:
                    - $ref: '#/components/schemas/CourseVisibilities'
                    - type: 'null'
                  description: >-
                    Controls whether this course is visible to students or
                    hidden as a draft.
              required: []
              description: Parameters for UpdateCourse
      responses:
        '200':
          description: A successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Course'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type:
                          - string
                          - 'null'
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                      param:
                        type:
                          - string
                          - 'null'
                        description: The parameter that caused the error, if applicable
                    required:
                      - type
                      - message
                required:
                  - error
              example:
                error:
                  type: invalid_request_error
                  code: parameter_missing
                  message: 'Missing required parameter: amount.'
                  param: amount
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type:
                          - string
                          - 'null'
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                      param:
                        type:
                          - string
                          - 'null'
                        description: The parameter that caused the error, if applicable
                    required:
                      - type
                      - message
                required:
                  - error
              example:
                error:
                  type: unauthorized
                  message: Invalid or missing API key
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type:
                          - string
                          - 'null'
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                      param:
                        type:
                          - string
                          - 'null'
                        description: The parameter that caused the error, if applicable
                    required:
                      - type
                      - message
                required:
                  - error
              example:
                error:
                  type: forbidden
                  message: You do not have permission to access this resource
        '404':
          description: Not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type:
                          - string
                          - 'null'
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                      param:
                        type:
                          - string
                          - 'null'
                        description: The parameter that caused the error, if applicable
                    required:
                      - type
                      - message
                required:
                  - error
              example:
                error:
                  type: not_found
                  message: Resource not found
        '422':
          description: Verification required
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type:
                          - string
                          - 'null'
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                      param:
                        type:
                          - string
                          - 'null'
                        description: The parameter that caused the error, if applicable
                    required:
                      - type
                      - message
                required:
                  - error
              example:
                error: null
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      type:
                        type: string
                      message:
                        type: string
                      code:
                        type:
                          - string
                          - 'null'
                        description: >-
                          A short string indicating the specific error code,
                          e.g. 'parameter_missing', 'parameter_invalid',
                          'invalid_json'
                      param:
                        type:
                          - string
                          - 'null'
                        description: The parameter that caused the error, if applicable
                    required:
                      - type
                      - message
                required:
                  - error
              example:
                error:
                  type: internal_server_error
                  message: An unexpected error occurred
      security:
        - bearerAuth:
            - courses:update
      x-codeSamples:
        - lang: JavaScript
          source: |-
            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.update('cors_xxxxxxxxxxxxx');

            console.log(course.id);
        - lang: Python
          source: |-
            import os
            from whop_sdk import Whop

            client = Whop(
                api_key=os.environ.get("WHOP_API_KEY"),  # This is the default and can be omitted
            )
            course = client.courses.update(
                id="cors_xxxxxxxxxxxxx",
            )
            print(course.id)
        - lang: Ruby
          source: |-
            require "whop_sdk"

            whop = WhopSDK::Client.new(api_key: "My API Key")

            course = whop.courses.update("cors_xxxxxxxxxxxxx")

            puts(course)
components:
  schemas:
    Languages:
      type: string
      enum:
        - en
        - es
        - it
        - pt
        - de
        - fr
        - pl
        - ru
        - nl
        - ca
        - tr
        - sv
        - uk
        - 'no'
        - fi
        - sk
        - el
        - cs
        - hr
        - da
        - ro
        - bg
      description: The available languages for a course
    CourseVisibilities:
      type: string
      enum:
        - visible
        - hidden
      description: >-
        The available visibilities for a course. Determines how / whether a
        course is visible to users.
    Course:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the course.
          example: cors_xxxxxxxxxxxxx
        title:
          type:
            - string
            - 'null'
          description: >-
            The display name of the course shown to students. Null if no title
            has been set.
          example: Introduction to Technical Analysis
        tagline:
          type:
            - string
            - 'null'
          description: >-
            A short marketing tagline displayed beneath the course title. Null
            if no tagline has been set.
          example: Master the fundamentals in 30 days
        cover_image:
          type:
            - string
            - 'null'
          description: >-
            The URL of the course cover image shown on preview cards. Null if no
            cover image has been uploaded.
          example: https://assets.whop.com/images/course-cover.jpg
        thumbnail:
          type:
            - object
            - 'null'
          properties:
            id:
              type: string
              description: >-
                Represents a unique identifier that is Base64 obfuscated. It is
                often used to refetch an object or as key for a cache. The ID
                type appears in a JSON response as a String; however, it is not
                intended to be human-readable. When expected as an input type,
                any string (such as `"VXNlci0xMA=="`) or integer (such as `4`)
                input value will be accepted as an ID.
            filename:
              type:
                - string
                - 'null'
              description: >-
                The original filename of the uploaded attachment, including its
                file extension.
              example: document.pdf
            content_type:
              type:
                - string
                - 'null'
              description: >-
                The MIME type of the uploaded file (e.g., image/jpeg, video/mp4,
                audio/mpeg).
              example: image/jpeg
            optimized_url:
              type:
                - string
                - 'null'
              description: >-
                A pre-optimized URL for rendering this attachment on the client.
                This should be used for displaying attachments in apps.
              example: https://media.whop.com/abc123/optimized.jpg
            source_url:
              type:
                - string
                - 'null'
              description: >-
                The original source URL of the attachment, such as a direct link
                to S3. This should never be displayed on the client and should
                always be passed through an Imgproxy transformer.
              example: https://media.whop.com/abc123/original.jpg
          required:
            - id
            - filename
            - content_type
            - optimized_url
            - source_url
          description: >-
            The thumbnail image displayed on course cards and previews. Null if
            no thumbnail has been uploaded.
        description:
          type:
            - string
            - 'null'
          description: >-
            A brief summary of the course content and objectives. Null if no
            description has been set.
          example: Learn advanced trading strategies from industry experts.
        language:
          $ref: '#/components/schemas/Languages'
          description: >-
            The spoken language of the video content, used to generate accurate
            closed captions. One of: 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:
          type:
            - boolean
            - 'null'
          description: >-
            Whether students receive a PDF certificate after completing all
            lessons in this course. Null if the setting has not been configured.
        require_completing_lessons_in_order:
          type: boolean
          description: >-
            Whether students must complete each lesson sequentially before
            advancing to the next one.
        order:
          type: string
          description: >-
            The sort position of this course within its parent experience, as a
            decimal for flexible ordering.
          example: '123.45'
        visibility:
          $ref: '#/components/schemas/CourseVisibilities'
          description: >-
            The visibility setting that controls whether this course appears to
            students. One of: visible, hidden.
        created_at:
          type: string
          format: date-time
          description: The datetime the course was created.
          example: '2023-12-01T05:00:00.401Z'
        updated_at:
          type: string
          format: date-time
          description: The datetime the course was last updated.
          example: '2023-12-01T05:00:00.401Z'
        chapters:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                description: The unique identifier for the chapter.
                example: chap_xxxxxxxxxxxxx
              title:
                type: string
                description: >-
                  The display name of the chapter shown to students. Maximum 150
                  characters.
                example: Getting Started
              order:
                type: integer
                description: >-
                  The sort position of this chapter within its parent course,
                  starting from zero.
                example: 42
              lessons:
                type: array
                items:
                  type: object
                  properties:
                    id:
                      type: string
                      description: The unique identifier for the lesson.
                      example: lesn_xxxxxxxxxxxxx
                    lesson_type:
                      $ref: '#/components/schemas/LessonTypes'
                      description: >-
                        The content format of this lesson. One of: text, video,
                        pdf, multi, quiz, knowledge_check.
                    title:
                      type: string
                      description: >-
                        The display name of the lesson shown to students.
                        Maximum 120 characters.
                      example: Understanding Candlestick Patterns
                    order:
                      type: integer
                      description: >-
                        The sort position of this lesson within its parent
                        chapter, starting from zero.
                      example: 42
                    video_asset:
                      type:
                        - object
                        - 'null'
                      properties:
                        signed_playback_id:
                          type:
                            - string
                            - 'null'
                          description: The signed playback ID of the Mux asset
                        signed_thumbnail_playback_token:
                          type:
                            - string
                            - 'null'
                          description: The signed thumbnail playback token of the Mux asset
                        duration_seconds:
                          type:
                            - integer
                            - 'null'
                          description: The duration of the video in seconds
                          example: 42
                      required:
                        - signed_playback_id
                        - signed_thumbnail_playback_token
                        - duration_seconds
                      description: >-
                        The Mux video asset for video-type lessons, used for
                        streaming playback. Null if this lesson has no hosted
                        video.
                    thumbnail:
                      type:
                        - object
                        - 'null'
                      properties:
                        url:
                          type:
                            - string
                            - 'null'
                          description: >-
                            A pre-optimized URL for rendering this attachment on
                            the client. This should be used for displaying
                            attachments in apps.
                          example: https://media.whop.com/abc123/optimized.jpg
                      required:
                        - url
                      description: >-
                        The thumbnail image displayed on lesson cards and
                        previews. Null if no thumbnail has been uploaded.
                  required:
                    - id
                    - lesson_type
                    - title
                    - order
                    - video_asset
                    - thumbnail
                  description: >-
                    An individual learning unit within a chapter, which can
                    contain text, video, PDF, or assessment content.
                description: >-
                  An ordered list of lessons in this chapter, sorted by display
                  position. Hidden lessons are excluded for non-admin users.
            required:
              - id
              - title
              - order
              - lessons
            description: >-
              A grouping of related lessons within a course, used to organize
              content into sections.
          description: >-
            An ordered list of all chapters in this course, sorted by their
            display position.
      required:
        - id
        - title
        - tagline
        - cover_image
        - thumbnail
        - description
        - language
        - certificate_after_completion_enabled
        - require_completing_lessons_in_order
        - order
        - visibility
        - created_at
        - updated_at
        - chapters
      description: >-
        A structured learning module containing chapters and lessons, belonging
        to an experience.
    LessonTypes:
      type: string
      enum:
        - text
        - video
        - pdf
        - multi
        - quiz
        - knowledge_check
      description: The available types for a lesson
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        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 ***************************`
      scheme: bearer
      bearerFormat: auth-scheme

````