Setup

To use the MembershipQuestions API, install the @wix/groups package using npm or Yarn:

Copy
1
npm install @wix/groups

or

Copy
1
yarn add @wix/groups

Then import { membershipQuestions } from @wix/groups:

Copy
1
import { membershipQuestions } from '@wix/groups'
Was this helpful?
Yes
No

createOrReplaceAllMembershipQuestions( )

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Creates membership questions if none have been set up. Otherwise, replaces all existing questions.

Notes:

  • Only admins can create or replace membership questions.
  • Providing an empty array means that members won't have to answer any question when joining the group.

Note: This endpoint requires visitor or member authentication.

Copy
function createOrReplaceAllMembershipQuestions(groupId: string, options: CreateOrReplaceAllMembershipQuestionsOptions): Promise<CreateOrReplaceAllMembershipQuestionsResponse>
Method Parameters
groupIdstringRequired
Group ID.

optionsCreateOrReplaceAllMembershipQuestionsOptions
Returns
Return Type:Promise<CreateOrReplaceAllMembershipQuestionsResponse>
Was this helpful?
Yes
No

listAnswers( )

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves the answers to the membership questions, given the provided filters.

Note: This endpoint requires visitor or member authentication.

Copy
function listAnswers(groupId: string, options: ListAnswersOptions): Promise<ListAnswersResponse>
Method Parameters
groupIdstringRequired
Group ID.

optionsListAnswersOptions
Returns
Return Type:Promise<ListAnswersResponse>
Was this helpful?
Yes
No

listMembershipQuestions( )

Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Retrieves the membership questions for the given group.

Note: This endpoint requires visitor or member authentication.

Copy
function listMembershipQuestions(groupId: string): Promise<ListMembershipQuestionsResponse>
Method Parameters
groupIdstringRequired
Group ID.
Returns
Return Type:Promise<ListMembershipQuestionsResponse>
Was this helpful?
Yes
No