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:
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.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.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.createGroup()
function (no approval required).createGroup()
function.suppressAuth
option is set to true
, all permissions are overwritten, and all site members can create a group.PRIVATE
, a site member can request to join the group on your site's Groups List page.membersCanApprove
is set to true
.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.PUBLIC
, a site member can join the group (no request necessary).SECRET
, only site members added by an existing group member can join the group (no request necessary).SECRET
, group admins or group members can add additional members to their group.PUBLIC
or PRIVATE
, group admins determine whether group members can add additional members to their group.addGroupMembers()
function (no approval required).addGroupMembers()
function.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.Note: You can override the permissions below by setting the suppressAuth
option to true
.
Object | Functions | Permissions |
---|---|---|
CreateRequests | approveCreateRequests() , listCreateRequests() , queryCreateRequests() , rejectCreateRequests() | Site admin |
Groups | createGroup() | 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 | |
JoinRequests | approveJoinRequests() , listJoinRequests() , queryJoinRequests() , rejectJoinRequests() | Site admin, group admin |
Members | addGroupMembers() | 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 | |
Roles | assignRole() , unassignRole() | Site admin, group admin |