> 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 # SearchTeam # Package: accounts # Namespace: RolesManagementService # Method link: https://dev.wix.com/docs/api-reference/account-level/user-management/accounts/users/search-team.md ## Introduction Retrieves a list of all team members of the requesting account with the specified filtering, sorting, and paging. > **Important**: This call requires an account level API key and can't be authenticated with the standard authorization header. API keys are currently available to selected beta users only. --- ## REST API ### Schema ``` Method: searchTeam Description: Retrieves a list of all team members of the requesting account with the specified filtering, sorting, and paging. > **Important**: This call requires an account level API key and can't be authenticated with the standard authorization header. API keys are currently available to selected beta users only. ## Filters When using filters for dates, you must use [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). ## See also To learn about working with *Search* methods, see [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language.md) and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging.md). URL: https://www.wixapis.com/roles-management/v3/team/search Method: POST Method parameters: param name: facets | type: array | description: Group data into categories (facets) and return the total count for each category. For example, use `facets` to aggregate search results by team member, invite status, or role. - enum: - Roles: Total team members with each role. - InviteStatus: Total team members by [invite](https://dev.wix.com/docs/rest/account-level/user-management/accounts/account-invites/account-invite-object.md). `status`. - Users: Total team members. param name: filter | type: filter | description: Filter object for narrowing search results. For example, to return only users with a specific role: `{"filter": {"roleId": "6600344420111308827"}}` See [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language.md) for more information. Supported values: `inviteType` and `roleId`. param name: orderBy | type: array | description: Field name and order to sort by. - name: fieldName | type: OrderField | description: Field to sort by. - enum: - Name: Team member name. - JoinedAt: Date team member joined the account. - name: direction | type: Direction | description: Sort order. - enum: - ASC: Ascending. - DESC: Descending. param name: paging | type: Paging - name: limit | type: integer | description: Number of items to load. - name: offset | type: integer | description: Number of items to skip in the current sort order. param name: query | type: query | description: Free text to match in searchable fields. For example, search for specific values in `name` or `email`. Return type: SearchTeamResponse - name: facets | type: array | description: Retrieved facets as specified in the request. - name: facetType | type: FacetType | description: Type of facet. - enum: - Roles: Total team members with each role. - InviteStatus: Total team members by [invite](https://dev.wix.com/docs/rest/account-level/user-management/accounts/account-invites/account-invite-object.md). `status`. - Users: Total team members. - name: values | type: array | description: Values and the amount of each. Values with a count of `0` aren't returned. - name: value | type: string | description: Supported values: `Roles`, `InviteStatus`, `Users`. - name: count | type: integer | description: Number of existing items for the `value`. - name: teamMembers | type: array | description: Retrieved team members and sent invites that match the search criteria specified in the request. Each file includes all standard `user` and `invite` information. - ONE-OF: - name: user | type: UserV3 | description: Existing team member data. - name: id | type: string | description: User GUID. - name: email | type: string | description: User's email address. - name: name | type: Name | description: User's name, when provided. - name: firstName | type: string | description: User's first name. - name: lastName | type: string | description: User's last name. - name: profileImage | type: string | description: URL to user's profile image, when provided. - name: joinedTeamAt | type: string | description: Date the user joined the team. - name: assignments | type: array | description: Mapping of the user's access to an asset and their assigned role. - name: policyId | type: string | description: Role assigned to the user. To retrieve all available roles, call Get Roles Info. - name: assignmentId | type: string | description: Unique GUID for this specific assignment. - name: restrictions | type: Restriction | description: The asset where a user is assigned access in an assignment. When empty, the role covers all assets, with no restrictions to specific sites or folders. - ONE-OF: - name: conditions | type: Conditions | description: List of conditions restricting the user's access. Currently only folder conditions are supported. - name: conditions | type: array | description: List of conditions. - name: conditionType | type: ConditionAttributeType | description: Condition type. - enum: UNKNOWN_CONDITION_TYPE, FOLDER - name: id | type: string | description: Condition GUID. - name: value | type: string | description: Expected value of the condition. When `conditionType` = "FOLDER", this is the folder path. - name: site | type: SiteRestriction | description: Site where the assignment restrictions apply. - name: id | type: string | description: Site GUID. - name: value | type: string | description: Site name. - name: locations | type: LocationsRestriction | description: Business locations where the assignment restrictions apply. Get location GUIDs from the [Locations API](https://dev.wix.com/docs/api-reference/business-management/locations/introduction.md). - name: ids | type: array | description: Location GUIDs where the assignment restrictions apply. - name: subject | type: AssignedSubject | description: Identity assigned to the asset in an assignment, referred to as subject. Supported subjects include user GUIDs, account GUIDs, and app GUIDs. - name: id | type: string | description: Identity GUID. - name: subjectType | type: SubjectType | description: Identity type. - enum: UNKNOWN, ACCOUNT, USER, USER_GROUP, MEMBER_GROUP, VISITOR_GROUP, EXTERNAL_APP, ACCOUNT_GROUP, WIX_APP - name: invite | type: InviteV3 | description: Invited team member data. - name: id | type: string | description: Invite GUID. - name: email | type: string | description: Invitee's email address. - name: status | type: InviteStatus | description: Invite status. - enum: Pending, Used, Deleted, Declined, Expired - name: acceptLink | type: string | description: URL of direct link to accept the invite. - name: dateCreated | type: string | description: Date the invite was created. - name: dateUpdated | type: string | description: Date the invite was last updated. - name: assignments | type: array | description: A list of assignments that will be applied to the invitees when they accept the invite. - name: policyId | type: string | description: Role GUID that will be assigned once the invite is accepted. - name: restrictions | type: Restriction | description: Assets where the user will be assigned access. When empty, the role covers all assets, with no restrictions to specific sites or folders. - name: expirationDate | type: string | description: Invite expiration date. ``` ### Examples ### Search for team members by filters ```curl curl -X POST \ 'https://www.wixapis.com/roles-management/v3/team/search' \ -H 'Content-Type: application/json' \ -H 'Authorization: ' \ -d '{ "filter": { "roleId": "6600344420111308827" } }' ``` --- ## JavaScript SDK ### Schema ``` Method: wixClientAdmin.accounts.RolesManagementService.searchTeam(options) Description: Retrieves a list of all team members of the requesting account with the specified filtering, sorting, and paging. > **Important**: This call requires an account level API key and can't be authenticated with the standard authorization header. API keys are currently available to selected beta users only. ## Filters When using filters for dates, you must use [UTC time](https://en.wikipedia.org/wiki/Coordinated_Universal_Time). ## See also To learn about working with *Search* methods, see [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language.md) and [Sorting and Paging](https://dev.wix.com/docs/rest/articles/get-started/sorting-and-paging.md). Method parameters: param name: options | type: SearchTeamOptions none - name: query | type: string | description: Free text to match in searchable fields. For example, search for specific values in `name` or `email`. - name: orderBy | type: array | description: Field name and order to sort by. - name: fieldName | type: OrderField | description: Field to sort by. - enum: - Name: Team member name. - JoinedAt: Date team member joined the account. - name: direction | type: Direction | description: Sort order. - enum: - ASC: Ascending. - DESC: Descending. - name: filter | type: object | description: Filter object for narrowing search results. For example, to return only users with a specific role: `{"filter": {"roleId": "6600344420111308827"}}` See [API Query Language](https://dev.wix.com/docs/rest/articles/get-started/api-query-language.md) for more information. Supported values: `inviteType` and `roleId`. - name: facets | type: array | description: Group data into categories (facets) and return the total count for each category. For example, use `facets` to aggregate search results by team member, invite status, or role. - enum: - Roles: Total team members with each role. - InviteStatus: Total team members by [invite](https://dev.wix.com/docs/rest/account-level/user-management/accounts/account-invites/account-invite-object.md). `status`. - Users: Total team members. - name: paging | type: Paging | description: Paging options. - name: limit | type: integer | description: Number of items to load. - name: offset | type: integer | description: Number of items to skip in the current sort order. Return type: PROMISE - name: facets | type: array | description: Retrieved facets as specified in the request. - name: facetType | type: FacetType | description: Type of facet. - enum: - Roles: Total team members with each role. - InviteStatus: Total team members by [invite](https://dev.wix.com/docs/rest/account-level/user-management/accounts/account-invites/account-invite-object.md). `status`. - Users: Total team members. - name: values | type: array | description: Values and the amount of each. Values with a count of `0` aren't returned. - name: value | type: string | description: Supported values: `Roles`, `InviteStatus`, `Users`. - name: count | type: integer | description: Number of existing items for the `value`. - name: teamMembers | type: array | description: Retrieved team members and sent invites that match the search criteria specified in the request. Each file includes all standard `user` and `invite` information. - ONE-OF: - name: user | type: UserV3 | description: Existing team member data. - name: _id | type: string | description: User GUID. - name: email | type: string | description: User's email address. - name: name | type: Name | description: User's name, when provided. - name: firstName | type: string | description: User's first name. - name: lastName | type: string | description: User's last name. - name: profileImage | type: string | description: URL to user's profile image, when provided. - name: joinedTeamAt | type: Date | description: Date the user joined the team. - name: assignments | type: array | description: Mapping of the user's access to an asset and their assigned role. - name: policyId | type: string | description: Role assigned to the user. To retrieve all available roles, call Get Roles Info. - name: assignmentId | type: string | description: Unique GUID for this specific assignment. - name: restrictions | type: Restriction | description: The asset where a user is assigned access in an assignment. When empty, the role covers all assets, with no restrictions to specific sites or folders. - ONE-OF: - name: conditions | type: Conditions | description: List of conditions restricting the user's access. Currently only folder conditions are supported. - name: conditions | type: array | description: List of conditions. - name: conditionType | type: ConditionAttributeType | description: Condition type. - enum: UNKNOWN_CONDITION_TYPE, FOLDER - name: _id | type: string | description: Condition GUID. - name: value | type: string | description: Expected value of the condition. When `conditionType` = "FOLDER", this is the folder path. - name: site | type: SiteRestriction | description: Site where the assignment restrictions apply. - name: _id | type: string | description: Site GUID. - name: value | type: string | description: Site name. - name: locations | type: LocationsRestriction | description: Business locations where the assignment restrictions apply. Get location GUIDs from the [Locations API](https://dev.wix.com/docs/api-reference/business-management/locations/introduction.md). - name: ids | type: array | description: Location GUIDs where the assignment restrictions apply. - name: subject | type: AssignedSubject | description: Identity assigned to the asset in an assignment, referred to as subject. Supported subjects include user GUIDs, account GUIDs, and app GUIDs. - name: _id | type: string | description: Identity GUID. - name: subjectType | type: SubjectType | description: Identity type. - enum: UNKNOWN, ACCOUNT, USER, USER_GROUP, MEMBER_GROUP, VISITOR_GROUP, EXTERNAL_APP, ACCOUNT_GROUP, WIX_APP - name: invite | type: InviteV3 | description: Invited team member data. - name: _id | type: string | description: Invite GUID. - name: email | type: string | description: Invitee's email address. - name: status | type: InviteStatus | description: Invite status. - enum: Pending, Used, Deleted, Declined, Expired - name: acceptLink | type: string | description: URL of direct link to accept the invite. - name: dateCreated | type: Date | description: Date the invite was created. - name: dateUpdated | type: Date | description: Date the invite was last updated. - name: assignments | type: array | description: A list of assignments that will be applied to the invitees when they accept the invite. - name: policyId | type: string | description: Role GUID that will be assigned once the invite is accepted. - name: restrictions | type: Restriction | description: Assets where the user will be assigned access. When empty, the role covers all assets, with no restrictions to specific sites or folders. - name: expirationDate | type: Date | description: Invite expiration date. ``` ### Examples ### Get account team members 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 searchTeam(options) { const response = await users.searchTeam(options); } ``` ### searchTeam (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 searchTeam(options) { const response = await myWixClient.users.searchTeam(options); }; ``` ---