> 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/users.md). Agents can also search and read this documentation through its [MCP server](https://intuitem.gitbook.io/ciso-assistant/~gitbook/mcp).

# Users

## GET /api/users/

> API endpoint that allows users to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"users"}],"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":{"PaginatedUserReadList":{"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/UserRead"}}}},"UserRead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"email":{"type":"string","maxLength":100},"first_name":{"type":"string","maxLength":150},"last_name":{"type":"string","maxLength":150},"is_active":{"type":"boolean","title":"Active","description":"Designates whether this user should be treated as active. Unselect this instead of deleting accounts."},"date_joined":{"type":"string","format":"date-time"},"user_groups":{"type":"array","items":{"type":"string"}},"idp_groups":{"type":"array","items":{"type":"string"}},"keep_local_login":{"type":"boolean","description":"If True allow the user to log in using the normal login form even with SSO forced."},"can_connect_apps":{"type":"boolean","description":"If True allow the user to connect AI apps (MCP) with their account."},"is_third_party":{"type":"boolean"},"observation":{"type":"string","nullable":true,"title":"Notes about a user"},"has_mfa_enabled":{"type":"boolean","readOnly":true},"expiry_date":{"type":"string","format":"date","nullable":true},"is_superuser":{"type":"boolean","title":"Superuser status","description":"Designates that this user has all permissions without explicitly assigning them."},"is_scim_managed":{"type":"boolean","title":"SCIM managed","description":"True when this account is provisioned/owned by SCIM. Independent of scim_external_id, which the provisioning client may omit (RFC 7643)."},"is_jit_provisioned":{"type":"boolean","title":"JIT provisioned","description":"True when this account was auto-provisioned on first SSO login. Like SCIM-managed accounts, it stays SSO-only regardless of the global 'Force SSO' setting, unless 'Keep local login' is set."},"folder":{"type":"string","readOnly":true},"language":{"type":"string","readOnly":true}},"required":["email","folder","has_mfa_enabled","id","idp_groups","language","user_groups"]}}},"paths":{"/api/users/":{"get":{"operationId":"users_list","description":"API endpoint that allows users to be viewed or edited","parameters":[{"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"}},{"name":"search","required":false,"in":"query","description":"A search term.","schema":{"type":"string"}}],"tags":["users"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedUserReadList"}}},"description":""}}}}}}
```

## POST /api/users/

> API endpoint that allows users to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"users"}],"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":{"UserWrite":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"language":{"type":"string","writeOnly":true},"email":{"type":"string","maxLength":100},"first_name":{"type":"string","maxLength":150},"last_name":{"type":"string","maxLength":150},"is_active":{"type":"boolean","title":"Active","description":"Designates whether this user should be treated as active. Unselect this instead of deleting accounts."},"date_joined":{"type":"string","format":"date-time"},"user_groups":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The user groups this user belongs to. A user will get all permissions granted to each of their user groups."},"keep_local_login":{"type":"boolean","description":"If True allow the user to log in using the normal login form even with SSO forced."},"can_connect_apps":{"type":"boolean","description":"If True allow the user to connect AI apps (MCP) with their account."},"is_third_party":{"type":"boolean"},"is_local":{"type":"boolean"},"observation":{"type":"string","nullable":true,"title":"Notes about a user"},"expiry_date":{"type":"string","format":"date","nullable":true},"is_superuser":{"type":"boolean","readOnly":true},"has_mfa_enabled":{"type":"boolean","readOnly":true}},"required":["email","has_mfa_enabled","id","is_superuser"]}}},"paths":{"/api/users/":{"post":{"operationId":"users_create","description":"API endpoint that allows users to be viewed or edited","tags":["users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWrite"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/UserWrite"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UserWrite"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWrite"}}},"description":""}}}}}}
```

## GET /api/users/{id}/

