> 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`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# DeleteStep

# Package: onlinePrograms

# Namespace: StepsService

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

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

## Introduction

Deletes a step from active program content.

The public API doesn't provide a restore flow for deleted steps.

If the deleted step is the last step that references a quiz, the quiz is also deleted.

---

## REST API

### Schema

```
 Method: deleteStep
 Description: Deletes a step from active program content.  The public API doesn't provide a restore flow for deleted steps.  If the deleted step is the last step that references a quiz, the quiz is also deleted.
 URL: https://www.wixapis.com/online-programs/v3/steps/{stepId}
 Method: DELETE
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  stepId
 Method parameters: 
   param name: stepId | type:   none | required: true 
 Return type: DeleteStepResponse
  EMPTY-OBJECT {}


```

### Examples

### Delete a step
Deletes a step by ID.

```curl
curl -X DELETE \
'https://www.wixapis.com/online-programs/v3/steps/c5f91a8e-1e8b-4f6f-9da2-2d715874e91c' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.onlinePrograms.steps.deleteStep(stepId)
 Description: Deletes a step from active program content.  The public API doesn't provide a restore flow for deleted steps.  If the deleted step is the last step that references a quiz, the quiz is also deleted.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  stepId
 Method parameters: 
   param name: stepId | type: string | description: Step GUID. | required: true | validation: format GUID
 Return type: PROMISE<DeleteStepResponse>
  EMPTY-OBJECT {}


```

### Examples

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

await steps.deleteStep("c5f91a8e-1e8b-4f6f-9da2-2d715874e91c");

```

### deleteStep (self-hosted)
Self-hosted 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 deleteStep(stepId) {
  const response = await myWixClient.steps.deleteStep(stepId);
};
```

---