> 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

# DeleteProgram

# Package: onlinePrograms

# Namespace: ProgramsService

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

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

## Introduction

Deletes a program.

Deleting a program permanently removes it from the program list, cancels its
scheduled end task, removes related member groups, and removes it from search.

---

## REST API

### Schema

```
 Method: deleteProgram
 Description: Deletes a program.  Deleting a program permanently removes it from the program list, cancels its scheduled end task, removes related member groups, and removes it from search.
 URL: https://www.wixapis.com/online-programs/v3/programs/{programId}
 Method: DELETE
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  programId
 Method parameters: 
   param name: programId | type:   none | required: true 
 Return type: DeleteProgramResponse
  EMPTY-OBJECT {}


```

### Examples

### Delete a program
Permanently deletes a program.

```curl
curl -X DELETE \
'https://www.wixapis.com/online-programs/v3/programs/8f6f3f3d-2c3b-4f8c-9e4a-1a5d2e0f7c11' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.onlinePrograms.programs.deleteProgram(programId)
 Description: Deletes a program.  Deleting a program permanently removes it from the program list, cancels its scheduled end task, removes related member groups, and removes it from search.
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  programId
 Method parameters: 
   param name: programId | type: string | description: GUID of the program to delete. | required: true | validation: format GUID
 Return type: PROMISE<DeleteProgramResponse>
  EMPTY-OBJECT {}


```

### Examples

### deleteProgram
```javascript
import { programs } from '@wix/online-programs';

async function deleteProgram(programId) {
  const response = await programs.deleteProgram(programId);
};
```

### deleteProgram (with elevated permissions)
```javascript
import { programs } from '@wix/online-programs';
import { auth } from '@wix/essentials';

async function myDeleteProgramMethod(programId) {
  const elevatedDeleteProgram = auth.elevate(programs.deleteProgram);
  const response = await elevatedDeleteProgram(programId);
}
```

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

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


async function deleteProgram(programId) {
  const response = await myWixClient.programs.deleteProgram(programId);
};
```

---