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

# Move a Lesson

> Moves a lesson with its content, attachments and steps, keeping learner progress. Member access follows the destination program and question category settings.



## OpenAPI

````yaml /api-reference/openapi.json post /lessons/{id}/move
openapi: 3.0.1
info:
  title: SchoolMaker API V1
  description: API for managing your SchoolMaker school
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://schoolmaker.co/api/v1
    description: Production API
security:
  - bearerAuth: []
paths:
  /lessons/{id}/move:
    post:
      tags:
        - Lessons
      summary: Move a Lesson
      description: >-
        Moves a lesson with its content, attachments and steps, keeping learner
        progress. Member access follows the destination program and question
        category settings.
      operationId: moveLesson
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Lesson ID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - destination_section_id
              properties:
                destination_section_id:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: >-
                    Destination section ID. You need edit access to both
                    programs. The lesson goes to the end of the destination
                    section. If it is already in the destination section, the
                    API returns it unchanged.
              additionalProperties: false
            example:
              destination_section_id: section_id
      responses:
        '200':
          description: Successful request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LessonDetail'
              example:
                id: lesson_id
                section_id: section_id
                name: Introduction
                position: 1
                lesson_type: text
                drip_delay: 0
                is_published: false
                is_progression_locked: false
                description: ''
                body: <div class="lexxy-content"><h1>Welcome</h1></div>
                settings_embed_wistia: null
                settings_embed_vimeo: null
                settings_embed_youtube: null
                settings_embed_loom: null
                settings_embed_code: null
                embed_code: null
                transcripts: []
                media:
                  pdf_url: null
                  audio_url: null
                  video_poster_url: null
                  video_status: null
                  video_id: null
                  video_error: null
                  video_progress: null
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LessonError'
              example:
                error: Access denied
        '403':
          description: You do not have permission to perform this action.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LessonError'
              example:
                error: Access denied
        '404':
          description: Lesson or destination section not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LessonError'
              example:
                error: Record not found
        '422':
          description: >-
            Invalid request. No changes were saved. On cross-program moves,
            existing questions require an enabled, published destination
            category of the same type. Inline Questions and Community share a
            type. The destination forum category must be open to receive
            questions. A Consultation question linked to a session in another
            category blocks the move.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    oneOf:
                      - type: string
                      - type: array
                        items:
                          type: string
                  code:
                    type: string
                    description: >-
                      Present when a move rule blocks the request.
                      questions_disabled means the destination cannot receive
                      existing questions. question_destination_mismatch means
                      the question types differ.
                      consultation_session_category_mismatch means an existing
                      question is linked to a session in another category.
              example:
                error: >-
                  Existing lesson questions need an available destination
                  category. Check Program Settings → Questions go to before
                  moving this content.
                code: questions_disabled
components:
  schemas:
    LessonDetail:
      type: object
      required:
        - id
        - section_id
        - name
        - position
        - lesson_type
        - drip_delay
        - is_published
        - is_progression_locked
      properties:
        id:
          type: string
        section_id:
          type: string
        name:
          type: string
        position:
          type: integer
          nullable: true
        lesson_type:
          type: string
          enum:
            - video
            - text
            - pdf
            - embed
            - audio
        drip_delay:
          type: integer
        is_published:
          type: boolean
        is_progression_locked:
          type: boolean
          nullable: true
        settings_embed_wistia:
          type: string
          nullable: true
        settings_embed_vimeo:
          type: string
          nullable: true
        settings_embed_youtube:
          type: string
          nullable: true
        settings_embed_loom:
          type: string
          nullable: true
        settings_embed_code:
          type: string
          nullable: true
        embed_code:
          type: string
          nullable: true
        description:
          type: string
          readOnly: true
          description: >-
            Legacy lesson description. Use body when creating or updating
            lessons. Existing values are preserved when body is updated or
            cleared.
        body:
          type: string
          description: Rendered HTML.
        transcripts:
          type: array
          items:
            type: object
            properties:
              language:
                type: string
                nullable: true
              content:
                type: string
                nullable: true
        media:
          type: object
          properties:
            pdf_url:
              type: string
              nullable: true
            audio_url:
              type: string
              nullable: true
            video_poster_url:
              type: string
              nullable: true
            video_status:
              type: string
              nullable: true
            video_id:
              type: string
              nullable: true
            video_error:
              type: string
              nullable: true
            video_progress:
              type: integer
              nullable: true
    LessonError:
      type: object
      required:
        - error
      properties:
        error:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.