Skip to main content

aiPromptsMove

AiPromptMutationResult aiPromptsMove(AiPromptsMoveRequest)

PUT /api/2.0/ai/prompts/move

Move a prompt to a folder

Moves a saved prompt into another folder, or to the root when folderId is omitted or null. The name is re-validated in the target folder, so the move fails with 409 when a prompt of that name already sits there - rename it first with PUT api/2.0/ai/prompts/update; an unknown prompt or folder answers 404. Nothing about the prompt other than its folder changes. The answer carries the moved prompt.

Parameters​

NameInTypeDescriptionNotes
AiPromptsMoveRequestbodyAiPromptsMoveRequest[required]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the prompt was moved, with the moved prompt in prompt.AiPromptMutationResult-
400id is missing or folderId is neither a string nor null.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-
404No prompt has this ID, or folderId names no folder of the caller's.AiPromptMutationResult-
409A prompt of that name already sits in the target folder.AiPromptMutationResult-
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