Skip to content

Get a presigned R2 URL for patient upload

POST
/v1/sessions/{token}/uploads/presign

Public endpoint used by the patient-facing hosted form to upload prior reports (PDFs, images). Returns an R2 PUT URL. Files attach to the session automatically.

Parameters

Path Parameters

token
required
string

Request Body required

object
filename
required
string
prior_usg.pdf
mimeType
required
string
application/pdf
size_bytes

Optional; max 50MB

integer
245678

Responses

200

OK

object
upload_url

Pre-signed R2 PUT URL, expires in 15 minutes

string format: uri
document_id
string format: uuid
storage_key
string
uploadUrl
string format: uri
r2Key
string
documentId
string format: uuid

400

Validation error

object
error
required
string
Invalid link
code
integer
1003

413

File too large

object
error
required
string
Invalid link
code
integer
1003