> 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

# DeleteSection

# Package: onlinePrograms

# Namespace: SectionsService

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

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

## Introduction

Permanently deletes a section from the public API.

Deleted sections aren't returned by standard retrieval and list methods. The public API doesn't expose trash-bin or restore operations.

---

## REST API

### Schema

```
 Method: deleteSection
 Description: Permanently deletes a section from the public API.  Deleted sections aren't returned by standard retrieval and list methods. The public API doesn't expose trash-bin or restore operations.
 URL: https://www.wixapis.com/online-programs/v3/sections/{sectionId}
 Method: DELETE
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  sectionId
 Method parameters: 
   param name: sectionId | type:   none | required: true 
 Return type: DeleteSectionResponse
  EMPTY-OBJECT {}


```

### Examples

### Delete a section
Permanently deletes a section from the public API.

```curl
curl -X DELETE \
'https://www.wixapis.com/online-programs/v3/sections/3b2734ad-62c9-4def-987f-5539533f7abc' \
-H 'Authorization: <AUTH>' \
-H 'Content-Type: application/json'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.onlinePrograms.sections.deleteSection(sectionId)
 Description: Permanently deletes a section from the public API.  Deleted sections aren't returned by standard retrieval and list methods. The public API doesn't expose trash-bin or restore operations.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  sectionId
 Method parameters: 
   param name: sectionId | type: string | description: GUID of the section to delete. | required: true | validation: format GUID
 Return type: PROMISE<DeleteSectionResponse>
  EMPTY-OBJECT {}


```

### Examples

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

async function deleteSection() {
  await sections.deleteSection("3b2734ad-62c9-4def-987f-5539533f7abc");
}

/* Promise resolves to: undefined */

```

### deleteSection (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 { sections } from '@wix/online-programs';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

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


async function deleteSection(sectionId) {
  const response = await myWixClient.sections.deleteSection(sectionId);
};
```

---