> ## 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.

# Delete a Lesson

> Moves a lesson to Trash, preserving its content, steps and attachments.



## OpenAPI

````yaml delete /lessons/{id}
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}:
    delete:
      tags:
        - Lessons
      summary: Delete a Lesson
      description: Moves a lesson to Trash, preserving its content, steps and attachments.
      operationId: deleteLesson
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Lesson ID.
      responses:
        '200':
          description: Successful request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  deleted:
                    type: boolean
              example:
                id: lesson_id
                deleted: true
        '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 not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LessonError'
              example:
                error: Record not found
        '422':
          description: Invalid request. No changes were saved.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LessonError'
              example:
                error: 'Invalid arguments: /attributes/drip_delay integer'
components:
  schemas:
    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.