aiPromptsDeleteFolder
AiSuccessResponse aiPromptsDeleteFolder(AiPromptsDeleteFolderRequest)
DELETE /api/2.0/ai/prompts/delete-folder
Delete folder
Deletes a folder together with every prompt inside it, permanently. The ID is required and may be sent in the body or as a query parameter. Unlike deleting a prompt, this checks first: a folder that does not exist, and one that belongs to another user, both answer 404 - the two cases are deliberately indistinguishable, so a foreign folder cannot be probed. Move the prompts out with PUT api/2.0/ai/prompts/move first if they should survive.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| AiPromptsDeleteFolderRequest | body | String | The ID of the folder to delete, as a bare JSON string. | [required] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | Confirms the folder and the prompts inside it are gone. | AiSuccessResponse | - |
| 400 | The folder ID is missing. | AiErrorResponse | - |
| 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 | - |
| 404 | No prompt folder has this ID. | 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