Get information about the workgroup socialnetwork.api.workgroup.get

Scope: socialnetwork

Who can execute the method: any user

The method socialnetwork.api.workgroup.get returns information about a workgroup, project, scrum, or collaboration by its identifier. An administrator can retrieve information about any group on the account, even if it is secret and they are not a member.

Method parameters

Required parameters are marked with *

Name type

Description

params* object

Request parameters to retrieve the group

Parameter params

Required parameters are marked with *

Name type

Description

groupId* integer

Group identifier. The value for this field can be obtained using the method sonet_group.get

select array

List of additional fields to extract, returned in result

mode string

Request mode. Can only take the value mobile, which allows obtaining additional data in the array result[ADDITIONAL_DATA]

Parameter params[select]

ACTIONS

Available operations for the current user on the group

AVATAR

URL of the group's compressed user avatar

AVATAR_DATA

Information about the group's avatar

AVATAR_TYPES

Types of avatars for groups

COUNTERS

Number of pending requests and invitations to join the group

DATE_CREATE

Date and time of group creation in a more readable format

DEPARTMENTS

Departments of employees added to the group

EFFICIENCY

Group efficiency

FEATURES

Available tools in the group specified in the advanced group settings

GROUP_MEMBERS_LIST

List of active group members, invited users, and users awaiting confirmation to join the group

LIST_OF_MEMBERS

List of group members with information about them

LIST_OF_MEMBERS_AWAITING_INVITE

Users awaiting confirmation to join the group

OWNER_DATA

Data about the group owner

PIN

Whether the group is pinned by the current user on the groups and projects page. Returned as result[IS_PIN]

PRIVACY_TYPE

Privacy level of the group. Returned as result[PRIVACY_CODE]

SUBJECT_DATA

Information about the group's subject specified in the advanced group settings

TAGS

Group tags specified in the advanced group settings

USER_DATA

Data about the current user's role in the group

Example

curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"params":{"groupId":622,"select":["DEPARTMENTS","TAGS"]}}' \
        https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/socialnetwork.api.workgroup.get
        
curl -X POST \
        -H "Content-Type: application/json" \
        -H "Accept: application/json" \
        -d '{"params":{"groupId":622,"select":["DEPARTMENTS","TAGS"]},"auth":"**put_access_token_here**"}' \
        https://**put_your_bitrix24_address**/rest/socialnetwork.api.workgroup.get
        
try
        {
        	const response = await $b24.callMethod(
        		'socialnetwork.api.workgroup.get',
        		{
        			params: {
        				groupId: 622,
        				select: [ 'DEPARTMENTS', 'TAGS' ],
        			},
        		}
        	);
        	
        	const result = response.getData().result;
        	console.log(result);
        }
        catch( error )
        {
        	console.error('Error:', error);
        }
        
try {
            $response = $b24Service
                ->core
                ->call(
                    'socialnetwork.api.workgroup.get',
                    [
                        'params' => [
                            'groupId' => 622,
                            'select'  => [ 'DEPARTMENTS', 'TAGS' ],
                        ],
                    ]
                );
        
            $result = $response
                ->getResponseData()
                ->getResult();
        
            echo 'Success: ' . print_r($result, true);
        
        } catch (Throwable $e) {
            error_log($e->getMessage());
            echo 'Error getting workgroup info: ' . $e->getMessage();
        }
        
BX24.callMethod('socialnetwork.api.workgroup.get', {
            params: {
                groupId: 622,
                select: [ 'DEPARTMENTS', 'TAGS' ],
            },
        }, result => {
            console.log(result);
        });
        
require_once('crest.php');
        
        $result = CRest::call(
            'socialnetwork.api.workgroup.get',
            [
                'params' => [
                    'groupId' => 622,
                    'select' => ['DEPARTMENTS', 'TAGS']
                ]
            ]
        );
        
        echo '<PRE>';
        print_r($result);
        echo '</PRE>';
        

How to Use Examples in Documentation

Response handling

HTTP status: 200