> API endpoint that allows users to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"users"}],"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":{"UserRead":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"email":{"type":"string","maxLength":100},"first_name":{"type":"string","maxLength":150},"last_name":{"type":"string","maxLength":150},"is_active":{"type":"boolean","title":"Active","description":"Designates whether this user should be treated as active. Unselect this instead of deleting accounts."},"date_joined":{"type":"string","format":"date-time"},"user_groups":{"type":"array","items":{"type":"string"}},"idp_groups":{"type":"array","items":{"type":"string"}},"keep_local_login":{"type":"boolean","description":"If True allow the user to log in using the normal login form even with SSO forced."},"can_connect_apps":{"type":"boolean","description":"If True allow the user to connect AI apps (MCP) with their account."},"is_third_party":{"type":"boolean"},"observation":{"type":"string","nullable":true,"title":"Notes about a user"},"has_mfa_enabled":{"type":"boolean","readOnly":true},"expiry_date":{"type":"string","format":"date","nullable":true},"is_superuser":{"type":"boolean","title":"Superuser status","description":"Designates that this user has all permissions without explicitly assigning them."},"is_scim_managed":{"type":"boolean","title":"SCIM managed","description":"True when this account is provisioned/owned by SCIM. Independent of scim_external_id, which the provisioning client may omit (RFC 7643)."},"is_jit_provisioned":{"type":"boolean","title":"JIT provisioned","description":"True when this account was auto-provisioned on first SSO login. Like SCIM-managed accounts, it stays SSO-only regardless of the global 'Force SSO' setting, unless 'Keep local login' is set."},"folder":{"type":"string","readOnly":true},"language":{"type":"string","readOnly":true}},"required":["email","folder","has_mfa_enabled","id","idp_groups","language","user_groups"]}}},"paths":{"/api/users/{id}/":{"get":{"operationId":"users_retrieve","description":"API endpoint that allows users to be viewed or edited","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["users"],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserRead"}}},"description":""}}}}}}
```

## PUT /api/users/{id}/

> API endpoint that allows users to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"users"}],"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":{"UserWrite":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"language":{"type":"string","writeOnly":true},"email":{"type":"string","maxLength":100},"first_name":{"type":"string","maxLength":150},"last_name":{"type":"string","maxLength":150},"is_active":{"type":"boolean","title":"Active","description":"Designates whether this user should be treated as active. Unselect this instead of deleting accounts."},"date_joined":{"type":"string","format":"date-time"},"user_groups":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The user groups this user belongs to. A user will get all permissions granted to each of their user groups."},"keep_local_login":{"type":"boolean","description":"If True allow the user to log in using the normal login form even with SSO forced."},"can_connect_apps":{"type":"boolean","description":"If True allow the user to connect AI apps (MCP) with their account."},"is_third_party":{"type":"boolean"},"is_local":{"type":"boolean"},"observation":{"type":"string","nullable":true,"title":"Notes about a user"},"expiry_date":{"type":"string","format":"date","nullable":true},"is_superuser":{"type":"boolean","readOnly":true},"has_mfa_enabled":{"type":"boolean","readOnly":true}},"required":["email","has_mfa_enabled","id","is_superuser"]}}},"paths":{"/api/users/{id}/":{"put":{"operationId":"users_update","description":"API endpoint that allows users to be viewed or edited","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWrite"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/UserWrite"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/UserWrite"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWrite"}}},"description":""}}}}}}
```

## DELETE /api/users/{id}/

