Skip to main content

aiPromptsCreateFolder

AiFolderMutationResult aiPromptsCreateFolder(AiPromptsCreateFolderRequest)

POST /api/2.0/ai/prompts/create-folder

Create folder

Creates a folder in the caller's prompt library and returns it. The name has to be non-empty and unique across that library. Folders do not nest: there is one flat level, so a folder cannot be created inside another. The answer carries the folder ID to use as folderId when saving or moving prompts.

Parameters​

NameInTypeDescriptionNotes
AiPromptsCreateFolderRequestbodyStringThe name of the folder to create, as a bare JSON string.[required]

Responses​

Status codeDescriptionTypeResponse headers
200Whether the folder was created, with it 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