Introduction

Use the Groups Backend API to create and manage groups on your site. To enable groups backend API functionality for your site, add the Wix Groups application to your site.

The following functionality is available via the wix-groups-backend API:

Group Roles

  • Site Admin: A site owner or site contributor with admin permissions.
  • Group Member: A site member belonging to a group.
  • Group Admin: A group member that was assigned the 'group admin' role by either the site admin, or another group admin. The creator of a group is automatically a group admin. The group admin has the same permissions as a site admin, but only for the specified group.

Group Privacy Levels

  • PUBLIC: Site visitors can see the group and its content in the list of groups. Site members can join the group.
  • PRIVATE: Site visitors can see the group in the list of groups, but only group admins and group members can see its content. Site members can request to join the group.
  • SECRET: Only group admins and group members can see the group and its content in the list of groups. Site members can only join if invited by group admins or group members.

Settings for Typical Use Cases

Site member wants to create a group

  • Site admins determine who can create a group. This setting can be found in your site's Dashboard under Groups Application > General Settings > Group Creation.
  • If set to site members with admin approval, site members can create a group using the createGroup() function, and the group becomes a createRequest with a status of PENDING. The site admin either approves or rejects the request to create a group.
  • If set to all site members, site members can create a group using the createGroup() function (no approval required).
  • If set to only admins, only site admins can create a group using the createGroup() function.
  • The default is set to site members with admin approval.
  • Note: If the suppressAuth option is set to true, all permissions are overwritten, and all site members can create a group.
  • When a group is created, the newly created group is added to the Groups List page of your site.

Site member wants to join a group

  • To join a group, a site member must have a public profile.
  • Group admins determine who can join their group by setting their Group Privacy Levels.
  • If a group's privacy level is set to PRIVATE, a site member can request to join the group on your site's Groups List page.
  • Only site admins or group admins can approve or reject site member requests to join the group, unless the group setting, membersCanApprove is set to true.
  • Note: If the suppressAuth option is set to true, all permissions are overwritten, and all site members (including non-group members) can approve or reject site member requests to join a group.
  • When a site member's request to join the group is approved, the member is added to the group.
  • If a group's privacy level is set to PUBLIC, a site member can join the group (no request necessary).
  • If a group's privacy level is set to SECRET, only site members added by an existing group member can join the group (no request necessary).

Group member wants to add a site member to their group

  • If a group's privacy level is set to SECRET, group admins or group members can add additional members to their group.
  • If a group's privacy level is set to PUBLIC or PRIVATE, group admins determine whether group members can add additional members to their group.
  • This setting can be found in your site's Dashboard under Groups Application > Your Group > Admin Tools > Member Permissions.
  • If set to all members, group members can add additional members to the group using the addGroupMembers() function (no approval required).
  • If set to admins only, only admins can add additional members to the group using the addGroupMembers() function.
  • The default is set to admins only.
  • Note: If the suppressAuth option is set to true, all permissions are overwritten and all site members (including non-group members) can add additional members to a group.

Permissions Information

Note: You can override the permissions below by setting the suppressAuth option to true.

ObjectFunctionsPermissions
CreateRequestsapproveCreateRequests(), listCreateRequests(), queryCreateRequests(), rejectCreateRequests()Site admin
GroupscreateGroup()Manage in your site's Dashboard
deleteGroup(), updateGroup()Site admin, group admin
listGroup(), getGroup(), queryGroup()For public & private groups: any site member
For secret groups: group members, site admin, group admin
JoinRequestsapproveJoinRequests(), listJoinRequests(), queryJoinRequests(), rejectJoinRequests()Site admin, group admin
MembersaddGroupMembers()Manage in your site's Dashboard
removeGroupMembers()Site admin, group admin
listGroupMembers(), queryGroupMembers()For public & private groups: any site member
For secret groups: group members, site admin
listMemberships(), queryMemberships()Site admin
RolesassignRole(), unassignRole()Site admin, group admin
Was this helpful?
Yes
No