> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# CreateStep

# Package: onlinePrograms

# Namespace: StepsService

# Method link: https://dev.wix.com/docs/api-reference/business-management/online-programs/steps/create-step.md

## Permission Scopes:
Manage Online Programs: SCOPE.CHALLENGES.MANAGE

## Introduction

Creates a step.

Specify the parent section in `step.sectionId`.
The service derives the parent program automatically.
To create a quiz step, create or clone the quiz separately, then specify its ID in `step.quizOptions.id`.

To create multiple steps in a single API call, call [BulkCreateSteps](https://dev.wix.com/docs/api-reference/business-management/online-programs/steps/bulk-create-steps.md).

---

## REST API

### Schema

```
 Method: createStep
 Description: Creates a step.  Specify the parent section in `step.sectionId`. The service derives the parent program automatically. To create a quiz step, create or clone the quiz separately, then specify its GUID in `step.quizOptions.id`.  To create multiple steps in a single API call, call [BulkCreateSteps](https://dev.wix.com/docs/api-reference/business-management/online-programs/steps/bulk-create-steps.md).
 URL: https://www.wixapis.com/online-programs/v3/steps
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  step, step.sectionId
 Method parameters: 
   param name: step | type: Step | description: A step represents a piece of program content within a section. A step can contain article, video, or quiz content. | required: true 
    - ONE-OF: - required: true
     - name: videoOptions | type: VideoOptions | description: Video-specific settings.  
        - ONE-OF: 
           - name: wixVideo | type: WixVideo | description: Video from Wix Video.  
              - name: id | type: string | description: Wix Video GUID.  | validation: format GUID
              - name: paid | type: boolean | description: Whether the Wix Video is paid content.  
           - name: video | type: VideoV2 | description: Video uploaded with Media Manager.  
              - name: id | type: string | description: WixMedia GUID.  
        - name: requiredCompletionPercentage | type: number | description: Completion percentage stored on this step. The Wix web participant page uses the program's `videoStepsSettings.requiredCompletionPercentage` for all video steps.  
        - name: coverImage | type: Image | description: Cover image for the video.  
           - name: id | type: string | description: WixMedia image GUID.  
           - name: url | type: string | description: Image URL.  
           - name: altText | type: string | description: Image alt text.  
        - name: durationInMilliseconds | type: integer | description: Video duration in milliseconds.  | validation: format int32
        - name: deleted | type: boolean | description: Whether the uploaded video was deleted from Media Manager.  
     - name: quizOptions | type: QuizOptions | description: Quiz-specific settings.  
        - name: passingGrade | type: number | description: Minimum percentage required to pass the quiz.  | validation: format double
        - name: sectionId | type: string | description: Parent section GUID. To move a step within a section or to another section, call `MoveStep`. | required: true | read-only: true | validation: format GUID
        - name: description | type: Description | description: Step title, rich text content, and optional media.  
           - name: title | type: string | description:   | validation: maxLength 250
           - name: details | type: string | description:   | validation: maxLength 1000000
        - name: ordering | type: number | description: Step position within the section.  
        - name: stepType | type: StepType | description: Type of content in the step.  
             - enum:
             -     ARTICLE: Text-based step.
             -     VIDEO: Step with video content.
             -     QUIZ: Step linked to a quiz.
        - name: extendedFields | type: ExtendedFields | description: Custom field data for the step object.  
           - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
 Return type: CreateStepResponse
  - name: step | type: Step | description: Created step.  
     - ONE-OF: 
        - name: videoOptions | type: VideoOptions | description: Video-specific settings.  
           - ONE-OF: 
              - name: wixVideo | type: WixVideo | description: Video from Wix Video.  
                 - name: id | type: string | description: Wix Video GUID.  | validation: format GUID
                 - name: paid | type: boolean | description: Whether the Wix Video is paid content.  
              - name: video | type: VideoV2 | description: Video uploaded with Media Manager.  
                 - name: id | type: string | description: WixMedia GUID.  
                 - name: resolutions | type: array<VideoResolution> | description: Available resolutions for the video, starting with the optimal resolution.  | read-only: true | validation: maxItems 100
                    - name: url | type: string | description: Video URL.  
                    - name: height | type: integer | description: Video height.  
                    - name: width | type: integer | description: Video width.  
                    - name: format | type: string | description: Video format for example, mp4, hls.  
                 - name: filename | type: string | description: Video filename.  | read-only: true 
           - name: requiredCompletionPercentage | type: number | description: Completion percentage stored on this step. The Wix web participant page uses the program's `videoStepsSettings.requiredCompletionPercentage` for all video steps.  
           - name: coverImage | type: Image | description: Cover image for the video.  
              - name: id | type: string | description: WixMedia image GUID.  
              - name: url | type: string | description: Image URL.  
              - name: height | type: integer | description: Original image height.  | read-only: true 
              - name: width | type: integer | description: Original image width.  | read-only: true 
              - name: altText | type: string | description: Image alt text.  
              - name: filename | type: string | description: Image filename.  | read-only: true 
           - name: durationInMilliseconds | type: integer | description: Video duration in milliseconds.  | validation: format int32
           - name: deleted | type: boolean | description: Whether the uploaded video was deleted from Media Manager.  
        - name: quizOptions | type: QuizOptions | description: Quiz-specific settings.  
           - name: id | type: string | description: Quiz GUID. Provide it when creating a quiz step. After creation, the quiz reference can't be changed.  | read-only: true | validation: format GUID, immutable
           - name: totalQuestions | type: integer | description: Total number of questions in the quiz.  | read-only: true 
           - name: passingGrade | type: number | description: Minimum percentage required to pass the quiz.  | validation: format double
     - name: id | type: string | description: Step GUID.  | read-only: true | validation: format GUID
     - name: revision | type: string | description: Revision number, which increments by 1 each time the step is updated. To prevent conflicting changes, the current `revision` must be passed when updating the step.  | read-only: true | validation: format int64
     - name: createdDate | type: string | description: Date and time the step was created.  | read-only: true | validation: format date-time
     - name: updatedDate | type: string | description: Date and time the step was updated.  | read-only: true | validation: format date-time
     - name: sectionId | type: string | description: Parent section GUID. To move a step within a section or to another section, call `MoveStep`.  | read-only: true | validation: format GUID
     - name: description | type: Description | description: Step title, rich text content, and optional media.  
        - name: title | type: string | description:   | validation: maxLength 250
        - name: details | type: string | description:   | validation: maxLength 1000000
     - name: ordering | type: number | description: Step position within the section.  
     - name: stepType | type: StepType | description: Type of content in the step.  
         - enum:
         -     ARTICLE: Text-based step.
         -     VIDEO: Step with video content.
         -     QUIZ: Step linked to a quiz.
     - name: extendedFields | type: ExtendedFields | description: Custom field data for the step object.  
        - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
     - name: programId | type: string | description: Program GUID.  | read-only: true | validation: format GUID

 Possible Errors:
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: QUIZ_SITE_LIMIT_REACHED | Description: The site has reached its maximum number of quiz steps.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: STEP_PROGRAM_LIMIT_REACHED | Description: The program has reached its maximum number of steps.


```

### Examples

### Create a step
Creates an article step in a program section.

```curl
curl -X POST \
'https://www.wixapis.com/online-programs/v3/steps' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "step": {
    "sectionId": "b142d26b-2c56-4b85-9f8d-6bea0920eb4d",
    "description": {
      "title": "Welcome to week 1",
      "details": "{\"nodes\":[{\"type\":\"PARAGRAPH\",\"id\":\"yyovb1\",\"nodes\":[{\"type\":\"TEXT\",\"id\":\"\",\"nodes\":[],\"textData\":{\"text\":\"Review the weekly plan and complete the first assignment.\",\"decorations\":[]}}],\"paragraphData\":{\"textStyle\":{\"textAlignment\":\"AUTO\"}}}],\"metadata\":{\"version\":1,\"createdTimestamp\":\"2026-08-18T09:50:12.557Z\",\"updatedTimestamp\":\"2026-08-18T09:50:12.557Z\",\"id\":\"58274b83-13b8-486c-b28f-ab65667ef0bf\"}}"
    },
    "stepType": "ARTICLE"
  }
}'
```

### Create a video step
Creates a video step in a program section. Set `videoOptions.wixVideo.id` to the ID of a video in your Wix Video library.

```curl
curl -X POST \
'https://www.wixapis.com/online-programs/v3/steps' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json' \
-d '{
  "step": {
    "sectionId": "b142d26b-2c56-4b85-9f8d-6bea0920eb4d",
    "description": {
      "title": "Watch the introduction"
    },
    "stepType": "VIDEO",
    "videoOptions": {
      "wixVideo": {
        "id": "63e30343-cf23-47da-8bde-1d764b2c6e18",
        "paid": false
      },
      "requiredCompletionPercentage": 80
    }
  }
}'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.onlinePrograms.steps.createStep(step)
 Description: Creates a step.  Specify the parent section in `step.sectionId`. The service derives the parent program automatically. To create a quiz step, create or clone the quiz separately, then specify its GUID in `step.quizOptions.id`.  To create multiple steps in a single API call, call [BulkCreateSteps](https://dev.wix.com/docs/api-reference/business-management/online-programs/steps/bulk-create-steps.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  step, step.sectionId
 Method parameters: 
   param name: step | type: Step | description: A step represents a piece of program content within a section. A step can contain article, video, or quiz content. | required: true 
    - ONE-OF: - required: true
     - name: videoOptions | type: VideoOptions | description: Video-specific settings.  
        - ONE-OF: 
           - name: wixVideo | type: WixVideo | description: Video from Wix Video.  
              - name: _id | type: string | description: Wix Video GUID.  | validation: format GUID
              - name: paid | type: boolean | description: Whether the Wix Video is paid content.  
           - name: video | type: string | description: Video uploaded with Media Manager.  
        - name: requiredCompletionPercentage | type: number | description: Completion percentage stored on this step. The Wix web participant page uses the program's `videoStepsSettings.requiredCompletionPercentage` for all video steps.  
        - name: coverImage | type: string | description: Cover image for the video.  
        - name: durationInMilliseconds | type: integer | description: Video duration in milliseconds.  | validation: format int32
        - name: deleted | type: boolean | description: Whether the uploaded video was deleted from Media Manager.  
     - name: quizOptions | type: QuizOptions | description: Quiz-specific settings.  
        - name: passingGrade | type: number | description: Minimum percentage required to pass the quiz.  
        - name: sectionId | type: string | description: Parent section GUID. To move a step within a section or to another section, call `MoveStep`. | required: true | read-only: true | validation: format GUID
        - name: description | type: Description | description: Step title, rich text content, and optional media.  
           - name: title | type: string | description:   | validation: maxLength 250
           - name: details | type: string | description:   | validation: maxLength 1000000
        - name: ordering | type: number | description: Step position within the section.  
        - name: stepType | type: StepType | description: Type of content in the step.  
             - enum:
             -     ARTICLE: Text-based step.
             -     VIDEO: Step with video content.
             -     QUIZ: Step linked to a quiz.
        - name: extendedFields | type: ExtendedFields | description: Custom field data for the step object.  
           - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
 Return type: PROMISE<Step>
  - ONE-OF: 
     - name: videoOptions | type: VideoOptions | description: Video-specific settings.  
        - ONE-OF: 
           - name: wixVideo | type: WixVideo | description: Video from Wix Video.  
              - name: _id | type: string | description: Wix Video GUID.  | validation: format GUID
              - name: paid | type: boolean | description: Whether the Wix Video is paid content.  
           - name: video | type: string | description: Video uploaded with Media Manager.  
        - name: requiredCompletionPercentage | type: number | description: Completion percentage stored on this step. The Wix web participant page uses the program's `videoStepsSettings.requiredCompletionPercentage` for all video steps.  
        - name: coverImage | type: string | description: Cover image for the video.  
        - name: durationInMilliseconds | type: integer | description: Video duration in milliseconds.  | validation: format int32
        - name: deleted | type: boolean | description: Whether the uploaded video was deleted from Media Manager.  
     - name: quizOptions | type: QuizOptions | description: Quiz-specific settings.  
        - name: _id | type: string | description: Quiz GUID. Provide it when creating a quiz step. After creation, the quiz reference can't be changed.  | read-only: true | validation: format GUID, immutable
        - name: totalQuestions | type: integer | description: Total number of questions in the quiz.  | read-only: true 
        - name: passingGrade | type: number | description: Minimum percentage required to pass the quiz.  
  - name: _id | type: string | description: Step GUID.  | read-only: true | validation: format GUID
  - name: revision | type: string | description: Revision number, which increments by 1 each time the step is updated. To prevent conflicting changes, the current `revision` must be passed when updating the step.  | read-only: true | validation: format int64
  - name: _createdDate | type: Date | description: Date and time the step was created.  | read-only: true 
  - name: _updatedDate | type: Date | description: Date and time the step was updated.  | read-only: true 
  - name: sectionId | type: string | description: Parent section GUID. To move a step within a section or to another section, call `MoveStep`.  | read-only: true | validation: format GUID
  - name: description | type: Description | description: Step title, rich text content, and optional media.  
     - name: title | type: string | description:   | validation: maxLength 250
     - name: details | type: string | description:   | validation: maxLength 1000000
  - name: ordering | type: number | description: Step position within the section.  
  - name: stepType | type: StepType | description: Type of content in the step.  
     - enum:
     -     ARTICLE: Text-based step.
     -     VIDEO: Step with video content.
     -     QUIZ: Step linked to a quiz.
  - name: extendedFields | type: ExtendedFields | description: Custom field data for the step object.  
     - name: namespaces | type: object | description: Extended field data. Each key corresponds to the namespace of the app that created the extended fields. The value of each key is structured according to the schema defined when the extended fields were configured.  You can only access fields for which you have the appropriate permissions.  Learn more about [extended fields](https://dev.wix.com/docs/rest/articles/getting-started/extended-fields.md).  | validation: format map
  - name: programId | type: string | description: Program GUID.  | read-only: true | validation: format GUID

 Possible Errors:
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: QUIZ_SITE_LIMIT_REACHED | Description: The site has reached its maximum number of quiz steps.
   HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: STEP_PROGRAM_LIMIT_REACHED | Description: The program has reached its maximum number of steps.


```

### Examples

### Create a video step
```javascript
import { steps } from "@wix/online-programs";

const createdStep = await steps.createStep({
  sectionId: "b142d26b-2c56-4b85-9f8d-6bea0920eb4d",
  description: {
    title: "Watch the introduction",
  },
  stepType: "VIDEO",
  videoOptions: {
    wixVideo: {
      _id: "63e30343-cf23-47da-8bde-1d764b2c6e18",
      paid: false,
    },
    requiredCompletionPercentage: 80,
  },
});

```

### Create an article step
```javascript
import { steps } from "@wix/online-programs";
import { fromPlainText } from "@wix/ricos";

// `details` must be a JSON string of Ricos rich content, not plain text.
const details = JSON.stringify(
  fromPlainText("Review the weekly plan and complete the first assignment."),
);

const createdStep = await steps.createStep({
  sectionId: "b142d26b-2c56-4b85-9f8d-6bea0920eb4d",
  description: {
    title: "Welcome to week 1",
    details,
  },
  stepType: "ARTICLE",
});

```

### createStep (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { steps } from '@wix/online-programs';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { steps },
  // Include the auth strategy and host as relevant
});


async function createStep(step) {
  const response = await myWixClient.steps.createStep(step);
};
```

---