Skip to main content

Architecture

Prerequisites

  • Case.dev API key
  • Node.js 18+ or Python 3.9+
  • Documents to process (PDFs, images, Word docs)

Step 1: Create a vault

Step 2: Subscribe to ingestion events

Use webhooks to get notified when documents finish processing instead of polling.
Your webhook endpoint receives events like:
Webhook payload
Webhook delivery is at-least-once. Use the id field as an idempotency key and design handlers to safely process duplicates. See Vault Webhooks for signing and retry details.

Step 3: Batch upload documents

Step 4: Trigger ingestion

Ingestion runs OCR (if needed) and generates embeddings for search. Your webhook will fire when each document finishes.

Step 5: Search your documents

Once your webhook confirms ingestion is complete, documents are searchable.

Complete example

Production tip: For large document sets (1000+), use parallel uploads with a concurrency limit of 10-20 to maximize throughput while avoiding rate limits.