{
            "result": {
                "ID": 622,
                "ACTIVE": "Y",
                "SITE_ID": "s1",
                "SUBJECT_ID": 1,
                "NAME": "Group for demonstrating the method",
                "DESCRIPTION": "First line of group description\r\nSecond line of group description",
                "KEYWORDS": "group tag, another group tag",
                "CLOSED": "N",
                "VISIBLE": "Y",
                "OPENED": "N",
                "DATE_CREATE": "04/17/2025 19:37:55",
                "DATE_UPDATE": "04/17/2025 19:40:48",
                "DATE_ACTIVITY": "04/17/2025 19:40:48",
                "IMAGE_ID": 0,
                "AVATAR_TYPE": "folder",
                "OWNER_ID": 1,
                "INITIATE_PERMS": "K",
                "NUMBER_OF_MEMBERS": 1,
                "NUMBER_OF_MODERATORS": 1,
                "PROJECT": "N",
                "PROJECT_DATE_START": null,
                "PROJECT_DATE_FINISH": null,
                "SEARCH_INDEX": "Group for demonstrating the method First line of group description\r\nSecond line of group description group tag #group tag another group tag #another group tag group@example.com",
                "LANDING": "N",
                "SCRUM_OWNER_ID": 0,
                "SCRUM_SPRINT_DURATION": 0,
                "SCRUM_TASK_RESPONSIBLE": "",
                "TYPE": "group",
                "MEMBERS": [
                    1,
                    10,
                    20
                ],
                "CHAT_ID": 1034,
                "DIALOG_ID": "chat1034",
                "ORDINARY_MEMBERS": [
                    10
                ],
                "INVITED_MEMBERS": [
                    38
                ],
                "MODERATOR_MEMBERS": [
                    20
                ],
                "SITE_IDS": [
                    "s1"
                ],
                "TAGS": [
                    "another group tag",
                    "group tag"
                ],
                "DEPARTMENTS": [
                    8
                ],
                "NUMBER_OF_MEMBERS_PLURAL": 0
            },
            "time": {
                "start": 1744908074.244266,
                "finish": 1744908074.279072,
                "duration": 0.034806013107299805,
                "processing": 0.010703086853027344,
                "date_start": "2025-04-17T19:41:14+02:00",
                "date_finish": "2025-04-17T19:41:14+02:00",
                "operating_reset_at": 1744908674,
                "operating": 0
            }
        }
        

Returned data

Name type

Description

result object

Result of the request execution

time time

Information about the request execution time

Key result

Name type

Description

ID integer

Group identifier

ACTIVE boolean

Flag Y/N - whether the group is active. The group can be activated or deactivated using the method sonet_group.update

SITE_ID string

Identifier of the site to which the group belongs

SUBJECT_ID integer

Identifier of the group's subject. The subject of the group is specified in the advanced group settings

NAME string

Group name

DESCRIPTION text

Group description

KEYWORDS string

Group tags separated by commas: tag1,tag2

CLOSED boolean

Flag Y/N - whether the group is archived

VISIBLE boolean

Flag Y/N - whether the group is visible in the group list

OPENED boolean

Flag Y/N - whether the group is open

DATE_CREATE string

Date of group creation in the format DD.MM.YYYY hh:mm:ss. If the key DATE_CREATE is requested in select, the date is returned in a more readable format, for example:

  • today, 12:16
  • yesterday, 14:42
  • April 15 14:42, if the group was created this year
  • June 11, 2024 15:08, if the group was created in a different year

DATE_UPDATE string

Date of group update in the format DD.MM.YYYY hh:mm:ss

DATE_ACTIVITY string

Date of last activity in the group in the format DD.MM.YYYY hh:mm:ss

IMAGE_ID integer

Identifier of the group's user avatar in the b_file table. 0 if a system image is used as an avatar

AVATAR_TYPE string

Type of the last set system avatar:

  • folder - folder avatar
  • checks - checkbox avatar
  • pie - pie chart avatar
  • bag - briefcase avatar
  • members - silhouettes avatar
  • "" - other system avatar

OWNER_ID user

Identifier of the group owner

INITIATE_PERMS enum

Who has the right to invite users to the group:

  • A - only the group owner
  • E - group owner and group moderators
  • K - all group members

NUMBER_OF_MEMBERS integer

Number of group members

NUMBER_OF_MODERATORS integer

Number of group moderators

PROJECT boolean

Flag Y/N - whether the group is a project

PROJECT_DATE_START any

Project start date in the format DD.MM.YYYY hh:mm:ss. null if not specified

PROJECT_DATE_FINISH any

Project end date in the format DD.MM.YYYY hh:mm:ss. null if not specified

SEARCH_INDEX string

Index, keywords for searching the group

LANDING boolean

Flag Y/N - whether the group is a publication group

SCRUM_MASTER_ID integer

Identifier of the scrum master. 0 if the group is not a scrum

SCRUM_SPRINT_DURATION integer

Duration of the scrum sprint in seconds. 0 if the group is not a scrum

SCRUM_TASK_RESPONSIBLE string

Default assignee when creating tasks:

  • A - creator
  • M - scrum master
  • "" - group is not a scrum

TYPE enum

Type of group:

  • group - group
  • project - project
  • scrum - scrum
  • collab - collaboration

MEMBERS array

Identifiers of group members

