Skip to main content
GET
Download a document
Returns the raw file bytes for a document. The response is the file itself — the Content-Type header carries the document’s MIME type and Content-Disposition carries the original filename. Use it to retrieve:
  • PDFs referenced by document_ids on a referral.
  • Documents fetched with POST /documents/fetch: chart files (documents[].id on a patient live fetch) and visit notes (visit_note_document_id).
  • Documents listed by GET /documents, including the EHR document inbox (fetch first when has_file is false).
A document from a live fetch or the inbox sync has no file until you fetch it. Until then this endpoint returns 409.

Path Parameters

  • id (string, required): The Cobalt document ID (UUID, with or without dashes).

Example Request

Response

On success, the response body is the raw file. Relevant headers:
  • Content-Type: The document’s MIME type (typically application/pdf).
  • Content-Disposition: attachment; filename="<original-filename>".
  • Content-Length: The file size in bytes.
On failure, the response is JSON:

Status Codes

  • 200: Document returned successfully.
  • 404: Document not found.
  • 409: The document’s file has not been fetched yet. Request it with POST /documents/fetch, then retry after the document.live_fetch_completed webhook.

Notes

  • Access is scoped to your organization — only documents associated with your linked accounts are returned.
  • Documents are stored as they were received from the EMR. PDFs are returned unmodified.

Authorizations

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

Path Parameters

id
string
required

Cobalt document ID (UUID, with or without dashes).

Example:

"f47ac10b58cc4372a5670e02b2c3d479"

Response

The document file

The response is of type file.