#Workgroups

Entity: workgroup | Scope: sonet_group | Base path: /v1/workgroups

Legacy entity (UPPER_CASE field names) — field names are automatically converted to camelCase.

#Operations

Method Path Description Bitrix24 Method
GET /v1/workgroups List all (with filter, sort, pagination) sonet_group.get
GET /v1/workgroups/:id Get by ID sonet_group.get
POST /v1/workgroups Create new sonet_group.create
PATCH /v1/workgroups/:id Update by ID sonet_group.update
DELETE /v1/workgroups/:id Delete by ID sonet_group.delete

#Fields

API Name Bitrix24 Name Type Readonly Description
id ID number yes Идентификатор записи
name NAME string
description DESCRIPTION string
active ACTIVE boolean
visible VISIBLE boolean
opened OPENED boolean Доступна для всех (да/нет)
ownerId OWNER_ID number
subjectId SUBJECT_ID number
subjectName SUBJECT_NAME string yes
membersCount NUMBER_OF_MEMBERS number yes
dateCreate DATE_CREATE datetime yes
dateUpdate DATE_UPDATE datetime yes

#Examples

#List

Terminal
curl -X GET '/v1/workgroups?limit=10' \
  -H 'X-Api-Key: YOUR_KEY'

#Get by ID

Terminal
curl -X GET '/v1/workgroups/123' \
  -H 'X-Api-Key: YOUR_KEY'

#Create

Terminal
curl -X POST '/v1/workgroups' \
  -H 'X-Api-Key: YOUR_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"name":"value","description":"value","active":"true"}'

#Update

Terminal
curl -X PATCH '/v1/workgroups/123' \
  -H 'X-Api-Key: YOUR_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"title":"updated"}'

#Delete

Terminal
curl -X DELETE '/v1/workgroups/123' \
  -H 'X-Api-Key: YOUR_KEY'

#Batch

Terminal
curl -X POST '/v1/batch' \
  -H 'X-Api-Key: YOUR_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"calls":[{"entity":"workgroups","action":"list","params":{"limit":5}}]}'