CHAT_ID integer

Identifier of the group chat

DIALOG_ID string

Identifier of the group dialog

ORDINARY_MEMBERS array

Array of identifiers of group users who are not owners or moderators

INVITED_MEMBERS array

Array of identifiers of portal users who were invited to the group but have not yet accepted

MODERATOR_MEMBERS array

Array of identifiers of group members with the role of moderator

SITE_IDS array

List of identifiers of sites to which the group belongs

AVATAR string

URL of the group's compressed user avatar. "" if no user avatar is set

AVATAR_TYPES object

Object containing group avatars:

  • AVATAR_TYPE[avatar_id][sort] integer - avatar sorting
  • AVATAR_TYPE[avatar_id][mobileUrl] string - URL for displaying the avatar in the mobile app
  • AVATAR_TYPE[avatar_id][webCssClass] string - CSS class of the avatar
  • AVATAR_TYPE[avatar_id][entitySelectorUrl] string - Entity selector URL

AVATAR_DATA object

Information about the group's avatar:

  • AVATAR_DATA[type] string - type of avatar:
    • icon - system avatar
    • image - user image
  • AVATAR_DATA[id] string - identifier of the avatar:
    • folder - folder avatar
    • tasks - checkbox avatar
    • chart - pie chart avatar
    • briefcase - briefcase avatar
    • group - silhouettes avatar
    • "" - other system avatar
    • URL - link to the compressed user avatar if set

OWNER_DATA object

Information about the group owner:

  • OWNER_DATA[ID] user - identifier of the group owner
  • OWNER_DATA[PHOTO] string - URL of the owner's compressed avatar
  • OWNER_DATA[FORMATTED_NAME] string - formatted name of the group owner according to account settings

SUBJECT_DATA object

Information about the group's subject specified in the advanced group settings:

  • SUBJECT_DATA[ID] integer - subject identifier
  • SUBJECT_DATA[NAME] string - name of the subject

TAGS array

Group tags, similar to KEYWORDS, but in array format

ACTIONS object

Data about available operations for the current user on the group:

  • ACTIONS[EDIT] boolean - Value true/false - whether editing the group is available
  • ACTIONS[DELETE] boolean - Value true/false - whether deleting the group is available
  • ACTIONS[INVITE] boolean - Value true/false - whether inviting external participants to the group is available
  • ACTIONS[JOIN] boolean - Value true/false - whether the user can join the group
  • ACTIONS[LEAVE] boolean - Value true/false - whether the user can leave the group
  • ACTIONS[FOLLOW] boolean - Value true/false - whether the user can subscribe to group updates
  • ACTIONS[PIN] boolean - Value true/false - whether pinning the group is available
  • ACTIONS[EDIT_FEATURES] boolean - Value true/false - whether changing the group's features is available

USER_DATA object

Information about the current user regarding the group:

  • USER_DATA[ROLE] any - user's role in the group:
    • A - group owner
    • E - group moderator
    • K - group participant
    • Z - awaiting entry
    • false - value is absent
  • USER_DATA[INITIATED_BY_TYPE] any - who initiated the user's connection with the group:
    • U - by the user, for example, the user sent a request to join the group
    • G - by the group, for example, the user was invited
    • false - value is absent
  • USER_DATA[IS_SUBSCRIBED] boolean - Value true/false - whether the user is subscribed to group updates

DEPARTMENTS array

Array of identifiers of departments added to the group

IS_PIN boolean

Value true/false - whether the group is pinned by the current user on the groups and projects page

PRIVACY_CODE string

Privacy level of the group:

  • open - open group
  • closed - closed group
  • secret - secret group

LIST_OF_MEMBERS object

Array with information about group users:

  • LIST_OF_MEMBERS[0][id] user - user identifier
  • LIST_OF_MEMBERS[0][isOwner] boolean - Value true/false - whether the user is the group owner
  • LIST_OF_MEMBERS[0][isModerator] boolean - Value true/false - whether the user is a moderator
  • LIST_OF_MEMBERS[0][isScrumMaster] boolean - Value true/false - whether the user is a scrum master (in case of scrum groups)
  • LIST_OF_MEMBERS[0][isAutoMember] boolean - Value true/false - whether the user was added to the group automatically (without invitation)
  • LIST_OF_MEMBERS[0][name] string - user's first name
  • LIST_OF_MEMBERS[0][lastName] string - user's last name
  • LIST_OF_MEMBERS[0][position] string - user's position
  • LIST_OF_MEMBERS[0][photo] string - URL of the user's compressed avatar

FEATURES object

