跳到主要内容

aiSettingsSetUser

AiUserSettingsWrapper aiSettingsSetUser(AiSettingsSetUserRequest)

PUT /api/2.0/ai/config/user

Update user AI settings

Replaces the AI settings of the calling user and returns the stored result. The body is proxied unchanged to the DocSpace AI service, which validates it, so a rejected value comes back with that service's verdict. Only the caller's own settings can be written. Portal-wide configuration is not touched by this operation.

Parameters​

NameInTypeDescriptionNotes
AiSettingsSetUserRequestbodyMapThe user's AI settings, proxied unchanged to the DocSpace AI service, which owns and validates the shape. Read the current one with GET api/2.0/ai/config/user and send it back changed.[required]

Responses​

Status codeDescriptionTypeResponse headers
200The calling user's stored AI settings.AiUserSettingsWrapper-
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​

AiUserSettingsWrapper

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

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