aiPromptsImportBundle
AiImportResult aiPromptsImportBundle(AiPromptsImportBundleRequest)
POST /api/2.0/ai/prompts/import-bundle
Import bundle
Writes a bundle produced by GET api/2.0/ai/prompts/export back into the caller's library. mode decides how: replace deletes the current prompts and folders before writing, and merge writes the bundle on top of what is already there. The folder references inside the bundle are validated before anything is written, so a corrupt bundle is rejected whole rather than applied halfway. replace is destructive and cannot be undone - export first if the current library matters.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| AiPromptsImportBundleRequest | body | AiPromptsImportBundleRequest | [required] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | Whether the bundle was written, how many prompts it imported, and what was refused. | AiImportResult | - |
| 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