Array with information about the group's features:

  • FEATURES[0][featureName] string - symbolic identifier of the feature
  • FEATURES[0][name] string - name of the feature
  • FEATURES[0][customName] string - custom name of the feature in the advanced group settings
  • FEATURES[0][id] string - numeric identifier of the feature
  • FEATURES[0][active] boolean - Value true / false - whether the feature is enabled in the group

LIST_OF_MEMBERS_AWAITING_INVITE object

Information about users awaiting confirmation to join the group:

  • LIST_OF_MEMBERS_AWAITING_INVITE[0][id] user - user identifier
  • LIST_OF_MEMBERS_AWAITING_INVITE[0][name] string - formatted name according to account settings
  • LIST_OF_MEMBERS_AWAITING_INVITE[0][photo] string - URL of the user's compressed avatar

GROUP_MEMBERS_LIST object

Information about users associated with the group:

  • GROUP_MEMBERS_LIST[0][id] user - participant identifier
  • GROUP_MEMBERS_LIST[0][invited] boolean - Value true/false - whether the user was invited
  • GROUP_MEMBERS_LIST[0][isAwaiting] boolean - Value true/false - whether the user is awaiting acceptance into the group
  • GROUP_MEMBERS_LIST[0][isMember] boolean - Value true/false - whether the user is a member of the group

COUNTERS object

Counters:

  • COUNTERS[workgroup_requests_out] integer - current number of pending invitations to the group
  • COUNTERS[workgroup_requests_in] integer - current number of requests to join the group

EFFICIENCY integer

Group efficiency

ADDITIONAL_DATA object

Additional data for the current user:

  • ADDITIONAL_DATA[ROLE] string - role of the current user in the group:
    • A - group owner
    • E - group moderator
    • K - group participant
    • Z - awaiting entry
    • "" - user has no relation to the group
  • ADDITIONAL_DATA[INITIATED_BY_TYPE] string - who initiated the user's connection with the group:
    • U - by the user, for example, the user sent a request to join the group
    • G - by the group, for example, the user was invited
    • "" - user has no relation to the group

Error handling

HTTP status: 400

{
            "error": "SONET_CONTROLLER_WORKGROUP_EMPTY",
            "error_description": "No value for the workgroup ID was provided."
        }
        

Name
type

Description

error
string

String error code. It may consist of digits, Latin letters, and underscores

error_description
error_description

Textual description of the error. The description is not intended to be shown to the end user in its raw form

Possible error codes

Code

Description

Status

SONET_CONTROLLER_WORKGROUP_EMPTY

The parameter groupId was not provided in the params array

400

SONET_CONTROLLER_WORKGROUP_NOT_FOUND

The group with identifier params[groupId] was not found or the current user does not have access to it

400

Statuses and System Error Codes

HTTP Status: 20x, 40x, 50x

The errors described below may occur when calling any method.

Status

Code
Error Message

Description

500

INTERNAL_SERVER_ERROR
Internal server error

An internal server error has occurred, please contact the server administrator or Bitrix24 technical support

500

ERROR_UNEXPECTED_ANSWER
Server returned an unexpected response

An internal server error has occurred, please contact the server administrator or Bitrix24 technical support

503

QUERY_LIMIT_EXCEEDED
Too many requests

The request intensity limit has been exceeded

405

ERROR_BATCH_METHOD_NOT_ALLOWED
Method is not allowed for batch usage

The current method is not allowed to be called using batch

400

ERROR_BATCH_LENGTH_EXCEEDED
Max batch length exceeded

The maximum length of parameters passed to the batch method has been exceeded

401

NO_AUTH_FOUND
Wrong authorization data

Invalid access token or webhook code

400

INVALID_REQUEST
Https required

The methods must be called using the HTTPS protocol

503

OVERLOAD_LIMIT
REST API is blocked due to overload

The REST API is blocked due to overload. This is a manual individual block, to remove it you need to contact Bitrix24 technical support

403

ACCESS_DENIED
REST API is available only on commercial plans

The REST API is available only on commercial plans

403

INVALID_CREDENTIALS
Invalid request credentials

The user whose access token or webhook was used to call the method lacks permissions

404

ERROR_MANIFEST_IS_NOT_AVAILABLE
Manifest is not available

The manifest is not available

403

insufficient_scope
The request requires higher privileges than provided by the webhook token

The request requires higher privileges than those provided by the webhook token

401

expired_token
The access token provided has expired

The provided access token has expired

403

user_access_error
The user does not have access to the application

The user does not have access to the application. This means that the application is installed, but the account administrator has allowed access to this application only for specific users

500

PORTAL_DELETED
Portal was deleted

The public part of the site is closed. To open the public part of the site on an on-premise installation, disable the option "Temporary closure of the public part of the site". Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site