Vaults

Secure Document Storage with Semantic Search - Encrypted document storage with built-in semantic search powered by vector embeddings.

The Vault API provides encrypted document storage with built-in semantic search powered by vector embeddings. Upload documents, automatically extract and embed content, then search using natural language queries.

Authentication

Include your API key in all requests:

Authorization: Bearer sk_case_your_api_key_here

Quick Start

Get started with vaults in 5 minutes:

# Set your API key
export API_KEY="sk_case_your_api_key_here"

# 1. Create a vault
VAULT_ID=$(curl -s -X POST https://api.case.dev/vault \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"My First Vault","description":"Testing the vault API"}' \
  | jq -r '.id')

echo "Vault ID: $VAULT_ID"

# 2. Upload a document
UPLOAD=$(curl -s -X POST https://api.case.dev/vault/$VAULT_ID/upload \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"filename":"test.pdf","contentType":"application/pdf"}')

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

# 3. Upload your file
curl -X PUT "$UPLOAD_URL" \
  -H "Content-Type: application/pdf" \
  --data-binary "@your-document.pdf"

# 4. Make it searchable
curl -X POST https://api.case.dev/vault/$VAULT_ID/ingest/$OBJECT_ID \
  -H "Authorization: Bearer $API_KEY"

echo "Processing for search... (check back in a few minutes)"

What's Next?