Retrieve Data on Workgroup socialnetwork.api.workgroup.get
Choose a tool for developing with an AI agent:
- use Alaio Vibecode to build an app for Bitrix24 from a task description without knowing any programming language. The agent writes the code and deploys the app to a server, with no manual hosting setup
- use the MCP server to develop a REST API integration in your own project. The agent refers to the official REST documentation
Scope:
socialnetworkWho can execute the method: any user
The method socialnetwork.api.workgroup.get returns information about a workgroup, project, scrum, or collaboration based on the 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 |
Description |
|
params* |
Request parameters for retrieving the group. More details below |
Parameter params
Required parameters are marked with *
|
Name |
Description |
|
groupId* |
Group identifier. The value for this field can be obtained using the method sonet_group.get |
|
select |
List of additional fields to retrieve, returned in |
|
mode |
Request mode. Can only take the value |
Parameter select
|
Name |
Description |
|
ACTIONS |
Operations available to 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 unaccepted 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 their information |
|
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 for the current user on the groups and projects page. Returned as |
|
PRIVACY_TYPE |
Group privacy level. Returned as |
|
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 |
Code Examples
How to Use Examples in Documentation
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
// This snippet is an ES module: top-level await requires type="module" or a bundler.
// $b24 is an already-initialized SDK instance (see the SDK "Get started" guide).
import { Text } from '@bitrix24/b24jssdk'
import type { B24Frame } from '@bitrix24/b24jssdk'
declare const $b24: B24Frame
// Shape of the payload returned in result (match the "response handling" section of the page)
type WorkgroupGetResult = {
ID: number
ACTIVE: string
NAME: string
DESCRIPTION: string
CLOSED: string
VISIBLE: string
OPENED: string
DATE_CREATE: string
DATE_UPDATE: string
DATE_ACTIVITY: string
AVATAR_TYPE: string
OWNER_ID: number
INITIATE_PERMS: string
NUMBER_OF_MEMBERS: number
NUMBER_OF_MODERATORS: number
PROJECT: string
PROJECT_DATE_START: string | null
PROJECT_DATE_FINISH: string | null
TYPE: string
MEMBERS: number[]
CHAT_ID: number
DIALOG_ID: string
ORDINARY_MEMBERS: number[]
INVITED_MEMBERS: number[]
MODERATOR_MEMBERS: number[]
SITE_IDS: string[]
TAGS: string[]
DEPARTMENTS: number[]
}
try {
const response = await $b24.actions.v2.call.make<WorkgroupGetResult>({
method: 'socialnetwork.api.workgroup.get',
params: {
params: {
groupId: 622,
select: ['DEPARTMENTS', 'TAGS'],
},
},
requestId: Text.getUuidRfc4122()
})
// The payload is available only on a successful response
if (!response.isSuccess) {
console.error(response.getErrorMessages().join('; '))
} else {
const result = response.getData()!.result
console.info(result.ID, result.NAME, result.TYPE, result.TAGS, result.DEPARTMENTS)
}
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
<!-- Load the SDK (UMD build); it is exposed as the global B24Js -->
<script src="https://unpkg.com/@bitrix24/b24jssdk@1/dist/umd/index.min.js"></script>
<script>
async function getWorkgroup() {
try {
// Initialize the SDK inside a Bitrix24 frame
const $b24 = await B24Js.initializeB24Frame()
const response = await $b24.actions.v2.call.make({
method: 'socialnetwork.api.workgroup.get',
params: {
params: {
groupId: 622,
select: ['DEPARTMENTS', 'TAGS'],
},
},
requestId: B24Js.Text.getUuidRfc4122()
})
// The payload is available only on a successful response
if (!response.isSuccess) {
console.error(response.getErrorMessages().join('; '))
return
}
const result = response.getData().result
console.info(result.ID, result.NAME, result.TYPE, result.TAGS, result.DEPARTMENTS)
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
}
document.addEventListener('DOMContentLoaded', getWorkgroup)
</script>
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
try:
bitrix_response = client.socialnetwork.api.workgroup.get(
params={
"groupId": 622,
"select": [
"DEPARTMENTS",
"TAGS",
],
},
).response
result = bitrix_response.result
print(result)
except BitrixAPIError as error:
print(
"Bitrix API error",
f"error: {error.error}",
f"error_description: {error.error_description}",
sep="\n",
)
except BitrixSDKException as error:
print(f"Bitrix SDK error: {error.message}")
except Exception as error:
print(f"Unexpected 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>';
// client and ctx are already created — see the Go SDK section
res, err := client.Core().Call(ctx, "socialnetwork.api.workgroup.get", b24.Params{
"params": b24.Params{
"groupId": 622,
"select": []string{"DEPARTMENTS", "TAGS"},
},
}, b24.WithIdempotent())
if err != nil {
return fmt.Errorf("socialnetwork.api.workgroup.get: %w", err)
}
var item struct {
ID b24.ID `json:"ID"`
Active string `json:"ACTIVE"`
SiteID string `json:"SITE_ID"`
SubjectID b24.ID `json:"SUBJECT_ID"`
Name string `json:"NAME"`
Description string `json:"DESCRIPTION"`
}
if err := json.Unmarshal(res.Result, &item); err != nil {
return fmt.Errorf("parse response: %w", err)
}
fmt.Println(item.ID, item.Active)
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 the group description\r\nSecond line of the 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 the group description\r\nSecond line of the 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 |
Description |
|
result |
Result of the request execution. More details below |
|
time |
Information about the request execution time |
Key result
|
Name |
Description |
|
ID |
Group identifier |
|
ACTIVE |
Flag |
|
SITE_ID |
Identifier of the site to which the group belongs |
|
SUBJECT_ID |
Identifier of the group's subject. The subject of the group is specified in the advanced group settings |
|
NAME |
Group name |
|
DESCRIPTION |
Group description |
|
KEYWORDS |
Group tags separated by commas: |
|
CLOSED |
Flag |
|
VISIBLE |
Flag |
|
OPENED |
Flag |
|
DATE_CREATE |
Date of group creation in the format
|
|
DATE_UPDATE |
Date of group update in the format |
|
DATE_ACTIVITY |
Date of last activity in the group in the format |
|
IMAGE_ID |
Identifier of the group's user avatar in the |
|
AVATAR_TYPE |
Type of the last set system avatar:
|
|
OWNER_ID |
Identifier of the group owner |
|
INITIATE_PERMS |
Who has the right to invite users to the group:
|
|
NUMBER_OF_MEMBERS |
Number of group members |
|
NUMBER_OF_MODERATORS |
Number of group moderators |
|
PROJECT |
Flag |
|
PROJECT_DATE_START |
Project start date in the format |
|
PROJECT_DATE_FINISH |
Project end date in the format |
|
SEARCH_INDEX |
Index, keywords for searching the group |
|
LANDING |
Flag |
|
SCRUM_MASTER_ID |
Identifier of the scrum master. |
|
SCRUM_SPRINT_DURATION |
Duration of the scrum sprint in seconds. |
|
SCRUM_TASK_RESPONSIBLE |
Default executor when assigning tasks:
|
|
TYPE |
Type of group:
|
|
MEMBERS |
Identifiers of group members |
|
CHAT_ID |
Identifier of the group chat |
|
DIALOG_ID |
Identifier of the group dialog |
|
ORDINARY_MEMBERS |
Array of user identifiers in the group who are not owners or moderators |
|
INVITED_MEMBERS |
Array of portal user identifiers who have been invited to the group but have not yet accepted |
|
MODERATOR_MEMBERS |
Array of group member identifiers with the role of moderator |
|
SITE_IDS |
List of site identifiers to which the group belongs |
|
AVATAR |
URL of the group's compressed user avatar. |
|
AVATAR_TYPES |
Object containing group avatars (detailed description) |
|
AVATAR_DATA |
Information about the group's avatar (detailed description) |
|
OWNER_DATA |
Information about the group owner (detailed description) |
|
SUBJECT_DATA |
Information about the group's subject specified in the advanced group settings (detailed description) |
|
TAGS |
Group tags, similar to |
|
ACTIONS |
Data about operations available to the current user on the group (detailed description) |
|
USER_DATA |
Information about the current user regarding the group (detailed description) |
|
DEPARTMENTS |
Array of identifiers of departments added to the group |
|
IS_PIN |
Value |
|
PRIVACY_CODE |
Group privacy level:
|
|
LIST_OF_MEMBERS |
Array with information about group users (detailed description) |
|
FEATURES |
Array with information about group tools (detailed description) |
|
LIST_OF_MEMBERS_AWAITING_INVITE |
Information about users awaiting confirmation to join the group (detailed description) |
|
GROUP_MEMBERS_LIST |
Information about users associated with the group (detailed description) |
|
COUNTERS |
Counters (detailed description) |
|
EFFICIENCY |
Group efficiency |
|
ADDITIONAL_DATA |
Additional data for the current user (detailed description) |
Object AVATAR_TYPES
|
Name |
Description |
|
sort |
Avatar sorting |
|
mobileUrl |
URL for displaying the avatar in the mobile application |
|
webCssClass |
CSS class of the avatar |
|
entitySelectorUrl |
URL of the avatar for entity selector |
Object AVATAR_DATA
|
Name |
Description |
|
type |
Type of avatar:
|
|
id |
Identifier of the avatar:
|
Object OWNER_DATA
|
Name |
Description |
|
ID |
Identifier of the group owner |
|
PHOTO |
URL of the compressed avatar of the group owner |
|
FORMATTED_NAME |
Formatted name of the group owner according to portal settings |
Object SUBJECT_DATA
|
Name |
Description |
|
ID |
Identifier of the subject |
|
NAME |
Name of the subject |
Object ACTIONS
|
Name |
Description |
|
EDIT |
Value |
|
DELETE |
Value |
|
INVITE |
Value |
|
JOIN |
Value |
|
LEAVE |
Value |
|
FOLLOW |
Value |
|
PIN |
Value |
|
EDIT_FEATURES |
Value |
Object USER_DATA
|
Name |
Description |
|
ROLE |
User's role in the group:
|
|
INITIATED_BY_TYPE |
Who initiated the user's connection to the group:
|
|
IS_SUBSCRIBED |
Value |
Object LIST_OF_MEMBERS
|
Name |
Description |
|
id |
User identifier |
|
isOwner |
Value |
|
isModerator |
Value |
|
isScrumMaster |
Value |
|
isAutoMember |
Value |
|
name |
User's first name |
|
lastName |
User's last name |
|
position |
User's position |
|
photo |
URL of the user's compressed avatar |
Object FEATURES
|
Name |
Description |
|
featureName |
Symbolic identifier of the tool |
|
name |
Name of the tool |
|
customName |
Custom name of the tool in the advanced group settings |
|
id |
Numeric identifier of the tool |
|
active |
Value |
Object LIST_OF_MEMBERS_AWAITING_INVITE
|
Name |
Description |
|
id |
User identifier |
|
name |
Formatted name according to portal settings |
|
photo |
URL of the user's compressed avatar |
Object GROUP_MEMBERS_LIST
|
Name |
Description |
|
id |
Member identifier |
|
invited |
Value |
|
isAwaiting |
Value |
|
isMember |
Value |
Object COUNTERS
|
Name |
Description |
|
workgroup_requests_out |
Current number of unaccepted invitations to the group |
|
workgroup_requests_in |
Current number of requests to join the group |
Object ADDITIONAL_DATA
|
Name |
Description |
|
ROLE |
Current user's role in the group:
|
|
INITIATED_BY_TYPE |
Who initiated the user's connection to the group:
|
Error Handling
HTTP Code: 400
{
"error": "SONET_CONTROLLER_WORKGROUP_EMPTY",
"error_description": "No value for the workgroup ID was provided."
}
|
Name |
Description |
|
error |
String error code. It consists of digits, Latin letters, and underscores. It may arrive empty — in that case only |
|
error_description |
Error message for the developer. Do not show it to the end user without processing |
Possible Error Codes
|
Code |
Description |
Value |
|
|
|
The |
|
|
|
The group with identifier |
Statuses and System Error Codes
HTTP Status: 4xx, 5xx
The errors described below are returned by the REST API itself, not by the logic of a specific method. They can arrive in response to any method.
|
Status |
Code |
Description |
|
|
|
An internal server error has occurred. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support |
|
|
|
The server returned an unexpected response. Retry the call, and if the error persists, contact the server administrator or Bitrix24 technical support |
|
|
|
The request intensity limit has been exceeded |
|
|
|
The method is blocked because the request resource intensity limit has been exceeded. The block is lifted automatically once the accumulated execution time of the method no longer exceeds the limit |
|
|
|
The request contains no authorization data: neither an access token nor a webhook code was passed |
|
|
|
Methods are called over the HTTPS protocol only |
|
|
|
The REST API is blocked due to overload. This is a manual individual block. To have it lifted, contact Bitrix24 technical support |
|
|
|
REST API access is not active for this account. In Bitrix24 Cloud, check the current plan or trial status: Vibe+ plans include REST API access, while Essentials plans do not. A webhook receives a different error message — |
|
|
|
No active webhook with the specified user identifier and secret code was found |
|
|
|
No method with this name was found. The name is misspelled, the method does not exist in the REST API, or it is unavailable without the required scope |
|
|
|
The request requires broader permissions than the token has: for a webhook these are the permissions granted to it, for an application it is the scope. For an application, the error message ends with |
|
|
|
The access token has expired |
|
|
|
The application is installed, but the Bitrix24 administrator has granted access to it only to specific users |
|
|
|
The public part of the site is closed. To open it on an on-premise installation, disable the "Temporary closure of the public part of the site" option. Path to the setting: Desktop > Settings > Product Settings > Module Settings > Main Module > Temporary closure of the public part of the site |