Reserve a direct storage upload
Reserve a document and its quota before sending bytes. Available only for a currently attested directUploadMaxSizeBytes in documentFormats. The returned five-minute target sends one exact-size, SHA-256-declared encrypted part directly to storage; use every required header and keep the URL and encryption headers secret. No Partner API bearer is sent to the storage target. Registration starts no processing. Current documents:write authority, application ownership, patient grant, processing consent, MIME entitlement and policy apply again at completion. Identical Idempotency-Key retries retain the original document and absolute expiry; a received retry returns its receipt without another target. Ordinary multipart and batch uploads retain their separate limits. Mandatory privacy redaction cannot be disabled.
Path Parameters
- Type:user
Id required
Headers
- Type: stringIdempotency
- Key min length:1max length:255required
Body·
- Type: stringcontent
Type min length:1requiredMIME type with a current positive directUploadMaxSizeBytes capability.
- Type: stringfile
Name min length:1max length:255requiredFilename limited to 255 UTF-8 bytes and an enabled extension.
- Type: stringsha256required
- Type: integersize
Bytes min:1max:52428800requiredMust also fit the current attested MIME capability and patient quota.
- Type: stringexternal
Id max length:128 - Type: booleanextract
Data False selects scan, OCR and mandatory redaction without clinical extraction or publication.
- scrub
P I I const:true
Responses
- application/json
- application/problem+json
- application/problem+json
- application/problem+json
- application/problem+json
- application/problem+json
- application/problem+json
- application/problem+json
- application/problem+json
- application/problem+json
- application/problem+json
- application/problem+json
curl 'https://api.dev.eno.health/v1/users/{userId}/document-uploads' \
--request POST \
--header 'Idempotency-Key: ' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"fileName": "",
"contentType": "",
"sizeBytes": 1,
"sha256": "",
"externalId": "",
"extractData": true,
"scrubPII": true
}'
{
"document": {
"id": "string",
"userId": "string",
"externalId": "string",
"title": "string",
"language": "string",
"documentDate": "2026-11-16",
"issuers": [
{
"name": "string",
"type": "unknown",
"address": "string"
}
],
"fileName": "string",
"contentType": "string",
"sizeBytes": 0,
"status": "uploading",
"pageCount": 0,
"createdAt": "2026-11-16T18:04:15.851Z",
"updatedAt": "2026-11-16T18:04:15.851Z",
"uploadedAt": null
},
"uploadTarget": {
"method": "PUT",
"url": "https://example.com",
"expiresAt": "2026-11-16T18:04:15.851Z",
"requiredHeaders": {
"additionalProperty": "string"
}
}
}