---
title: "Generate presigned upload URL for vault file"
method: POST
path: "/vault/{id}/upload"
tags: ["Vaults"]
---

# Generate presigned upload URL for vault file

`POST /vault/{id}/upload`

Generate a presigned URL for uploading files directly to a vault's S3 storage. After uploading to S3, confirm the upload result via POST /vault/:vaultId/upload/:objectId/confirm before triggering ingestion.

## Path parameters

- `id` string, required

## Request body

- object
  - `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 — 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.
  - `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 `200`

Upload URL generated successfully

- object
  - `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, nullable — 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
    - `method` string
    - `headers` object
    - `note` string
  - `next_step` string, nullable — Next API endpoint to call for processing

## Other responses

- `400` — Invalid request - missing required fields or invalid vault ID
- `401` — Authentication failed - invalid API key
- `403` — Access denied - API key lacks vault service permissions
- `404` — Vault not found or access denied

---

[API](https://skmtc.net/casemark/apis/case-dev-api.md) · [All operations](https://skmtc.net/casemark/apis/case-dev-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/casemark/case-dev-api/versions/5b7e64e6d6f9/schema)
