Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.case.dev/llms.txt

Use this file to discover all available pages before exploring further.

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

casedev vault create --name "Matter 2024-1234 - Discovery"

Step 2: Subscribe to ingestion events

Use webhooks to get notified when documents finish processing instead of polling.
casedev vault ingest --id $VAULT_ID --object-id $OBJECT_ID
Your webhook endpoint receives events like:
Webhook payload
{
  "id": "evt_abc123",
  "eventType": "vault.ingest.completed",
  "vaultId": "vault_abc123",
  "objectId": "obj_xyz789",
  "data": { "status": "completed" }
}
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

casedev vault upload \
  --id $VAULT_ID \
  --filename "document.pdf" \
  --content-type "application/pdf"

Step 4: Trigger ingestion

Ingestion runs OCR (if needed) and generates embeddings for search. Your webhook will fire when each document finishes.
casedev vault ingest --id $VAULT_ID --object-id $OBJECT_ID

Step 5: Search your documents

Once your webhook confirms ingestion is complete, documents are searchable.
casedev vault search \
  --id $VAULT_ID \
  --query "search query"

Complete example

casedev vault create --name "Matter 2024-1234 - Discovery"
Production tip: For large document sets (1000+), use parallel uploads with a concurrency limit of 10-20 to maximize throughput while avoiding rate limits.