Skip to main content
POST
Upload a document
Documents are processed asynchronously. You’ll receive a webhook notification when the upload is complete or if there was an error.

Example Request

To attach the document to an existing referral or order instead of a folder, send association_type and association_id (the Cobalt id from GET /v1/referrals or GET /v1/orders) in place of folder_name:
To route the document to a staff member for review, send emr_assigned_to_id. This is the EMR-native staff ID, not a Cobalt ID. Valid IDs are the ehr_id values returned by GET /v1/staff.

Example Response

Example Success Webhook

Example Failure Webhook

Authorizations

client_id
string
header
required
client_secret
string
header
required
access_token
string
header
required

Body

multipart/form-data
document
file
required

The document file to upload (PDF, JPEG, or PNG; max 30MB).

patient_mrn
string
required

Medical Record Number of the patient the document is for.

Example:

"12345"

folder_name
string

Destination folder in the EMR. Either folder_name or template_name is required.

Example:

"Lab Results"

template_name
string

Destination template in the EMR (max 255 chars). Either folder_name or template_name is required.

Example:

"Progress Note"

emr_assigned_to_id
string

EMR staff ID to assign the document to. Validated against the account’s staff; valid ids are the ehr_id values from GET /v1/staff.

Example:

"staff-123"

is_reviewed
string

Whether the document should be flagged for review in the EMR. One of: "true", "false".

Example:

"false"

notes
string

Free-text notes for the document (max 1000 characters).

Example:

"Please review before the next visit."

is_high_priority
string

Whether the document is high priority. One of: "true", "false".

Example:

"false"

location_id
string

EMR location ID the document belongs to. Validated against the account’s locations.

Example:

"location-1"

tags

Tags to attach to the document. Repeat the field for multiple tags.

Example:
association_type
enum<string>

Attach the document to an existing entity instead of a chart folder. One of: "referral", "order". When set, association_id is required and folder_name/template_name must be omitted. eClinicalWorks only.

Available options:
referral,
order
association_id
string

Cobalt id of the entity to attach to (the referral id from GET /v1/referrals, or the order id from GET /v1/orders). Required when association_type is set.

callback_urls

URLs to receive the completion webhook for this document, in addition to the account webhook.

Example:

Response

Document uploaded and queued for delivery

success
boolean
required
message
string
required
document_id
string
required
job_id
required