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
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| AiPromptsCreateFolderRequest | body | String | The name of the folder to create, as a bare JSON string. | [required] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | Whether the folder was created, with it in folder. | AiFolderMutationResult | - |
| 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