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.

Three steps to make a document searchable:
  1. Create a vault (once per case)
  2. Upload your file
  3. Process it (we call this “ingest”)
After processing, the document is fully searchable by meaning.

Step 1: Create a vault

A vault is a container for your documents. Create one per case or matter.
Endpoint
POST /vault
curl -X POST https://api.case.dev/vault \
  -H "Authorization: Bearer $CASEDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Smith v. Hospital 2024",
    "description": "Discovery and depositions"
  }'
Response
{
  "id": "vault_abc123xyz",
  "name": "Smith v. Hospital 2024",
  "description": "Discovery and depositions",
  "enableIndexing": true,
  "createdAt": "2025-01-15T10:30:00Z"
}

Vault options

OptionDefaultDescription
namerequiredDisplay name for the vault
descriptionoptionalDescription of the vault’s purpose
groupIdoptionalAssign the vault to a group for access control
enableIndexingtrueEnable vector search. Set false for storage-only vaults
enableGraphtrueEnable GraphRAG knowledge graph (requires indexing)
If your API key is scoped to specific groups, groupId is required and must be a group the key has access to.

Storage-only vaults

If you only need document storage without search capabilities, create a storage-only vault:
curl -X POST https://api.case.dev/vault \
  -H "Authorization: Bearer $CASEDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Archive Storage", "enableIndexing": false}'
Storage-only vaults skip vector bucket and index creation. Files can be uploaded and downloaded, but search and GraphRAG are unavailable. Use this for pure archival or when you’ll process documents externally.

Step 2: Upload a file

Uploading is two parts: get a secure URL, then PUT your file to it.
Endpoint
POST /vault/:id/upload
# 1. Get upload URL
UPLOAD=$(curl -s -X POST "https://api.case.dev/vault/$VAULT_ID/upload" \
  -H "Authorization: Bearer $CASEDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filename": "deposition.pdf", "contentType": "application/pdf"}')

UPLOAD_URL=$(echo $UPLOAD | jq -r '.uploadUrl')
OBJECT_ID=$(echo $UPLOAD | jq -r '.objectId')

# 2. Upload the file
curl -X PUT "$UPLOAD_URL" \
  -H "Content-Type: application/pdf" \
  --data-binary "@deposition.pdf"

Why two steps?

Security and speed. Your file goes directly to encrypted storage—we’re never a bottleneck for large uploads.

Supported file types

TypeExtensions
Documents.pdf, .doc, .docx, .txt, .rtf, .xml
Images.png, .jpg, .jpeg, .tiff, .bmp
Audio.mp3, .m4a, .wav, .flac, .ogg
Video.mp4, .webm, .mov

Step 3: Process the file

This is where the magic happens. Processing (we call it “ingest”) does different things based on file type:
File typeWhat we do
Scanned PDF, imagesOCR to extract text
Audio, videoTranscribe with speaker labels
Digital PDF, DOCX, TXT, RTF, XMLExtract text directly
Then for all files: split into chunks, convert to vectors, index for search.
Endpoint
POST /vault/:vaultId/ingest/:objectId
curl -X POST "https://api.case.dev/vault/$VAULT_ID/ingest/$OBJECT_ID" \
  -H "Authorization: Bearer $CASEDEV_API_KEY"

Processing time

FileTime
10-page clean PDF~10 seconds
50-page scanned PDF~2-3 minutes
300-page scanned PDF~12-15 minutes
1-hour audio/video~5-10 minutes
Processing is async—you get an immediate response while we work in the background. Polling works, but webhooks scale better and give your users faster updates.
  1. Create a vault event subscription
  2. Receive lifecycle events as ingestion progresses
  3. Update your app state from webhook payloads
curl -X POST "https://api.case.dev/vault/$VAULT_ID/events/subscriptions" \
  -H "Authorization: Bearer $CASEDEV_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "callbackUrl": "https://your-app.com/webhooks/case-vault",
    "eventTypes": ["vault.ingest.completed", "vault.ingest.failed"]
  }'
Webhook delivery is at-least-once. Use the payload id as your idempotency key and design handlers to safely process duplicates.
Need the full webhook flow (signatures, retries, test endpoint, event catalog)?
See Vault Webhooks →

Check status (polling fallback)

# Poll until status is "completed"
curl "https://api.case.dev/vault/$VAULT_ID/objects/$OBJECT_ID" \
  -H "Authorization: Bearer $CASEDEV_API_KEY"

Complete example

Upload an entire folder of discovery documents:
casedev vault create --name "Matter 2024-1234 Discovery"
Metadata matters. Add metadata like witness, document_type, or date when uploading—you can filter search results by these fields later.

Next: Search your documents

Now that your documents are processed, learn how to search them →