aiAttachmentsSaveFilesMany
List aiAttachmentsSaveFilesMany(AiAttachmentsSaveFilesManyRequest)
POST /api/2.0/ai/attachments/save-files-many
Save files many
Stores several file attachments as drafts in one round trip and returns them in the order they were sent. Each entry is validated exactly as the single-file operation validates its input, and the first bad one rejects the whole batch with its index named in the message - nothing is stored. inputs has to be present and an array: an absent or null value is a malformed request rather than an empty batch, and only an explicit empty array means no files. Follow up with POST api/2.0/ai/attachments/link-to-message to bind the drafts to a message.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| AiAttachmentsSaveFilesManyRequest | body | AiAttachmentsSaveFilesManyRequest | [required] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The stored drafts, in the order they were sent. | List | - |
| 400 | inputs is not an array, or one of its entries is malformed. | 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 | - |
| 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