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

> Moves a section to Trash and hides its lessons. The section cover is removed. You can restore the section from Trash in SchoolMaker.



## OpenAPI

````yaml delete /sections/{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:
  /sections/{id}:
    delete:
      tags:
        - Sections
      summary: Delete a Section
      description: >-
        Moves a section to Trash and hides its lessons. The section cover is
        removed. You can restore the section from Trash in SchoolMaker.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  deleted:
                    type: boolean
              example:
                id: SECTION_ID
                deleted: true
        '401':
          description: Access denied
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    oneOf:
                      - type: string
                      - type: array
                        items:
                          type: string
              example:
                error: Access denied
        '403':
          description: You do not have permission to perform this action
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    oneOf:
                      - type: string
                      - type: array
                        items:
                          type: string
              example:
                error: You do not have permission to perform this action
        '404':
          description: Record not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    oneOf:
                      - type: string
                      - type: array
                        items:
                          type: string
              example:
                error: Record not found
        '422':
          description: Invalid arguments
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    oneOf:
                      - type: string
                      - type: array
                        items:
                          type: string
              example:
                error: Invalid arguments
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    oneOf:
                      - type: string
                      - type: array
                        items:
                          type: string
              example:
                error: Too many requests
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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