> 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 # UnassignInstructorFromProgram # Package: onlinePrograms # Namespace: InstructorsService # Method link: https://dev.wix.com/docs/api-reference/business-management/online-programs/instructor-v2/unassign-instructor-from-program.md ## Permission Scopes: Manage Challenges: SCOPE.CHALLENGES.MANAGE ## Introduction Unassigns an instructor from the program --- ## REST API ### Schema ``` Method: unassignInstructorFromProgram Description: Unassigns an instructor from the program URL: https://www.wixapis.com/v2/instructors/{instructorId}/unassign Method: POST # 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: actionId | type: actionId | description: trace id used by BI. param name: programId | type: programId | description: GUID of the program | required: true Return type: UnassignInstructorFromProgramResponse EMPTY-OBJECT {} ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.onlinePrograms.InstructorsService.unassignInstructorFromProgram(instructorId, programId, options) Description: Unassigns an instructor from the program # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: instructorId, programId Method parameters: param name: instructorId | type: string | description: GUID of the instructor to unassign | required: true param name: options | type: UnassignInstructorFromProgramOptions none - name: actionId | type: string | description: trace id used by BI. param name: programId | type: string | description: GUID of the program | required: true Return type: PROMISE EMPTY-OBJECT {} ``` ### Examples ### unassignInstructorFromProgram ```javascript import { instructors } from '@wix/online-programs'; async function unassignInstructorFromProgram(instructorId,programId,options) { const response = await instructors.unassignInstructorFromProgram(instructorId,programId,options); }; ``` ### unassignInstructorFromProgram (with elevated permissions) ```javascript import { instructors } from '@wix/online-programs'; import { auth } from '@wix/essentials'; async function myUnassignInstructorFromProgramMethod(instructorId,programId,options) { const elevatedUnassignInstructorFromProgram = auth.elevate(instructors.unassignInstructorFromProgram); const response = await elevatedUnassignInstructorFromProgram(instructorId,programId,options); } ``` ### unassignInstructorFromProgram (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 { instructors } from '@wix/online-programs'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { instructors }, // Include the auth strategy and host as relevant }); async function unassignInstructorFromProgram(instructorId,programId,options) { const response = await myWixClient.instructors.unassignInstructorFromProgram(instructorId,programId,options); }; ``` ---