Skip to main content
POST
Upload a document
Safety
  • Writes data: Yes. Stores the file on the patient and starts text extraction. A DOCUMENT_STATUS_CHANGED webhook fires when extraction finishes.
  • Safe to retry: Only with external_id: a repeat with the same external_id returns 409 with the existing record instead of a duplicate. Without it, a retry creates a second record.
  • Contacts an outside system: None
  • Dry run: Not available.
Guide: Webhooks. Errors: Error catalog.

Authorizations

X-API-Key
string
header
required

API key obtained from /api/v1/ext-api-keys

Headers

Idempotency-Key
string

Makes a retry of this request safe. A repeat with the same key and the same request within 24 hours does not run again: it returns the original status with the resource as it is now, and an Idempotent-Replayed: true header. Keys are scoped to your organization and API key. See https://docs.healos.ai/idempotency. Up to 255 printable ASCII characters. Use a new random value (a UUID) for each new request and resend the same value when you retry it.

Required string length: 1 - 255
Example:

"5f0c3a8e-2b7d-4c1e-9a64-0d3f2e1b7c90"

Path Parameters

patientId
string
required

Patient ID

Example:

"1743552000000"

Body

multipart/form-data
file
any | null

The file to upload

external_id
string

Optional caller-supplied identifier. Unique per organization; immutable once set.

Required string length: 1 - 255
Example:

"PARTNER-DOC-456"

Response

Document uploaded. The file is stored and, in the normal case, text extraction is queued to run asynchronously — the returned document is then typically pending. If extraction could not be queued, the file is still saved and message reflects that (trigger extraction later via the extract endpoint). Poll the GET endpoint to track extraction status.

data
object
required
message
string
required

Human-readable status. text extraction started when extraction was queued; text extraction deferred when the organization's daily document extraction limit was reached (extraction runs automatically after extraction_deferred_until); Document uploaded successfully if the file was stored but extraction could not be queued (retry via the extract endpoint).

Example:

"Document uploaded successfully; text extraction started"

extraction_deferred_until
string

Present only when extraction was deferred by the daily document extraction limit: ISO 8601 time the limit resets (next 00:00 UTC). Extraction runs automatically after it; no call is needed.

Example:

"2026-11-04T00:00:00.000Z"