Search.../

Introduction

The Groups API provides functionality for managing groups, including creating, deleting, updating, and querying groups.

Note: There is a new version of this API. If you're already using this module in your code, it will continue to work.

Settings for Typical Use Case

  • 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 name 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.

The Groups API provides functionality allowing you to:

Permissions Information

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

FunctionsPermissions
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

To use the Groups API, import groups from the wix-groups-backend module:

import { groups } from "wix-groups-backend";
javascript | Copy Code

Was this helpful?