Documentation

sonet_group.create

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



Parameters

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.

Example

// 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',
	'INITIATE_PERMS': 'K'
});

Request:

https://mydomain.bitrix24.com/rest/sonet_group.create.json?auth=803f65e30340ff39703f8061c8b63a10&NAME=Test%20sonet%20group&VISIBLE=Y&OPENED=N&INITIATE_PERMS=K

Response:

{"result":11}


User Comments

User comments are not part of official documentation. Use information provided by other users in the comments at your own risk.

The User Comments section is not to be used as a feature discussion board. Only registered users can post comments. Your comment will be visible once it has been approved by the moderator.
© «Bitrix Inc.», 2001-2021, «Bitrix Inc.», 2021