Skip to main content
POST
/
vault
/
{id}
/
upload
Generate presigned upload URL for vault file
curl --request POST \
  --url https://api.case.dev/vault/{id}/upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "filename": "<string>",
  "contentType": "<string>",
  "metadata": {},
  "auto_index": true,
  "sizeBytes": 2684354560,
  "path": "<string>"
}
'
{
  "objectId": "cm123abc456",
  "uploadUrl": "https://vault-bucket.s3.amazonaws.com/objects/cm123abc456/contract.pdf?X-Amz-Algorithm=...",
  "expiresIn": 3600,
  "s3Key": "objects/cm123abc456/contract.pdf",
  "auto_index": true,
  "enableIndexing": true,
  "instructions": {
    "method": "PUT",
    "headers": {
      "Content-Type": "application/pdf"
    },
    "note": "Upload your file to the uploadUrl using PUT request. After upload completes, call POST /vault/:vaultId/upload/:objectId/confirm to record the result, then call POST /vault/:vaultId/ingest/:objectId to trigger processing."
  },
  "next_step": "POST /vault/vault_789/ingest/cm123abc456"
}

Authorizations

Authorization
string
header
required

API key starting with sk_case_

Path Parameters

id
string
required

Vault ID to upload the file to

Body

application/json
filename
string
required

Name of the file to upload

contentType
string
required

MIME type of the file (e.g., application/pdf, image/jpeg)

metadata
object

Additional metadata to associate with the file

auto_index
boolean
default:true

Whether to automatically process and index the file for search

sizeBytes
integer

File size in bytes (optional, max 5GB for single PUT uploads). When provided, enforces exact file size at S3 level.

Required range: 1 <= x <= 5368709120
path
string

Optional folder path for hierarchy preservation. Allows integrations to maintain source folder structure from systems like NetDocs, Clio, or Smokeball. Example: '/Discovery/Depositions/2024'

Response

Upload URL generated successfully

objectId
string

Unique identifier for the uploaded object

uploadUrl
string

Presigned URL for uploading the file

expiresIn
number

URL expiration time in seconds

s3Key
string

S3 object key for the file

path
string | null

Folder path for hierarchy if provided

auto_index
boolean

Whether the file will be automatically indexed

enableIndexing
boolean

Whether the vault supports indexing. False for storage-only vaults.

instructions
object
next_step
string | null

Next API endpoint to call for processing