Skip to main content

aiPromptsRenameFolder

AiFolderMutationResult aiPromptsRenameFolder(AiPromptsRenameFolderRequest)

PUT /api/2.0/ai/prompts/rename-folder

Rename folder

Renames a folder in the caller's prompt library, validating the new name against the folders already there. The prompts inside it are untouched and keep their IDs. The answer carries the renamed folder. A name that another folder already uses is rejected.

Parameters​

NameInTypeDescriptionNotes
AiPromptsRenameFolderRequestbodyAiPromptsRenameFolderRequest[required]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the folder was renamed, with the stored folder in folder.AiFolderMutationResult-
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​

AiFolderMutationResult

Authorization​

cookieAuth, bearerAuth

HTTP request headers​

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