sonet_group.create
Description
Creates a social network group using the API method CSocNetGroup::CreateGroup() and specifies the current user as the group owner.
Query:
https://mydomain.bitrix24.com/rest/sonet_group.create.json?auth=803f65e30340ff39703f8061c8b63a10&NAME=Test%20sonet%20group&VISIBLE=Y&OPENED=N&INITIATE_PERMS=K
Return:
{"result":11}
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):
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' });
© «Bitrix24», 2001-2024