Skip to main content

Send Message with File Upload

POST 

/v1/conversations/with-uploads

Upload files and send a message with file attachments in a single request.

Combines document upload to KMS and message sending into one API call:

  1. Resolves a collection for the uploaded files
  2. Uploads each file to KMS (initiate → blob storage → queue for processing)
  3. Sends the message with file metadata to the agent

Collection Resolution Order:

  • Uses collection_id if explicitly provided
  • Falls back to the conversation's existing collection_id (if conversation_id given)
  • Creates a new hidden collection with quick parsing strategy as last resort

Response format is identical to the Send Message endpoint:

  • Streaming (stream: true): Server-Sent Events
  • Non-streaming (stream: false): JSON with message, conversation_id, message_id
  • Background (run_in_background: true): Empty HTTP 202 response; processing continues in-process

Request​

Responses​

Files uploaded and message sent successfully. Returns JSON for non-streaming or Server-Sent Events for streaming requests.