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
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| AiPromptsUpdateRequest | body | AiPromptsUpdateRequest | [required] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | Whether the prompt was updated, with the stored prompt in prompt. | AiPromptMutationResult | - |
| 401 | Missing asc_auth_key cookie or Authorization header. | AiErrorResponse | - |
| 403 | AI 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 | - |
| 413 | The request body is larger than 100 KB, the JSON parser's limit on this route. | AiErrorResponse | - |
| 500 | Unhandled failure. The reason is logged server-side and never echoed back. | AiErrorResponse | - |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json