Get a List of Workgroups socialnetwork.api.workgroup.list
If you are developing integrations for Bitrix24 using AI tools (Codex, Claude Code, Cursor), connect to the MCP server so that the assistant can utilize the official REST documentation.
Scope:
socialnetworkWho can execute the method: any user
The method socialnetwork.api.workgroup.list returns a list of workgroups, projects, scrums, and collaborations based on the current user's permissions.
Method Parameters
Required parameters are marked with *
|
Name |
Description |
|
filter |
An object for filtering in the format See below for the list of available fields for filtering. An additional prefix can be specified for the key to clarify the filter's behavior. Possible prefix values:
If The method also always adds a filter by site:
|
|
select |
An array containing the list of fields to select. See below for the list of available fields for selection. If the parameter is not passed or is empty, only |
|
order |
A sorting object in the format Possible values for Possible values for
|
|
params |
Additional request parameters |
|
start |
Pagination parameter. The page size for results is 50 records. To get the second page, pass Formula: If |
Available Fields for Filtering
|
Name |
Description |
|
ID |
Group identifier |
|
NAME |
Group name |
|
OWNER_ID |
Owner identifier |
|
ACTIVE |
Group activity status: |
|
VISIBLE |
Group visibility in the general list: |
|
OPENED |
Is the group open for free membership: |
|
CLOSED |
Is the group archived: |
|
PROJECT |
Object type: |
|
SUBJECT_ID |
Group subject identifier |
|
SITE_ID |
Group site identifier |
|
DATE_CREATE |
Group creation date |
|
DATE_UPDATE |
Group modification date |
|
DATE_ACTIVITY |
Last activity date |
Available Fields for Selection
|
Name |
Description |
|
ID |
Group identifier |
|
ACTIVE |
Group activity status |
|
SUBJECT_ID |
Group subject identifier |
|
NAME |
Group name |
|
DESCRIPTION |
Group description |
|
KEYWORDS |
Group keywords |
|
CLOSED |
Archive group status |
|
VISIBLE |
Group visibility status |
|
OPENED |
Open group status |
|
PROJECT |
Project status |
|
LANDING |
Group for publication status |
|
DATE_CREATE |
Creation date |
|
DATE_UPDATE |
Modification date |
|
DATE_ACTIVITY |
Last activity date |
|
IMAGE_ID |
User avatar identifier |
|
AVATAR_TYPE |
System avatar type |
|
OWNER_ID |
Owner identifier |
|
NUMBER_OF_MEMBERS |
Number of participants |
|
NUMBER_OF_MODERATORS |
Number of moderators |
|
INITIATE_PERMS |
Permissions to invite participants |
|
PROJECT_DATE_START |
Project start date |
|
PROJECT_DATE_FINISH |
Project end date |
|
SCRUM_OWNER_ID |
Scrum owner identifier |
|
SCRUM_MASTER_ID |
Scrum master identifier |
|
SCRUM_SPRINT_DURATION |
Sprint duration in seconds |
|
SCRUM_TASK_RESPONSIBLE |
Default executor in scrum |
|
TYPE |
Group type: |
|
AVATAR |
Avatar URL |
Parameter params
|
Name |
Description |
|
IS_ADMIN |
Disable permission check. Possible values:
If |
|
siteId |
Identifier of the site to be used in the automatic filter For extranet users, this value is ignored: the method always uses the extranet site. |
|
mode |
Response mode. Supported value:
The
|
|
features |
List of group tool codes to consider when forming |
|
mandatoryFeatures |
List of tool codes that should always be included in |
|
shouldSelectDialogId |
Whether to add a field with the chat identifier Possible values:
Default — |
Code Examples
How to Use Examples in Documentation
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"filter":{"ACTIVE":"Y","CLOSED":"N","%NAME":"group"},"select":["ID","NAME","TYPE","AVATAR"],"order":{"ID":"DESC"},"params":{"mode":"mobile","shouldSelectDialogId":"Y"}}' \
https://**put_your_bitrix24_address**/rest/**put_your_user_id_here**/**put_your_webhook_here**/socialnetwork.api.workgroup.list
curl -X POST \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"filter":{"ACTIVE":"Y","CLOSED":"N","%NAME":"group"},"select":["ID","NAME","TYPE","AVATAR"],"order":{"ID":"DESC"},"params":{"mode":"mobile","shouldSelectDialogId":"Y"},"auth":"**put_access_token_here**"}' \
https://**put_your_bitrix24_address**/rest/socialnetwork.api.workgroup.list
// callListMethod: Retrieves all data at once. Use only for small selections (< 1000 items) due to high memory load.
try {
const response = await $b24.callListMethod(
'socialnetwork.api.workgroup.list',
{
filter: { ACTIVE: 'Y', CLOSED: 'N', '%NAME': 'group' },
select: ['ID', 'NAME', 'TYPE', 'AVATAR'],
order: { ID: 'DESC' },
params: { mode: 'mobile', shouldSelectDialogId: 'Y' }
},
(progress) => { console.log('Progress:', progress) }
);
const items = response.getData() || [];
for (const entity of items) { console.log('Entity:', entity) }
} catch (error) {
console.error('Request failed', error);
}
// fetchListMethod: Retrieves data in parts using an iterator. Use for large volumes of data for efficient memory consumption.
try {
const generator = $b24.fetchListMethod(
'socialnetwork.api.workgroup.list',
{
filter: { ACTIVE: 'Y', CLOSED: 'N', '%NAME': 'group' },
select: ['ID', 'NAME', 'TYPE'],
order: { ID: 'DESC' }
},
'ID'
);
for await (const page of generator) {
for (const entity of page) { console.log('Entity:', entity) }
}
} catch (error) {
console.error('Request failed', error);
}
// callMethod: Manual control of pagination through the start parameter.
try {
const response = await $b24.callMethod(
'socialnetwork.api.workgroup.list',
{
filter: { ACTIVE: 'Y', CLOSED: 'N', '%NAME': 'group' },
select: ['ID', 'NAME', 'TYPE'],
order: { ID: 'DESC' }
},
0
);
const result = response.getData().result.workgroups || [];
for (const entity of result) { console.log('Entity:', entity) }
} catch (error) {
console.error('Request failed', error);
}
try {
$response = $b24Service
->core
->call(
'socialnetwork.api.workgroup.list',
[
'filter' => ['ACTIVE' => 'Y', 'CLOSED' => 'N', '%NAME' => 'group'],
'select' => ['ID', 'NAME', 'TYPE', 'AVATAR'],
'order' => ['ID' => 'DESC'],
'params' => [
'mode' => 'mobile',
'shouldSelectDialogId' => 'Y',
],
]
);
print_r($response->getResponseData()->getResult());
} catch (\Throwable $exception) {
echo $exception->getMessage();
}
BX24.callMethod(
'socialnetwork.api.workgroup.list',
{
filter: { ACTIVE: 'Y', CLOSED: 'N', '%NAME': 'group' },
select: ['ID', 'NAME', 'TYPE', 'AVATAR'],
order: { ID: 'DESC' },
params: { mode: 'mobile', shouldSelectDialogId: 'Y' }
},
function(result) {
if (result.error()) {
console.error(result.error());
} else {
console.log(result.data());
}
}
);
require_once('crest.php');
$result = CRest::call(
'socialnetwork.api.workgroup.list',
[
'filter' => ['ACTIVE' => 'Y', 'CLOSED' => 'N', '%NAME' => 'group'],
'select' => ['ID', 'NAME', 'TYPE', 'AVATAR'],
'order' => ['ID' => 'DESC'],
'params' => [
'mode' => 'mobile',
'shouldSelectDialogId' => 'Y',
],
]
);
print_r($result);
Response Handling
HTTP Status: 200
{
"result": {
"workgroups": [
{
"id": "5",
"name": "Open group for everyone",
"type": "group",
"imageId": "5",
"avatarType": null,
"avatar": "https://test.bitrix24.com/b13743910/resize_cache/5/7acf4caaf5d8/socialnetwork/8d6/8d2c04ece929572/3.png",
"additionalData": {
"role": "",
"initiatedByType": ""
},
"dialogId": ""
},
{
"id": "1",
"name": "Closed visible group",
"type": "group",
"imageId": "1",
"avatarType": null,
"avatar": "",
"additionalData": {
"role": "",
"initiatedByType": ""
},
"dialogId": "chat177"
}
]
},
"total": 2,
"time": {
"start": 1774357689,
"finish": 1774357689.398272,
"duration": 0.3982720375061035,
"processing": 0,
"date_start": "2026-03-24T16:08:09+02:00",
"date_finish": "2026-03-24T16:08:09+02:00",
"operating_reset_at": 1774358289,
"operating": 0.12220001220703125
}
}
Returned Data
|
Name |
Description |
|
result |
Root object of the response |
|
workgroups |
List of workgroups. The structure of the object depends on the fields passed in If no groups are found by the filter, |
|
next |
Offset for the next page. The field is returned if there are more records. |
|
total |
Total number of records. The field is not returned if the request is executed with |
|
time |
Information about the execution time of the request. |
Error Handling
Statuses and System Error Codes
HTTP Status: 20x, 40x, 50x
The errors described below may occur when calling any method.
|
Status |
Code |
Description |
|
|
|
An internal server error has occurred. Please contact the server administrator or Bitrix24 technical support |
|
|
|
An internal server error has occurred. Please contact the server administrator or Bitrix24 technical support |
|
|
|
The request intensity limit has been exceeded |
|
|
|
The current method is not permitted for calls using batch |
|
|
|
The maximum length of parameters passed to the batch method has been exceeded |
|
|
|
Invalid access token or webhook code |
|
|
|
The HTTPS protocol is required for method calls |
|
|
|
The REST API is blocked due to overload. This is a manual individual block; please contact Bitrix24 technical support to lift it |
|
|
|
The REST API is only available on commercial plans |
|
|
|
The user associated with the access token or webhook used to call the method lacks the necessary permissions |
|
|
|
The manifest is not available |
|
|
|
The request requires higher privileges than those provided by the webhook token |
|
|
|
The provided access token has expired |
|
|
|
The user does not have access to the application. This means that the application is installed, but the portal administrator has restricted access to this application to specific users only |
|
|
|
The public part of the site is closed. To open the public part of the site 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 |
Continue Learning
- Create a group or project sonet_group.create
- Change group or project sonet_group.update
- Retrieve Data on Workgroup socialnetwork.api.workgroup.get
- Get a list of groups and projects sonet_group.get
- Delete group or project sonet_group.delete