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

# Set Section Details

> Updates a section's details, program or group. Omitted fields remain unchanged.



## OpenAPI

````yaml patch /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}:
    patch:
      tags:
        - Sections
      summary: Set Section Details
      description: >-
        Updates a section's details, program or group. Omitted fields remain
        unchanged.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 255
                  minLength: 1
                  description: >-
                    Section title. Required on creation and cannot be blank or
                    null. Maximum 255 characters.
                description:
                  type: string
                  maxLength: 200000
                  description: >-
                    Section description. Maximum 200000 characters. Empty by
                    default. Send null to clear it.
                  nullable: true
                drip_delay:
                  type: integer
                  minimum: 0
                  maximum: 32767
                  description: >-
                    Delay in days before the section becomes available, from 0
                    to 32767. Uses the member program drip start or earliest
                    offer access, adjusted by their drip boost. Defaults to 0.
                    Null is accepted only on creation.
                position:
                  type: integer
                  minimum: 0
                  description: >-
                    Position within the program, starting at 1. Defaults to the
                    end. Moving a section shifts the other sections. Send null
                    to clear its position. Group order is set separately with
                    section_group_position.
                  nullable: true
                section_group_position:
                  type: integer
                  minimum: 1
                  description: >-
                    Position within the selected group, starting at 1. Defaults
                    to the end when creating a section or changing groups. Must
                    fit the number of sections in the group. Null is not
                    accepted.
                is_published:
                  type: boolean
                  description: >-
                    Whether the section is published. Defaults to true,
                    including in a draft program. Send false to create a draft
                    section. Null is accepted only on creation.
                section_group_id:
                  type: string
                  maxLength: 255
                  description: >-
                    Group ID within the selected program. Defaults to the last
                    group when creating a section or moving it to another
                    program. Send null on update to remove the group. Changing
                    groups places the section at the end of the new group.
                  nullable: true
                product_id:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: >-
                    Parent program ID. Required on creation. Changing it moves
                    the section and its lessons. You need edit access to both
                    programs. Without section_group_id, a move uses the
                    destination program's last group.
              additionalProperties: false
      responses:
        '200':
          description: Successful operation.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  product_id:
                    type: string
                  section_group_id:
                    type: string
                    nullable: true
                  section_group_position:
                    type: integer
                    nullable: true
                  name:
                    type: string
                  description:
                    type: string
                  position:
                    type: integer
                    nullable: true
                  drip_delay:
                    type: integer
                  is_published:
                    type: boolean
                  image_cover_url:
                    type: string
                    nullable: true
              example:
                id: SECTION_ID
                product_id: PROGRAM_ID
                section_group_id: GROUP_ID
                section_group_position: 1
                name: Introduction
                description: Start here
                position: 1
                drip_delay: 0
                is_published: false
                image_cover_url: null
        '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.