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

# List Lessons

> Retrieves the lessons in a section, ordered by position.



## OpenAPI

````yaml get /lessons
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:
    get:
      tags:
        - Lessons
      summary: List Lessons
      description: Retrieves the lessons in a section, ordered by position.
      operationId: listLessons
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 10000
            default: 1
        - name: per_page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 30
            default: 30
        - name: query
          in: query
          required: false
          schema:
            type: string
            maxLength: 10000
            description: Filter by part of the lesson name. Not case-sensitive.
        - name: section_id
          in: query
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 255
      responses:
        '200':
          description: Successful request.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LessonList'
              example:
                data:
                  - id: lesson_id
                    section_id: section_id
                    name: Introduction
                    position: 1
                    lesson_type: text
                    drip_delay: 0
                    is_published: false
                    is_progression_locked: false
                page: 1
                next_page: 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 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:
    LessonList:
      type: object
      required:
        - data
        - page
        - next_page
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/LessonSummary'
        page:
          type: integer
        next_page:
          type: integer
          nullable: true
    LessonError:
      type: object
      required:
        - error
      properties:
        error:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
    LessonSummary:
      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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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