> 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 # RemoveMember # Package: accounts # Namespace: RolesManagementService # Method link: https://dev.wix.com/docs/api-reference/account-level/user-management/accounts/users/remove-member.md ## Permission Scopes: Manage Team Members: SCOPE.IDENTITY.MANAGE-TEAM-MEMBERS ## Introduction Removes a team member from the requesting account. > **Important**: This call requires an account level API key and cannot be authenticated with the standard authorization header. API keys are currently available to selected beta users only. --- ## REST API ### Schema ``` Method: removeMember Description: Removes a team member from the requesting account. > **Important**: This call requires an account level API key and cannot be authenticated with the standard authorization header. API keys are currently available to selected beta users only. URL: https://www.wixapis.com/roles-management/team/remove Method: POST # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: userId Method parameters: param name: userId | type: userId | description: User GUID of the team member to remove. | required: true Return type: RemoveMemberResponse EMPTY-OBJECT {} ``` ### Examples ### Remove team member for account ```curl curl -X POST \ 'https://www.wixapis.com/roles-management/team/remove' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "userId": "fed9597b-00a1-4bd6-0000-aff2ec248e7a" }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.accounts.RolesManagementService.removeMember(userId) Description: Removes a team member from the requesting account. > **Important**: This call requires an account level API key and cannot be authenticated with the standard authorization header. API keys are currently available to selected beta users only. # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present. Required parameters: userId Method parameters: param name: userId | type: string | description: User GUID of the team member to remove. | required: true Return type: PROMISE EMPTY-OBJECT {} ``` ### Examples ### Remove a team member from an account with an API key ```javascript import { createClient, ApiKeyStrategy } from "@wix/sdk"; import { users } from "@wix/user-management"; const wixClient = createClient({ modules: { users }, auth: ApiKeyStrategy({ apiKey: "MY-API-KEY", }), }); async function removeMember(userId) { const response = await users.removeMember(userId); } ``` ### removeMember (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 { users } from '@wix/user-management'; // Import the auth strategy for the relevant access type // Import the relevant host module if needed const myWixClient = createClient ({ modules: { users }, // Include the auth strategy and host as relevant }); async function removeMember(userId) { const response = await myWixClient.users.removeMember(userId); }; ``` ---