> API endpoint that allows users to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"users"}],"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/users/{id}/":{"delete":{"operationId":"users_destroy","description":"API endpoint that allows users to be viewed or edited","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["users"],"responses":{"204":{"description":"No response body"}}}}}}
```

## PATCH /api/users/{id}/

> API endpoint that allows users to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"users"}],"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":{"PatchedUserWrite":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"language":{"type":"string","writeOnly":true},"email":{"type":"string","maxLength":100},"first_name":{"type":"string","maxLength":150},"last_name":{"type":"string","maxLength":150},"is_active":{"type":"boolean","title":"Active","description":"Designates whether this user should be treated as active. Unselect this instead of deleting accounts."},"date_joined":{"type":"string","format":"date-time"},"user_groups":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The user groups this user belongs to. A user will get all permissions granted to each of their user groups."},"keep_local_login":{"type":"boolean","description":"If True allow the user to log in using the normal login form even with SSO forced."},"can_connect_apps":{"type":"boolean","description":"If True allow the user to connect AI apps (MCP) with their account."},"is_third_party":{"type":"boolean"},"is_local":{"type":"boolean"},"observation":{"type":"string","nullable":true,"title":"Notes about a user"},"expiry_date":{"type":"string","format":"date","nullable":true},"is_superuser":{"type":"boolean","readOnly":true},"has_mfa_enabled":{"type":"boolean","readOnly":true}}},"UserWrite":{"type":"object","properties":{"id":{"type":"string","format":"uuid","readOnly":true},"language":{"type":"string","writeOnly":true},"email":{"type":"string","maxLength":100},"first_name":{"type":"string","maxLength":150},"last_name":{"type":"string","maxLength":150},"is_active":{"type":"boolean","title":"Active","description":"Designates whether this user should be treated as active. Unselect this instead of deleting accounts."},"date_joined":{"type":"string","format":"date-time"},"user_groups":{"type":"array","items":{"type":"string","format":"uuid"},"description":"The user groups this user belongs to. A user will get all permissions granted to each of their user groups."},"keep_local_login":{"type":"boolean","description":"If True allow the user to log in using the normal login form even with SSO forced."},"can_connect_apps":{"type":"boolean","description":"If True allow the user to connect AI apps (MCP) with their account."},"is_third_party":{"type":"boolean"},"is_local":{"type":"boolean"},"observation":{"type":"string","nullable":true,"title":"Notes about a user"},"expiry_date":{"type":"string","format":"date","nullable":true},"is_superuser":{"type":"boolean","readOnly":true},"has_mfa_enabled":{"type":"boolean","readOnly":true}},"required":["email","has_mfa_enabled","id","is_superuser"]}}},"paths":{"/api/users/{id}/":{"patch":{"operationId":"users_partial_update","description":"API endpoint that allows users to be viewed or edited","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["users"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PatchedUserWrite"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/PatchedUserWrite"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/PatchedUserWrite"}}}},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserWrite"}}},"description":""}}}}}}
```

## GET /api/users/{id}/cascade-info/

> API endpoint that allows users to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"users"}],"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/users/{id}/cascade-info/":{"get":{"operationId":"users_cascade_info_retrieve","description":"API endpoint that allows users to be viewed or edited","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["users"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/users/{id}/neighborhood/

> API endpoint that allows users to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"users"}],"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/users/{id}/neighborhood/":{"get":{"operationId":"users_neighborhood_retrieve","description":"API endpoint that allows users to be viewed or edited","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["users"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/users/{id}/object/

> API endpoint that allows users to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"users"}],"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/users/{id}/object/":{"get":{"operationId":"users_object_retrieve","description":"API endpoint that allows users to be viewed or edited","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["users"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/users/{id}/teams/

> Membership is three separate relations, and which one matched is the useful\
> part -- it is why the user is addressed when the team is.\
> \
> Its own action rather than a field on UserReadSerializer: that serializer feeds\
> the users list, where three relation lookups per row would be an N+1.

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"users"}],"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/users/{id}/teams/":{"get":{"operationId":"users_teams_retrieve","description":"Membership is three separate relations, and which one matched is the useful\npart -- it is why the user is addressed when the team is.\n\nIts own action rather than a field on UserReadSerializer: that serializer feeds\nthe users list, where three relation lookups per row would be an N+1.","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"tags":["users"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/users/autocomplete/

> API endpoint that allows users to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"users"}],"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/users/autocomplete/":{"get":{"operationId":"users_autocomplete_retrieve","description":"API endpoint that allows users to be viewed or edited","tags":["users"],"responses":{"200":{"description":"No response body"}}}}}}
```

## POST /api/users/batch-action/

> API endpoint that allows users to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"users"}],"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/users/batch-action/":{"post":{"operationId":"users_batch_action_create","description":"API endpoint that allows users to be viewed or edited","tags":["users"],"responses":{"200":{"description":"No response body"}}}}}}
```

## GET /api/users/language/

> API endpoint that allows users to be viewed or edited

```json
{"openapi":"3.0.3","info":{"title":"CISO Assistant API","version":"v4.3.4"},"tags":[{"name":"users"}],"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/users/language/":{"get":{"operationId":"users_language_retrieve","description":"API endpoint that allows users to be viewed or edited","tags":["users"],"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/users.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.
