Upload media attachments
Multipart endpoint for attaching media (images, videos, documents, voice notes) to a chat message. Returns a media_attachment row per file that the client then references in a message.send WebSocket frame as media.file_id.
Limits: up to 5 files per request, 50 MB each. The MIME allowlist matches the dashboard's File Manager (image/{jpeg,png,gif,webp}, video/{mp4,avi,mov,webm,3gpp,mkv,wmv}, audio/{mpeg,wav,ogg,aac,mp4}, application/pdf, MS Office formats, text/plain, text/csv). Files outside the allowlist return 400 unsupported MIME.
Per-file failures show up under data.failed_files[] rather than failing the whole request β a single bad file does not sink a 5-file upload. Each failed entry is {original_name, reason, error_code}.
Thumbnails for IMAGE and VIDEO files under 25 MB are generated synchronously and returned in thumbnail_url. Larger files generate asynchronously β has_thumbnail: false on the initial response, populated on a subsequent read.
Upload media attachments βΊ Request Body
filesRepeated form key. 1-5 files. Server also accepts file (singular).
conversation_idOptional β required when sending in-chat, can be omitted for File Manager uploads.
sourceUpload media attachments βΊ Responses
Files uploaded. Inspect data.failed_files[] for per-file failures.
success