Creates a social network group using the API method CSocNetGroup::CreateGroup() and specifies the current user as the group owner.





Parameter Description Available from version
arFields Array of new group parameters. Permissible array keys:
NAME - group name (required field),
DESCRIPTION - group description,
VISIBLE - Y/N flag, defines group visibility in the group list,
OPENED - Y/N flag defines if the group is open to be joined,
KEYWORDS - keywords,
INITIATE_PERMS - specifies, if the user has access permission to invite users into the group (required field):
  • A - group owner only,
  • E - group owner and moderators,
  • K - all group members.

CLOSED - Y/N flag - defines if the group is archived,
SPAM_PERMS - defines who has the access permission to send messages to group (required field): SONET_ROLES_OWNER - group owner only, SONET_ROLES_MODERATOR - group owner and moderators, SONET_ROLES_USER - all group members, SONET_ROLES_ALL - all users.
PROJECT Y/N. Defines if the group is classified as project or not. It is not a project by default. (Starting from version 18.0.0)
PROJECT_DATE_FINISH Defines project finish date. (Available from version 18.0.0)
PROJECT_DATE_START Defines the project start. (Available from version 18.0.0)
bAutoSubscribe Autosubscription to the created topic. Optional parameter. Returns true by default. 10.0.0

On successfully created group, returns its ID, otherwise returns error description.

Note: Creating extranet groups via REST API is not yet available.


// Create visible and open social network group with the name 'Test sonet group', with the access permission for all current group members to invite new group members.

BX24.callMethod('sonet_group.create', {
	'NAME': 'Test sonet group',
	'VISIBLE': 'Y',
	'OPENED': 'N',

© «Bitrix24», 2001-2022