Get a List of Workgroups socialnetwork.api.workgroup.list
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.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
// 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 WorkgroupListResult = {
workgroups: Workgroup[]
}
type Workgroup = {
id: string
name: string
type: string
avatar: string
additionalData: {
role: string
initiatedByType: string
}
dialogId: string
}
try {
// socialnetwork.api.workgroup.list returns a single page (max 50 records). For the whole result set
// use a list helper: $b24.actions.v2.callList.make() returns every record as one
// array, $b24.actions.v2.fetchList.make() yields them in chunks (async generator).
// NOTE: the list helpers do not accept `order` (it is excluded from their params, so
// passing it is a TS error) — keep this call.make + `start` variant when sort matters.
const response = await $b24.actions.v2.call.make<WorkgroupListResult>({
method: 'socialnetwork.api.workgroup.list',
params: {
filter: { ACTIVE: 'Y', CLOSED: 'N', '%NAME': 'group' },
select: ['ID', 'NAME', 'TYPE', 'AVATAR'],
order: { ID: 'DESC' },
params: { mode: 'mobile', shouldSelectDialogId: 'Y' },
start: 0,
},
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('Workgroups:', result.workgroups.length, result.workgroups)
}
} 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 fetchWorkgroupList() {
try {
// Initialize the SDK inside a Bitrix24 frame
const $b24 = await B24Js.initializeB24Frame()
// socialnetwork.api.workgroup.list returns a single page (max 50 records). For the whole result set
// use a list helper: $b24.actions.v2.callList.make() returns every record as one
// array, $b24.actions.v2.fetchList.make() yields them in chunks (async generator).
// NOTE: the list helpers do not accept `order` (it is excluded from their params, so
// passing it is a TS error) — keep this call.make + `start` variant when sort matters.
const response = await $b24.actions.v2.call.make({
method: 'socialnetwork.api.workgroup.list',
params: {
filter: { ACTIVE: 'Y', CLOSED: 'N', '%NAME': 'group' },
select: ['ID', 'NAME', 'TYPE', 'AVATAR'],
order: { ID: 'DESC' },
params: { mode: 'mobile', shouldSelectDialogId: 'Y' },
start: 0,
},
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('Workgroups:', result.workgroups.length, result.workgroups)
} catch (error) {
// Thrown on transport or SDK failures (AjaxError, SdkError, etc.)
console.error(error)
}
}
document.addEventListener('DOMContentLoaded', fetchWorkgroupList)
</script>
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
try:
bitrix_response = client.socialnetwork.api.workgroup.list(
filter={
"ACTIVE": "Y",
"CLOSED": "N",
"%NAME": "group",
},
select=[
"ID",
"NAME",
"TYPE",
"AVATAR",
],
order={
"ID": "DESC",
},
params={
"mode": "mobile",
"shouldSelectDialogId": "Y",
},
).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}")
Example as_list
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
try:
bitrix_response = client.socialnetwork.api.workgroup.list(
filter={
"ACTIVE": "Y",
"CLOSED": "N",
"%NAME": "group",
},
select=[
"ID",
"NAME",
"TYPE",
"AVATAR",
],
order={
"ID": "DESC",
},
params={
"mode": "mobile",
"shouldSelectDialogId": "Y",
},
).as_list().response
result = bitrix_response.result
for item in result:
print(item)
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}")
Example as_list_fast
from b24pysdk.errors import BitrixAPIError, BitrixSDKException
try:
bitrix_response = client.socialnetwork.api.workgroup.list(
filter={
"ACTIVE": "Y",
"CLOSED": "N",
"%NAME": "group",
},
select=[
"ID",
"NAME",
"TYPE",
"AVATAR",
],
order={
"ID": "DESC",
},
params={
"mode": "mobile",
"shouldSelectDialogId": "Y",
},
).as_list_fast(descending=True).response
result = bitrix_response.result
for item in result:
print(item)
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.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);
// client and ctx are already created — see the Go SDK section
res, err := client.Core().Call(ctx, "socialnetwork.api.workgroup.list", b24.Params{
"filter": b24.Params{
"ACTIVE": "Y",
"CLOSED": "N",
"%NAME": "group",
},
"select": []string{"ID", "NAME", "TYPE", "AVATAR"},
"order": b24.Params{
"ID": "DESC",
},
"params": b24.Params{
"mode": "mobile",
"shouldSelectDialogId": "Y",
},
}, b24.WithIdempotent())
if err != nil {
return fmt.Errorf("socialnetwork.api.workgroup.list: %w", err)
}
// The method wraps the response in an object with the "workgroups" key.
raw, ok := b24.Unwrap(res.Result, "workgroups")
if !ok {
return fmt.Errorf("no workgroups key in the response")
}
var items []struct {
ID b24.ID `json:"id"`
Name string `json:"name"`
Type string `json:"type"`
ImageID b24.ID `json:"imageId"`
Avatar string `json:"avatar"`
DialogID string `json:"dialogId"`
}
if err := json.Unmarshal(raw, &items); err != nil {
return fmt.Errorf("parse response: %w", err)
}
for _, it := range items {
fmt.Println(it.ID)
}
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: 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 |