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

# Duplicate a Step

> Duplicates a step in the selected lesson, keeping its content, settings and reviewers. Member progress is not copied. Returns the completed copy.



## OpenAPI

````yaml post /steps/{id}/duplicate
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:
  /steps/{id}/duplicate:
    post:
      tags:
        - Steps
      summary: Duplicate a Step
      description: >-
        Duplicates a step in the selected lesson, keeping its content, settings
        and reviewers. Member progress is not copied. Returns the completed
        copy.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Step ID.
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 10000
                  description: >-
                    Name of the copy, up to 255 characters. Omitted or empty
                    uses Copy of followed by the original name, in the school
                    language. The complete name must fit the limit.
                idempotency_key:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: >-
                    Optional key to prevent duplicate copies when retrying a
                    request. Reuse it only with identical arguments. Different
                    arguments or a different operation return 422. Without a
                    key, every request creates a new copy.
                destination_lesson_id:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: >-
                    Destination lesson ID. Defaults to the source lesson. The
                    copy is placed at the end.
              additionalProperties: false
            example:
              name: Practice copy
              destination_lesson_id: LESSON_ID
      responses:
        '200':
          description: Successful request.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  lesson_id:
                    type: string
                  title:
                    type: string
                  position:
                    type: integer
                  action_type:
                    type: string
                    enum:
                      - basic
                      - input_text
                      - textarea
                      - link
                      - quiz
                      - post
                      - topic
                      - milestone
                      - file_upload
                      - form
                  is_published:
                    type: boolean
                  is_optional:
                    type: boolean
                  min_duration:
                    type: integer
                    nullable: true
                  max_duration:
                    type: integer
                    nullable: true
                  description:
                    type: string
                  form_description:
                    type: string
                  reviewer_ids:
                    type: array
                    items:
                      type: string
                  unlock_badge_id:
                    type: string
                    nullable: true
                  miscellaneous_permanent_action_type:
                    type: boolean
                    nullable: true
                  miscellaneous_link_action_type:
                    type: string
                    nullable: true
                  miscellaneous_input_text_action_type:
                    type: string
                    nullable: true
                  miscellaneous_textarea_action_type:
                    type: string
                    nullable: true
                  miscellaneous_post_action_type:
                    type: string
                    nullable: true
                  miscellaneous_topic_action_type:
                    type: string
                    nullable: true
                  miscellaneous_topic_title_option:
                    type: string
                    nullable: true
                  miscellaneous_milestone_requires_review_option:
                    type: boolean
                  miscellaneous_milestone_action_type:
                    type: string
                    nullable: true
                  miscellaneous_milestone_text_proof_label_option:
                    type: string
                    nullable: true
                  optional_topic_post_body_template:
                    type: string
                  miscellaneous_milestone_triggers_testimonial_toggle_option:
                    type: boolean
                    nullable: true
                  miscellaneous_milestone_triggers_testimonial_text_option:
                    type: string
                    nullable: true
                  miscellaneous_accept_rich_text_option:
                    type: boolean
                    nullable: true
                  miscellaneous_title_form:
                    type: string
                    nullable: true
                  miscellaneous_display_type_form:
                    type: string
                    nullable: true
                  quiz:
                    type: object
                    properties:
                      id:
                        type: string
                      title:
                        type: string
                      allow_retry:
                        type: boolean
                      passing_score:
                        type: integer
                      question_time_limit:
                        type: integer
                      randomize_questions:
                        type: boolean
                      randomize_answers:
                        type: boolean
                      show_correct_answers:
                        type: boolean
                      description:
                        type: string
                      questions:
                        type: array
                        items:
                          type: object
                          properties:
                            id:
                              type: string
                            title:
                              type: string
                              nullable: true
                            question_type:
                              type: string
                            position:
                              type: integer
                            order_layout:
                              type: string
                            render_answers_as_latex:
                              type: boolean
                            description:
                              type: string
                            solution:
                              type: string
                            answers:
                              type: array
                              items:
                                type: object
                                properties:
                                  id:
                                    type: string
                                  title:
                                    type: string
                                  is_correct:
                                    type: boolean
                                  solution_key:
                                    type: string
                                    nullable: true
                                  position:
                                    type: integer
                                required:
                                  - id
                                  - title
                                  - is_correct
                                  - solution_key
                                  - position
                          required:
                            - id
                            - title
                            - question_type
                            - position
                            - order_layout
                            - render_answers_as_latex
                            - description
                            - solution
                            - answers
                    required:
                      - id
                      - title
                      - allow_retry
                      - passing_score
                      - question_time_limit
                      - randomize_questions
                      - randomize_answers
                      - show_correct_answers
                      - description
                      - questions
                  fields:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        step_id:
                          type: string
                        title:
                          type: string
                          nullable: true
                        field_type:
                          type: string
                        position:
                          type: integer
                          nullable: true
                        required:
                          type: boolean
                        description:
                          type: string
                        custom_data:
                          type: object
                          nullable: true
                          additionalProperties: true
                        options:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                              value:
                                type: string
                              position:
                                type: integer
                            required:
                              - id
                              - value
                              - position
                      required:
                        - id
                        - step_id
                        - title
                        - field_type
                        - position
                        - required
                        - description
                        - custom_data
                        - options
                required:
                  - id
                  - lesson_id
                  - title
                  - position
                  - action_type
                  - is_published
                  - is_optional
                  - min_duration
                  - max_duration
              examples:
                basic:
                  value:
                    id: 00000000-0000-4000-8000-000000000002
                    lesson_id: 00000000-0000-4000-8000-000000000003
                    title: Steps HTTP basic
                    position: 2
                    action_type: basic
                    is_optional: true
                    is_published: true
                    min_duration: null
                    max_duration: null
                    description: >
                      <div class="trix-content lexxy-content"
                      data-controller="add-target-blank-to-links">
                        <p><strong>Imported</strong></p><!-- schoolmaker-lexxy-content -->
                      </div>
                    form_description: ''
                    reviewer_ids:
                      - 00000000-0000-4000-8000-000000000001
                    unlock_badge_id: null
                    miscellaneous_permanent_action_type: null
                    miscellaneous_link_action_type: null
                    miscellaneous_input_text_action_type: Fill the field below
                    miscellaneous_textarea_action_type: Fill the field below
                    miscellaneous_post_action_type: null
                    miscellaneous_topic_action_type: null
                    miscellaneous_topic_title_option: null
                    miscellaneous_milestone_requires_review_option: false
                    miscellaneous_milestone_action_type: file_upload
                    miscellaneous_milestone_text_proof_label_option: Fill the field below
                    optional_topic_post_body_template: ''
                    miscellaneous_milestone_triggers_testimonial_toggle_option: null
                    miscellaneous_milestone_triggers_testimonial_text_option: >
                      Congrats on reaching that big milestone! It's the perfect
                      time to leave a testimonial and tell us how you did it
                    miscellaneous_accept_rich_text_option: null
                    miscellaneous_title_form: null
                    miscellaneous_display_type_form: step_by_step
                quiz:
                  value:
                    id: 00000000-0000-4000-8000-000000000007
                    lesson_id: 00000000-0000-4000-8000-000000000006
                    title: Steps HTTP quiz
                    position: 10
                    action_type: quiz
                    is_optional: true
                    is_published: true
                    min_duration: null
                    max_duration: null
                    description: >
                      <div class="trix-content lexxy-content"
                      data-controller="add-target-blank-to-links">
                        <p><strong>Imported</strong></p><!-- schoolmaker-lexxy-content -->
                      </div>
                    form_description: ''
                    reviewer_ids:
                      - 00000000-0000-4000-8000-000000000001
                    unlock_badge_id: null
                    miscellaneous_permanent_action_type: null
                    miscellaneous_link_action_type: null
                    miscellaneous_input_text_action_type: Fill the field below
                    miscellaneous_textarea_action_type: Fill the field below
                    miscellaneous_post_action_type: null
                    miscellaneous_topic_action_type: null
                    miscellaneous_topic_title_option: null
                    miscellaneous_milestone_requires_review_option: false
                    miscellaneous_milestone_action_type: file_upload
                    miscellaneous_milestone_text_proof_label_option: Fill the field below
                    optional_topic_post_body_template: ''
                    miscellaneous_milestone_triggers_testimonial_toggle_option: null
                    miscellaneous_milestone_triggers_testimonial_text_option: >
                      Congrats on reaching that big milestone! It's the perfect
                      time to leave a testimonial and tell us how you did it
                    miscellaneous_accept_rich_text_option: null
                    miscellaneous_title_form: null
                    miscellaneous_display_type_form: step_by_step
                    quiz:
                      id: 00000000-0000-4000-8000-000000000002
                      title: Quiz
                      allow_retry: true
                      passing_score: 80
                      question_time_limit: 0
                      randomize_questions: true
                      randomize_answers: true
                      show_correct_answers: true
                      description: ''
                      questions:
                        - id: 00000000-0000-4000-8000-000000000003
                          title: Pick
                          question_type: multiple_choice
                          position: 1
                          order_layout: vertical
                          render_answers_as_latex: false
                          description: ''
                          solution: ''
                          answers:
                            - id: 00000000-0000-4000-8000-000000000004
                              title: 'Yes'
                              is_correct: true
                              solution_key: null
                              position: 0
                            - id: 00000000-0000-4000-8000-000000000005
                              title: 'No'
                              is_correct: false
                              solution_key: null
                              position: 0
                form:
                  value:
                    id: 00000000-0000-4000-8000-000000000003
                    lesson_id: 00000000-0000-4000-8000-000000000006
                    title: Steps HTTP form
                    position: 11
                    action_type: form
                    is_optional: true
                    is_published: true
                    min_duration: null
                    max_duration: null
                    description: >
                      <div class="trix-content lexxy-content"
                      data-controller="add-target-blank-to-links">
                        <p><strong>Imported</strong></p><!-- schoolmaker-lexxy-content -->
                      </div>
                    form_description: ''
                    reviewer_ids:
                      - 00000000-0000-4000-8000-000000000001
                    unlock_badge_id: null
                    miscellaneous_permanent_action_type: null
                    miscellaneous_link_action_type: null
                    miscellaneous_input_text_action_type: Fill the field below
                    miscellaneous_textarea_action_type: Fill the field below
                    miscellaneous_post_action_type: null
                    miscellaneous_topic_action_type: null
                    miscellaneous_topic_title_option: null
                    miscellaneous_milestone_requires_review_option: false
                    miscellaneous_milestone_action_type: file_upload
                    miscellaneous_milestone_text_proof_label_option: Fill the field below
                    optional_topic_post_body_template: ''
                    miscellaneous_milestone_triggers_testimonial_toggle_option: null
                    miscellaneous_milestone_triggers_testimonial_text_option: >
                      Congrats on reaching that big milestone! It's the perfect
                      time to leave a testimonial and tell us how you did it
                    miscellaneous_accept_rich_text_option: null
                    miscellaneous_title_form: null
                    miscellaneous_display_type_form: all
                    fields:
                      - id: 00000000-0000-4000-8000-000000000005
                        custom_data:
                          max_choices: 2
                        field_type: multiple_choice
                        position: 1
                        required: false
                        step_id: 00000000-0000-4000-8000-000000000003
                        title: Choice
                        description: ''
                        options:
                          - id: 00000000-0000-4000-8000-000000000002
                            value: One
                            position: 0
                          - id: 00000000-0000-4000-8000-000000000007
                            value: Two
                            position: 0
                      - id: 00000000-0000-4000-8000-000000000004
                        custom_data:
                          max_length: 30
                          min_length: 2
                        field_type: input_text
                        position: 2
                        required: false
                        step_id: 00000000-0000-4000-8000-000000000003
                        title: Text
                        description: ''
                        options: []
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    oneOf:
                      - type: string
                      - type: array
                        items:
                          type: string
              example:
                error: Access denied
        '404':
          description: Step not found.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    oneOf:
                      - type: string
                      - type: array
                        items:
                          type: string
              example:
                error: Record not found
        '422':
          description: Invalid request.
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    oneOf:
                      - type: string
                      - type: array
                        items:
                          type: string
              example:
                error: 'Invalid arguments: /attributes/position integer'
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````

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