Upload Documents

Unified async upload - delegates to upload_pipeline().

Four usage scenarios:

  1. Conversation upload: Provide conversation_id only (child_id inferred)
  2. Standalone upload: Provide child_id only (no conversation link)
  3. Explicit override: Provide both (rare edge case)
  4. Infer conversation: Set infer_conversation=true with child_id (mobile chat)

REQUIREMENT: Must return 202 Accepted within 2 seconds Document processing happens asynchronously via worker queue

Authentication: JWT required via Authorization header RLS: Automatically enforced through user_client isolation

Args: files: List of files to upload (single or multiple) child_id: Optional UUID of child (inferred from conversation_id if not provided) conversation_id: Optional UUID linking to a conversation infer_conversation: Set to "true" to infer conversation_id from user's JWT idempotency_key: Optional key to prevent duplicate uploads on retry owned_by_note: Set to "true" when the files are being attached to a note, whose card draws them (see upload_pipeline) request: FastAPI request object for JWT authentication

Returns: 202 Accepted response with document_ids array and tracking information

post/documents/upload

Request

  • Base URL
    https://api.projectindi.com (the document declares no server; this is the origin it was published from)
  • Auth
    none declared

Request body multipart/form-data

filesstring[] required
child_idstring nullable
conversation_idstring nullable
infer_conversationstring nullable
idempotency_keystring nullable
owned_by_notestring nullable

Response

Successful Response

unknown required

Changes

No recorded changes to this operation across all 2 revisions of this API.