Updates an existing assistant by its ObjectId. Accepts any non-empty object as the request body and passes it directly to MongoDB updateOne. No field-level validation is performed beyond requiring a non-empty body. Special handling for institution and user fields when sent as empty strings uses $unset to remove them from the document. Auto-reset logic is applied before update. If account_shared is true but institution_shared is not true, account_shared is reset to false. Any authenticated user can call this endpoint (no admin check).
JWT token passed in x-access-token header
The ObjectId of the assistant to update
Any valid assistant fields. No required fields for update. Empty strings for user/institution trigger $unset.
Name of the assistant
"New Assistant Updated"
Status of the assistant
active, unpublished, inactive, deleted "active"
Description of the assistant
"New Assistant Description"
Instructions for the assistant
"New Assistant Instructions"
URL for the assistant's profile picture
Whether the assistant is admin-only
Number of conversation history items to remember
Whether the assistant can be edited by others
User ObjectId. Empty string triggers $unset to remove the field.
"6430d02554cd4e00403e8b05"
Institution ObjectId. Empty string triggers $unset to remove the field.
"6631915765bb0a94cfd6ca99"
Whether shared with the institution
Whether shared across the account. Auto-reset to false if institution_shared is not true.
Whether RAG is enabled
Whether to bypass the system context prompt
Optional model override (max 200 chars)