> For the complete documentation index, see [llms.txt](https://intuitem.gitbook.io/ciso-assistant/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://intuitem.gitbook.io/ciso-assistant/api-documentation/api-reference/user-groups.md). Agents can also search and read this documentation through its [MCP server](https://intuitem.gitbook.io/ciso-assistant/~gitbook/mcp).

# User groups

## GET /api/user-groups/

> API endpoint that allows user groups to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"user-groups"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}},"schemas":{"PaginatedUserGroupReadList":{"type":"object","required":["count","results"],"properties":{"count":{"type":"integer"},"next":{"type":"string","nullable":true,"format":"uri"},"previous":{"type":"string","nullable":true,"format":"uri"},"results":{"type":"array","items":{"$ref":"#/components/schemas/UserGroupRead"}}}},"UserGroupRead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"path":{"type":"string","readOnly":true},"name":{"type":"string"},"folder":{"type":"string","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"description":{"type":"string","nullable":true},"builtin":{"type":"boolean","readOnly":true}},"required":["builtin","created_at","folder","id","name","path","updated_at"]}}},"paths":{"/api/user-groups/":{"get":{"operationId":"user_groups_list","description":"API endpoint that allows user groups to be viewed or edited","parameters":[{"in":"query","name":"created_at__date","schema":{"type":"string","format":"date"}},{"in":"query","name":"created_at__date__gt","schema":{"type":"string","format":"date"}},{"in":"query","name":"created_at__date__gte","schema":{"type":"string","format":"date"}},{"in":"query","name":"created_at__date__lt","schema":{"type":"string","format":"date"}},{"in":"query","name":"created_at__date__lte","schema":{"type":"string","format":"date"}},{"in":"query","name":"created_at__gt","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"created_at__gte","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"created_at__isnull","schema":{"type":"boolean"}},{"in":"query","name":"created_at__lt","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"created_at__lte","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"folder","schema":{"type":"array","items":{"type":"string","format":"uuid"}},"explode":true,"style":"form"},{"in":"query","name":"genericcollection","schema":{"type":"array","items":{"type":"string","format":"uuid"}},"description":"Multiple values may be separated by commas.","explode":false,"style":"form"},{"in":"query","name":"id","schema":{"type":"array","items":{"type":"string","format":"uuid"}},"description":"Multiple values may be separated by commas.","explode":false,"style":"form"},{"name":"limit","required":false,"in":"query","description":"Number of results to return per page.","schema":{"type":"integer"}},{"name":"offset","required":false,"in":"query","description":"The initial index from which to return the results.","schema":{"type":"integer"}},{"name":"ordering","required":false,"in":"query","description":"Which field to use when ordering the results.","schema":{"type":"string"}},{"in":"query","name":"updated_at__date","schema":{"type":"string","format":"date"}},{"in":"query","name":"updated_at__date__gt","schema":{"type":"string","format":"date"}},{"in":"query","name":"updated_at__date__gte","schema":{"type":"string","format":"date"}},{"in":"query","name":"updated_at__date__lt","schema":{"type":"string","format":"date"}},{"in":"query","name":"updated_at__date__lte","schema":{"type":"string","format":"date"}},{"in":"query","name":"updated_at__gt","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"updated_at__gte","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"updated_at__isnull","schema":{"type":"boolean"}},{"in":"query","name":"updated_at__lt","schema":{"type":"string","format":"date-time"}},{"in":"query","name":"updated_at__lte","schema":{"type":"string","format":"date-time"}}],"tags":["user-groups"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedUserGroupReadList"}}},"description":""}}}}}}
```

## POST /api/user-groups/

> API endpoint that allows user groups to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"user-groups"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}},"schemas":{"UserGroupWrite":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"name":{"type":"string","maxLength":200},"description":{"type":"string","nullable":true},"builtin":{"type":"boolean","readOnly":true},"folder":{"type":"string","format":"uuid"}},"required":["builtin","created_at","id","name","updated_at"]}}},"paths":{"/api/user-groups/":{"post":{"operationId":"user_groups_create","description":"API endpoint that allows user groups to be viewed or edited","tags":["user-groups"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupWrite"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/UserGroupWrite"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UserGroupWrite"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupWrite"}}},"description":""}}}}}}
```

## GET /api/user-groups/{id}/

> API endpoint that allows user groups to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"user-groups"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}},"schemas":{"UserGroupRead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"path":{"type":"string","readOnly":true},"name":{"type":"string"},"folder":{"type":"string","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"description":{"type":"string","nullable":true},"builtin":{"type":"boolean","readOnly":true}},"required":["builtin","created_at","folder","id","name","path","updated_at"]}}},"paths":{"/api/user-groups/{id}/":{"get":{"operationId":"user_groups_retrieve","description":"API endpoint that allows user groups to be viewed or edited","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this user group.","required":true}],"tags":["user-groups"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupRead"}}},"description":""}}}}}}
```

## PUT /api/user-groups/{id}/

> API endpoint that allows user groups to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"user-groups"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}},"schemas":{"UserGroupWrite":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"name":{"type":"string","maxLength":200},"description":{"type":"string","nullable":true},"builtin":{"type":"boolean","readOnly":true},"folder":{"type":"string","format":"uuid"}},"required":["builtin","created_at","id","name","updated_at"]}}},"paths":{"/api/user-groups/{id}/":{"put":{"operationId":"user_groups_update","description":"API endpoint that allows user groups to be viewed or edited","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this user group.","required":true}],"tags":["user-groups"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupWrite"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/UserGroupWrite"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UserGroupWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupWrite"}}},"description":""}}}}}}
```

## DELETE /api/user-groups/{id}/

> API endpoint that allows user groups to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"user-groups"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/user-groups/{id}/":{"delete":{"operationId":"user_groups_destroy","description":"API endpoint that allows user groups to be viewed or edited","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this user group.","required":true}],"tags":["user-groups"],"responses":{"204":{"description":"No response body"}}}}}}
```

## PATCH /api/user-groups/{id}/

> API endpoint that allows user groups to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"user-groups"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}},"schemas":{"PatchedUserGroupWrite":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"name":{"type":"string","maxLength":200},"description":{"type":"string","nullable":true},"builtin":{"type":"boolean","readOnly":true},"folder":{"type":"string","format":"uuid"}}},"UserGroupWrite":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"created_at":{"type":"string","format":"date-time","readOnly":true},"updated_at":{"type":"string","format":"date-time","readOnly":true},"name":{"type":"string","maxLength":200},"description":{"type":"string","nullable":true},"builtin":{"type":"boolean","readOnly":true},"folder":{"type":"string","format":"uuid"}},"required":["builtin","created_at","id","name","updated_at"]}}},"paths":{"/api/user-groups/{id}/":{"patch":{"operationId":"user_groups_partial_update","description":"API endpoint that allows user groups to be viewed or edited","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this user group.","required":true}],"tags":["user-groups"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedUserGroupWrite"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedUserGroupWrite"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedUserGroupWrite"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserGroupWrite"}}},"description":""}}}}}}
```

## POST /api/user-groups/{id}/add-members/

> Add users to this group. Only the M2M through-rows are written — no User\
> attribute is touched — so membership management is granted without leaking\
> change\_user. Authorized on the group's folder (see permission\_overrides).

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"user-groups"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/user-groups/{id}/add-members/":{"post":{"operationId":"user_groups_add_members_create","description":"Add users to this group. Only the M2M through-rows are written — no User\nattribute is touched — so membership management is granted without leaking\nchange_user. Authorized on the group's folder (see permission_overrides).","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this user group.","required":true}],"tags":["user-groups"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/user-groups/{id}/cascade-info/

> API endpoint that allows user groups to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"user-groups"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/user-groups/{id}/cascade-info/":{"get":{"operationId":"user_groups_cascade_info_retrieve","description":"API endpoint that allows user groups to be viewed or edited","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this user group.","required":true}],"tags":["user-groups"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/user-groups/{id}/neighborhood/

> API endpoint that allows user groups to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"user-groups"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/user-groups/{id}/neighborhood/":{"get":{"operationId":"user_groups_neighborhood_retrieve","description":"API endpoint that allows user groups to be viewed or edited","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this user group.","required":true}],"tags":["user-groups"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/user-groups/{id}/object/

> API endpoint that allows user groups to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"user-groups"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/user-groups/{id}/object/":{"get":{"operationId":"user_groups_object_retrieve","description":"API endpoint that allows user groups to be viewed or edited","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this user group.","required":true}],"tags":["user-groups"],"responses":{"200":{"description":"No response body"}}}}}}
```

## POST /api/user-groups/{id}/remove-members/

> Remove users from this group (batch). Same authorization as add\_members.\
> Protects the last direct BI-UG-ADM administrator, mirroring UserViewSet, so\
> membership management can never strip the lockout-proof admin anchor.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"user-groups"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/user-groups/{id}/remove-members/":{"post":{"operationId":"user_groups_remove_members_create","description":"Remove users from this group (batch). Same authorization as add_members.\nProtects the last direct BI-UG-ADM administrator, mirroring UserViewSet, so\nmembership management can never strip the lockout-proof admin anchor.","parameters":[{"in":"path","name":"id","schema":{"type":"string","format":"uuid"},"description":"A UUID string identifying this user group.","required":true}],"tags":["user-groups"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/user-groups/autocomplete/

> API endpoint that allows user groups to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"user-groups"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/user-groups/autocomplete/":{"get":{"operationId":"user_groups_autocomplete_retrieve","description":"API endpoint that allows user groups to be viewed or edited","tags":["user-groups"],"responses":{"200":{"description":"No response body"}}}}}}
```

## POST /api/user-groups/batch-action/

> API endpoint that allows user groups to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"user-groups"}],"security":[{"PersonalAccessToken":[]}],"components":{"securitySchemes":{"PersonalAccessToken":{"type":"apiKey","in":"header","name":"Authorization","description":"Personal access token, created from your user profile. Send it as `Authorization: Token <PAT>`."}}},"paths":{"/api/user-groups/batch-action/":{"post":{"operationId":"user_groups_batch_action_create","description":"API endpoint that allows user groups to be viewed or edited","tags":["user-groups"],"responses":{"200":{"description":"No response body"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://intuitem.gitbook.io/ciso-assistant/api-documentation/api-reference/user-groups.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
