Skip to main content

aiPromptsUpdate

AiPromptMutationResult aiPromptsUpdate(AiPromptsUpdateRequest)

PUT /api/2.0/ai/prompts/update

Update a saved prompt

Changes a saved prompt and returns the stored result. Only the fields present in updates are written, so a partial object leaves the rest of the prompt alone. The name and the folder reference are re-validated whenever either changes, which means an update can fail on a name another prompt in the same folder already uses. Use PUT api/2.0/ai/prompts/move to change only the folder.

Parameters​

NameInTypeDescriptionNotes
AiPromptsUpdateRequestbodyAiPromptsUpdateRequest[required]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the prompt was updated, with the stored prompt in prompt.AiPromptMutationResult-
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​

AiPromptMutationResult

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

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