Skip to main content
POST
/
vault
/
{id}
/
objects
/
{objectId}
/
presigned-url
Generate presigned URL for object operations
curl --request POST \
  --url https://api.case.dev/vault/{id}/objects/{objectId}/presigned-url \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "operation": "GET",
  "expiresIn": 3600,
  "contentType": "<string>"
}
'
{
  "objectId": "<string>",
  "vaultId": "<string>",
  "filename": "<string>",
  "s3Key": "<string>",
  "operation": "<string>",
  "presignedUrl": "<string>",
  "expiresIn": 123,
  "expiresAt": "2023-11-07T05:31:56Z",
  "instructions": {},
  "metadata": {
    "contentType": "<string>",
    "sizeBytes": 123,
    "bucket": "<string>",
    "region": "<string>"
  }
}

Authorizations

Authorization
string
header
required

API key starting with sk_case_

Path Parameters

id
string
required

The unique identifier of the vault

objectId
string
required

The unique identifier of the object

Body

application/json
operation
enum<string>
default:GET

The S3 operation to generate URL for

Available options:
GET,
PUT,
DELETE,
HEAD
expiresIn
integer
default:3600

URL expiration time in seconds (1 minute to 7 days)

Required range: 60 <= x <= 604800
contentType
string

Content type for PUT operations (optional, defaults to object's content type)

Response

Presigned URL generated successfully

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