---
title: "Generate presigned URL for object operations"
method: POST
path: "/vault/{id}/objects/{objectId}/presigned-url"
tags: ["Vaults"]
---

# Generate presigned URL for object operations

`POST /vault/{id}/objects/{objectId}/presigned-url`

Generate presigned URLs for direct S3 operations (GET, PUT, DELETE, HEAD) on vault objects. This allows secure, time-limited access to files without proxying through the API. Essential for large document uploads/downloads in legal workflows.

## Path parameters

- `id` string, required
- `objectId` string, required

## Request body

- object
  - `operation` 'GET' | 'PUT' | 'DELETE' | 'HEAD' — The S3 operation to generate URL for
  - `expiresIn` integer — URL expiration time in seconds (1 minute to 7 days)
  - `contentType` string — Content type for PUT operations (optional, defaults to object's content type)
  - `sizeBytes` integer — File size in bytes (optional, max 5GB for single PUT uploads). When provided for PUT operations, enforces exact file size at S3 level.

## Response `200`

Presigned URL generated successfully

- object
  - `objectId` string — The object identifier
  - `vaultId` string — The vault identifier
  - `filename` string — Original filename
  - `s3Key` string — S3 object key
  - `operation` string — The operation type
  - `presignedUrl` string — The presigned URL for direct S3 access
  - `expiresIn` integer — URL expiration time in seconds
  - `expiresAt` string, date-time — URL expiration timestamp
  - `instructions` object — Usage instructions and examples
  - `metadata` object
    - `contentType` string
    - `sizeBytes` integer
    - `bucket` string
    - `region` string

## Other responses

- `400` — Invalid request parameters or operation
- `401` — Invalid or missing API key
- `403` — API key lacks vault service permissions
- `404` — Vault or object not found

---

[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)
