Skip to main content

aiPreferencesSetToolPermissionMode

AiSuccessResponse aiPreferencesSetToolPermissionMode(AiPreferencesSetToolPermissionModeRequest)

PUT /api/2.0/ai/preferences/set-tool-permission-mode

Set tool permission mode

Persists the tool permission mode of the calling user. value has to be one of ask, auto, allow: anything else is rejected rather than coerced, so an absent or mistyped value can never overwrite the stored mode. entityId is validated like on the other writes and otherwise ignored - the mode applies to every chat of the user. Idempotent.

Parameters​

NameInTypeDescriptionNotes
AiPreferencesSetToolPermissionModeRequestbodyAiPreferencesSetToolPermissionModeRequest[required]

Responses​

Status codeDescriptionTypeResponse headers
200Confirms the preference was stored.AiSuccessResponse-
400value is not one of ask, auto, allow, or entityId is not a room ID.AiErrorResponse-
401Missing asc_auth_key cookie or Authorization header.AiErrorResponse-
403AI is disabled for this portal, the caller is a guest, or the room named by entityId is one the caller cannot open. Relayed from the DocSpace AI service or the Files API.AiErrorResponse-
413The request body is larger than 100 KB, the JSON parser's limit on this route.AiErrorResponse-
500Unhandled failure. The reason is logged server-side and never echoed back.AiErrorResponse-

Return type​

AiSuccessResponse

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

  • Content-Type: application/json
  • Accept: application/json