Reprocess an eligible stored document
Atomically reserve a durable receipt and dispatch identity, then acknowledge only a real Upload admission. Requires current application, document grant and patient processing consent. Reuses a retained privacy-checked checkpoint, preserves document identity and history, and admits exactly one new attempt at expectedAttempt. Identical application-scoped Idempotency-Key replay returns the original operation before checking a stale attempt, for 24 hours; changed intent conflicts. scrubPII may be omitted to preserve the mandatory stored policy or true to retain it; false is invalid. Admits first clinical processing after completed privacy-only storage (document_processing) and eligible completed or failed clinical runs (reprocessing). The owner atomically enables clinical extraction with the accepted attempt while preserving the earlier privacy-only history. Quarantine/OCR recovery requires separate owner authority. Receipt success means DIP completion; Atlas delivery remains independent in processing-status.
Path Parameters
- Type:document
Id required
Headers
- Type: stringIdempotency
- Key min length:1max length:255required
Body
- Type: integerexpected
Attempt min:1requiredInteger numbers.
- Type: stringreasonmax length:500
Non-sensitive operational reason.
- 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
curl 'https://api.dev.eno.health/v1/documents/{documentId}/processing-runs' \
--request POST \
--header 'Idempotency-Key: ' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"expectedAttempt": 1,
"scrubPII": true,
"reason": ""
}'
{
"id": "string",
"type": "document_processing",
"status": "queued",
"userId": "string",
"documentId": "string",
"attempt": 2,
"scrubPII": true,
"createdAt": "2026-11-16T18:04:16.339Z",
"updatedAt": "2026-11-16T18:04:16.339Z",
"failureCode": null,
"result": {
"resourceId": "string",
"resourceUrl": "../folder"
}
}