> 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 # ChangeProgramInstructors # Package: onlinePrograms # Namespace: InstructorsService # Method link: https://dev.wix.com/docs/api-reference/business-management/online-programs/instructor-v2/change-program-instructors.md ## Permission Scopes: Manage Challenges: SCOPE.CHALLENGES.MANAGE ## Introduction Assigns or unassigns instructors to the program --- ## REST API ### Schema ``` Method: changeProgramInstructors Description: Assigns or unassigns instructors to the program URL: https://www.wixapis.com/v2/assignments 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: assignInstructorIds | type: array | description: IDs of instructors to assign param name: programId | type: programId | description: GUID of the program | required: true param name: unassignInstructorIds | type: array | description: IDs of instructors to unassign Return type: ChangeProgramInstructorsResponse EMPTY-OBJECT {} Possible Errors: HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: LIMIT_IS_REACHED | Description: none ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.onlinePrograms.InstructorsService.changeProgramInstructors(programId, options) Description: Assigns or unassigns instructors to the program # 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: options | type: ChangeProgramInstructorsOptions none - name: assignInstructorIds | type: array | description: IDs of instructors to assign - name: unassignInstructorIds | type: array | description: IDs of instructors to unassign - 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 {} Possible Errors: HTTP Code: 428 | Status Code: FAILED_PRECONDITION | Application Code: LIMIT_IS_REACHED | Description: none ``` ### Examples ### changeProgramInstructors ```javascript import { instructors } from '@wix/online-programs'; async function changeProgramInstructors(programId,options) { const response = await instructors.changeProgramInstructors(programId,options); }; ``` ### changeProgramInstructors (with elevated permissions) ```javascript import { instructors } from '@wix/online-programs'; import { auth } from '@wix/essentials'; async function myChangeProgramInstructorsMethod(programId,options) { const elevatedChangeProgramInstructors = auth.elevate(instructors.changeProgramInstructors); const response = await elevatedChangeProgramInstructors(programId,options); } ``` ### changeProgramInstructors (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 changeProgramInstructors(programId,options) { const response = await myWixClient.instructors.changeProgramInstructors(programId,options); }; ``` ---