[{"data":1,"prerenderedAt":7},["ShallowReactive",2],{"docs-me\u002Fworkgroups":3,"docs-tabs-me\u002Fworkgroups":6},{"content":4,"lastmod":5},"## My workgroups\n\n`GET \u002Fv1\u002Fme\u002Fworkgroups`\n\nReturns 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.\n\n## Parameters\n\nThe endpoint takes no parameters. The response is the user's full list of groups in a single call, without pagination.\n\n## Examples\n\n### curl — personal key\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fme\u002Fworkgroups\" \\\n  -H \"X-Api-Key: YOUR_API_KEY\"\n```\n\n### curl — OAuth application\n\n```bash\ncurl \"https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fme\u002Fworkgroups\" \\\n  -H \"X-Api-Key: YOUR_APP_KEY\" \\\n  -H \"Authorization: Bearer USER_SESSION_TOKEN\"\n```\n\n### JavaScript — personal key\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fme\u002Fworkgroups', {\n  headers: { 'X-Api-Key': 'YOUR_API_KEY' },\n})\n\nconst body = await res.json()\nconst moderated = body.data.filter((group) => group.role !== 'member')\nconsole.log(`Groups: ${body.meta.total}, with moderation rights: ${moderated.length}`)\n```\n\n### JavaScript — OAuth application\n\n```javascript\nconst res = await fetch('https:\u002F\u002Fvibecode.bitrix24.com\u002Fv1\u002Fme\u002Fworkgroups', {\n  headers: {\n    'X-Api-Key': 'YOUR_APP_KEY',\n    'Authorization': 'Bearer USER_SESSION_TOKEN',\n  },\n})\n\nconst body = await res.json()\n```\n\n## Response fields\n\n| Field | Type | Description |\n|-------|------|-------------|\n| `success` | boolean | `true` on success |\n| `data` | array | The user's groups. An empty array means the user belongs to no group |\n| `data[].groupId` | number | Workgroup ID. Use it with [`GET \u002Fv1\u002Fworkgroups\u002F:id`](\u002Fdocs\u002Fentities\u002Fworkgroups\u002Fget) and [`GET \u002Fv1\u002Fworkgroups\u002F:groupId\u002Fusers`](\u002Fdocs\u002Fentities\u002Fworkgroups\u002Fusers) |\n| `data[].groupName` | string | Group name |\n| `data[].role` | string | The user's role in the group: `owner`, `moderator` or `member` |\n| `data[].groupImageId` | number | Group image ID. `0` means the group has no image |\n| `data[].groupImage` | string | Group image URL. An empty string means there is no URL. The image ID can still be non-zero in that case |\n| `data[].isExtranet` | boolean | `true` for an extranet group, which can include external users |\n| `meta.total` | number | Number of groups in `data` |\n\n## Response example\n\n```json\n{\n  \"success\": true,\n  \"data\": [\n    {\n      \"groupId\": 5,\n      \"groupName\": \"Open group for everyone\",\n      \"role\": \"owner\",\n      \"groupImageId\": 5,\n      \"groupImage\": \"https:\u002F\u002Fexample.bitrix24.com\u002Fb13743910\u002Fresize_cache\u002F5\u002F570b913f0922d8ef3131ca43a12dafee\u002Fsocialnetwork\u002F8d6\u002F8d691e3ced2c04ece929d721067ee572\u002F3.png\",\n      \"isExtranet\": true\n    },\n    {\n      \"groupId\": 13,\n      \"groupName\": \"WORKFLOW LISTS\",\n      \"role\": \"owner\",\n      \"groupImageId\": 0,\n      \"groupImage\": \"\",\n      \"isExtranet\": true\n    }\n  ],\n  \"meta\": {\n    \"total\": 2\n  }\n}\n```\n\n## Error response example\n\n401 — the `X-Api-Key` header is not sent:\n\n```json\n{\n  \"success\": false,\n  \"error\": {\n    \"code\": \"MISSING_API_KEY\",\n    \"message\": \"API key required. Pass via X-Api-Key header.\"\n  }\n}\n```\n\n## Errors\n\n| HTTP | Code | Description |\n|------|------|-------------|\n| 400 | `UNSUPPORTED_FILTER` | The `filter` parameter was passed and strict mode is enabled on the server. Without strict mode, the filter is ignored — see \"Known specifics\" |\n| 401 | `MISSING_API_KEY` | `X-Api-Key` is not sent |\n| 401 | `INVALID_API_KEY` | The key is not recognized — no such key exists on the platform |\n| 401 | `TOKEN_MISSING` | The key has no Bitrix24 tokens |\n| 403 | `SCOPE_DENIED` | The key lacks the `sonet_group` scope |\n| 422 | `BITRIX_ERROR` | Bitrix24 refused the call and returned its own reason in `error.message` |\n| 429 | `RATE_LIMITED` | Request limit exceeded. Retry after the delay in the `Retry-After` header |\n| 502 | `BITRIX_UNAVAILABLE` | Bitrix24 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 |\n| 503 | `BITRIX_TIMEOUT` | Bitrix24 did not respond in time. The response includes a `Retry-After` header |\n\nFull list of common API errors — [Errors](\u002Fdocs\u002Ferrors).\n\n## Known specifics\n\n- **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.\n- **Membership does not grant permission for an action.** An `owner` or `moderator` role in the response does not guarantee that the next call on the group succeeds: Bitrix24 checks permissions when the action itself runs.\n- **`filter` is not applied.** By default, a request with `filter` gets the same full list with status `200` and the header `Warning: 299 - \"filter is not supported on this endpoint and was ignored\"`. If strict mode is enabled on the server, the same request gets `400` with code `UNSUPPORTED_FILTER` and no data. Filter the groups on your side.\n- **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]`.\n\n## See also\n\n- [Workgroups](\u002Fdocs\u002Fentities\u002Fworkgroups)\n- [List workgroup members](\u002Fdocs\u002Fentities\u002Fworkgroups\u002Fusers)\n- [Workgroup members](\u002Fdocs\u002Fworkgroups\u002Fmembers)\n","2026-11-02",{},1795000555830]