For AI agents: markdown of this page — /docs-content-en/me/workgroups.md documentation index — /llms.txt
My workgroups
GET /v1/me/workgroups
Returns the workgroups and projects the key's user belongs to, together with the user's role in each one. Use it to show employees their groups or to pick a group for the next call.
Parameters
The endpoint takes no parameters. The response is the user's full list of groups in a single call, without pagination.
Examples
curl — personal key
curl "https://vibecode.bitrix24.com/v1/me/workgroups" \
-H "X-Api-Key: YOUR_API_KEY"
curl — OAuth application
curl "https://vibecode.bitrix24.com/v1/me/workgroups" \
-H "X-Api-Key: YOUR_APP_KEY" \
-H "Authorization: Bearer USER_SESSION_TOKEN"
JavaScript — personal key
const res = await fetch('https://vibecode.bitrix24.com/v1/me/workgroups', {
headers: { 'X-Api-Key': 'YOUR_API_KEY' },
})
const body = await res.json()
const moderated = body.data.filter((group) => group.role !== 'member')
console.log(`Groups: ${body.meta.total}, with moderation rights: ${moderated.length}`)
JavaScript — OAuth application
const res = await fetch('https://vibecode.bitrix24.com/v1/me/workgroups', {
headers: {
'X-Api-Key': 'YOUR_APP_KEY',
'Authorization': 'Bearer USER_SESSION_TOKEN',
},
})
const body = await res.json()
Response fields
| Field | Type | Description |
|---|---|---|
Fieldsuccess |
Typeboolean | Descriptiontrue on success |
Fielddata |
Typearray | DescriptionThe user's groups. An empty array means the user belongs to no group |
Fielddata[].groupId |
Typenumber | DescriptionWorkgroup ID. Use it with GET /v1/workgroups/:id and GET /v1/workgroups/:groupId/users |
Fielddata[].groupName |
Typestring | DescriptionGroup name |
Fielddata[].role |
Typestring | DescriptionThe user's role in the group: owner, moderator or member |
Fielddata[].groupImageId |
Typenumber | DescriptionGroup image ID. 0 means the group has no image |
Fielddata[].groupImage |
Typestring | DescriptionGroup image URL. An empty string means there is no URL. The image ID can still be non-zero in that case |
Fielddata[].isExtranet |
Typeboolean | Descriptiontrue for an extranet group, which can include external users |
Fieldmeta.total |
Typenumber | DescriptionNumber of groups in data |
Response example
{
"success": true,
"data": [
{
"groupId": 5,
"groupName": "Open group for everyone",
"role": "owner",
"groupImageId": 5,
"groupImage": "https://example.bitrix24.com/b13743910/resize_cache/5/570b913f0922d8ef3131ca43a12dafee/socialnetwork/8d6/8d691e3ced2c04ece929d721067ee572/3.png",
"isExtranet": true
},
{
"groupId": 13,
"groupName": "WORKFLOW LISTS",
"role": "owner",
"groupImageId": 0,
"groupImage": "",
"isExtranet": true
}
],
"meta": {
"total": 2
}
}
Error response example
401 — the X-Api-Key header is not sent:
{
"success": false,
"error": {
"code": "MISSING_API_KEY",
"message": "API key required. Pass via X-Api-Key header."
}
}
Errors
| HTTP | Code | Description |
|---|---|---|
| HTTP400 | CodeUNSUPPORTED_FILTER |
DescriptionThe filter parameter was passed and strict mode is enabled on the server. Without strict mode, the filter is ignored — see "Known specifics" |
| HTTP401 | CodeMISSING_API_KEY |
DescriptionX-Api-Key is not sent |
| HTTP401 | CodeINVALID_API_KEY |
DescriptionThe key is not recognized — no such key exists on the platform |
| HTTP401 | CodeTOKEN_MISSING |
DescriptionThe key has no Bitrix24 tokens |
| HTTP403 | CodeSCOPE_DENIED |
DescriptionThe key lacks the sonet_group scope |
| HTTP422 | CodeBITRIX_ERROR |
DescriptionBitrix24 refused the call and returned its own reason in error.message |
| HTTP429 | CodeRATE_LIMITED |
DescriptionRequest limit exceeded. Retry after the delay in the Retry-After header |
| HTTP502 | CodeBITRIX_UNAVAILABLE |
DescriptionBitrix24 is unavailable or returned a group the endpoint cannot parse: an unknown role, an invalid group ID or image ID. The list is not returned at all in that case, even if the other groups are valid |
| HTTP503 | CodeBITRIX_TIMEOUT |
DescriptionBitrix24 did not respond in time. The response includes a Retry-After header |
Full list of common API errors — Errors.
Known specifics
- Only the key user's groups. A personal key returns its owner's groups, and an OAuth application key returns the session user's groups. This call cannot return another employee's groups.
- Membership does not grant permission for an action. An
ownerormoderatorrole in the response does not guarantee that the next call on the group succeeds: Bitrix24 checks permissions when the action itself runs. filteris not applied. By default, a request withfiltergets the same full list with status200and the headerWarning: 299 - "filter is not supported on this endpoint and was ignored". If strict mode is enabled on the server, the same request gets400with codeUNSUPPORTED_FILTERand no data. Filter the groups on your side.- URLs with credentials are hidden. If a string field in the response — a group name or an image URL — contains an address with a Bitrix24 access key, the whole string is replaced with
[REDACTED].