Skip to content
Hermes Health API
GuidesOpenAPI spec

Endpoints

Auth check

GET/v0/auth-check/{filename}

Retrieve a standalone auth check

Fetch the extraction, derived verdicts, and presigned URLs for a standalone auth-check upload.

token is required, whether or not you embed the UI: the embedToken returned by PUT /v0/auth-check/<filename> when you sent the patient’s details, or one minted for this same document via POST /v0/auth-check/<filename>/embed-token. It carries the patient data the patient-comparison checks (patientName, patientDateOfBirth, signerName, capability, minorAuthorization, deceasedAuthorization) compare against.

Each way the token can fail has its own message, so none reads as a bad API key: a missing token is rejected with 400, and an expired token, an altered or unrecognised one, and one minted for a different filename are each rejected with 401. A filename that is not a single path segment of at most 255 bytes, starts with a dot, or has no name before its extension is rejected with 400.

A null field in verdicts means that check did not run — it does not mean the check passed. With no record request behind it, datesOfService judges the form on its own here and fails only when the form asks for dates of service and leaves them blank; a HITECH authorization type detected on the document clears the revocation / redisclosure / conditioning / sensitive-info verdicts; documentValidity is null when no supporting documents raise a concern. sensitiveInformationRequests is one verdict over every sensitive category; the per-category detail is the extraction’s sensitiveInformationRequests. purposeAlignment needs the owning project’s purpose, which a standalone submission has none of, so it never runs here.

While the analysis is still running, verdicts is null as a whole. Poll on verdicts, not extraction: extraction can already be present, with empty data, before the analysis finishes.

The extraction schema evolves as we expand document-type and edge-case coverage. If you are rendering the result to end users, prefer the iframe embed over consuming this schema directly — see Embedding the auth-check UI.

This endpoint also returns a presigned uploadUrl. That is preserved for backwards compatibility — new integrations should use PUT /v0/auth-check/<filename> to obtain an upload URL, which avoids the extra S3 read-side work this endpoint performs.

A sandbox API key, and any token minted for one, reads a fixed sample result: the analysis of a hypothetical authorization for the patient John Doe, whatever was uploaded, with no downloadUrl. The token is still required and checked as above.

Parameters

  • filenamestringpath, required

    The standalone auth-check document's file name, scoped to your user.

  • tokenstringquery, required

    Required. The `embedToken` from the `PUT /v0/auth-check/{filename}` response, or one minted for this document via `POST /v0/auth-check/{filename}/embed-token`; supplies the patient context the comparison verdicts run against.

ReturnsSuccess

  • uploadHeadersobject

    Extra headers to send with the upload. Normally empty.

  • expiresIninteger

    How long the URLs in this object stay valid, in seconds from when they were issued. Fetch a fresh object rather than caching one.

  • looseFilesobject[]

    Other files stored under this file's location that are not part of its own document set, such as separately uploaded scans, each with its own short-lived download URL. Empty when there are none or when this response only offers an upload.

  • looseFiles[].urlstring

    Short-lived presigned URL to download the file.

  • looseFiles[].fileNamestring

    The name a reader sees. For a record request's deliverables this is the unique name the shared presentation assigned (see `DeliverableView`), so it can differ from the object's own basename when two returns brought the same file name; everywhere else it IS the basename.

  • looseFiles[].keystring

    The file's full storage path, `/`-separated.

  • looseFiles[].sizeinteger

    The file's size in bytes.

  • looseFiles[].lastModifiedstring

    When the file was last written.

Conditional attributes

  • downloadUrlstring

    Short-lived presigned URL to download the file. Null when no file is stored yet, or when this response only offers an upload.

  • uploadUrlstring

    Short-lived presigned URL to upload the file: `PUT` the raw bytes to it exactly as issued, with no `Authorization` header. Uploading again replaces the file. Present only when the caller may write the file; null when it may not, or when this response only offers a download.

  • extractionobject

    The document's extraction (form data under `data`, plus text and page count). Null for non-auth-check files.

  • verdictsobject

    The auth-check verdicts derived from `extraction`. Null for non-auth-check files or when the document hasn't been analyzed.

  • verdictCountsobject

    Tally of `verdicts` by status, a readability convenience for API consumers. Null exactly when `verdicts` is null.

  • embedTokenstring

    Standalone auth-check embed token, pre-minted on the upload path when the caller supplies patient context alongside the request for an upload URL. Equivalent to the token from `POST /v0/auth-check/<filename>/embed-token`, saving that round-trip. It is required to read the result with `GET /v0/auth-check/<filename>?token=...`, whether or not you embed the UI. Null when no patient context was supplied; mint one with that `POST` before reading the result.

  • looseFiles[].folderstring

    The display folder this file sits in, `/`-joined, relative to the listing root. Populated only where a listing presents a tree — a record request's deliverables — and omitted from the payload otherwise.

Errors

400401404500

PUT/v0/auth-check/{filename}

Mint an upload URL and embed token for an auth check

Request a presigned S3 upload URL for a standalone auth-check file and, when you send the patient’s details, the embed token you need to read the result.

Use this endpoint whenever you need to upload — previously customers had to call GET /v0/auth-check/<filename> and pluck the uploadUrl out of a combined read/write response. Prefer this route: it never touches S3 on the read path, so it is cheaper and returns faster.

The body is the same patient-context body accepted by POST /v0/auth-check/<filename>/embed-token, and it is what produces the token: when you send it, the response carries an embedToken for this document. That token is required by GET /v0/auth-check/<filename>, whether or not you embed the UI. Omit the body if you don’t yet have the patient context (e.g. the user uploads first and fills the form later); embedToken is then null, and you must call POST /v0/auth-check/<filename>/embed-token before reading the result.

A body that is sent but does not parse (snake_case keys, a missing firstName, lastName or dateOfBirth, a date not written YYYY-MM-DD, or anything that is not JSON) is rejected with 400 naming what was wrong; it is never treated as no body.

Patient context sent here is stored with the submission, so it stays reviewable in the auth-checker’s Submissions tab after the one-hour embed token expires. Uploading again under the same filename records a new submission with the patient context sent that time.

The body may also carry an optional referenceId: your own identifier for the patient (an MRN or account number), at most 255 characters, shown in the Submissions tab so the submission can be matched back to your patient. A blank value is treated as absent, and a longer one is rejected with 400. It is stored with the submission only, never in the embed token.

filename must be a single path segment of at most 255 bytes, must not start with a dot, and must have a name before its extension; anything else is rejected with 400.

After a successful PUT to the returned uploadUrl, call GET /v0/auth-check/<filename>?token=<embedToken> to fetch the analysis payload and a presigned download URL for the uploaded object.

Each file written to the uploadUrl is checked as a run of its own and charged the Authorization Check fee once its check finishes. Write to an uploadUrl once, and request a new one for another document: writing to the same uploadUrl again starts another check and is charged again.

With a sandbox API key the request is checked exactly as above, but nothing is stored: the uploadUrl accepts the file and discards it unread, so it is never analyzed or billed, and the embedToken reads a fixed sample result for the patient John Doe.

Send ?quote=true to learn what checking the document would cost without minting an upload URL: filename and the body are checked as above, and the response is the fee quote. Nothing is stored or charged, so a quote is safe to repeat. Send the quote’s confirmationToken back as ?confirmQuote= with the same filename and body to make the call at no more than the quoted price.

Parameters

  • filenamestringpath, required

    The standalone auth-check document's file name, scoped to your user.

  • quotebooleanquery

    `true` to get what this call would cost without making it. The body is checked as the call would check it, and the response is a fee quote: nothing is created, changed, charged or sent. Leave it out, or send `false`, to make the call (an AI agent must confirm with `confirmQuote` instead). Any other value, or `quote` given more than once, is refused with `400`.

  • confirmQuotestringquery

    The `confirmationToken` of a quote for this same call, to make the call at no more than the quote's `totalHigh`. The method, path, query and body must be the ones that were quoted. A token is short-lived and is spent once the call starts, so a call that then fails needs a fresh quote. A person's or an API key's token is spent in memory, so it may be accepted again after a server restart within its lifetime; an AI agent's is journaled against its grant and is spent for good. An AI agent must send one: its call without a token is answered with the quote and not made. Anyone else may send one, or leave it out to make the call unconfirmed. Refused with `400` when it was altered or issued to another caller, when it is sent together with `quote=true`, or when `confirmQuote` is given more than once; with `409` when the call changed, the token expired or was already used, the call would now cost more than was quoted, or too many confirmations are outstanding, in which case retry shortly with the same token; and, for an AI agent, with `403` when the call would take it past the spending allowance it was given.

Request bodyapplication/json

The patient the document should be for. Optional: send it to receive an `embedToken`, or send no body at all to upload without patient details.

object & object

ReturnsSuccess

object | object

Errors

400401403404409500

DELETE/v0/auth-check/{filename}

Delete a standalone auth check

Permanently deletes a standalone auth-check submission: every stored version of the uploaded document, its analysis, the patient details sent with it, and any extra files uploaded under it with their analyses. Nothing can be restored afterwards. GET and HEAD on the filename then answer 404, and embeds minted for it stop loading. A submission uploaded before September 2026 also has a copy in a write-protected archive, retained for seven years from upload, which this call does not remove.

The delete itself charges nothing. Fees billed for the deleted document stay on your invoices; their download link is replaced by documentDeletedAt.

A submission whose analysis is still running is refused with 409: wait for GET /v0/auth-check/{filename} to report verdicts, then delete it. A file uploaded under the filename while the delete runs is kept, not deleted: the earlier versions are still removed and the call answers 409, so delete again once the new upload’s analysis finishes. A filename with nothing stored under it for your user answers 404, and x and x.pdf name the same submission. You can upload under the same filename again afterwards; it starts a new submission.

filename must be a single path segment of at most 255 bytes, must not start with a dot, and must have a name before its extension; anything else is rejected with 400.

With a sandbox API key there is nothing to delete, since nothing it uploads is kept: the call answers 204.

Parameters

  • filenamestringpath, required

    The standalone auth-check document's file name, scoped to your user.

ReturnsDone; there is nothing to return

Errors

400401404409500

POST/v0/auth-check/{filename}/embed-token

Mint an auth-check embed token

Mint an embed token for iframing the auth-check UI.

The token encapsulates the patient info and PDF storage key so the read-only embed view at GET /ui/auth-check/embed?token=... can render without any session or DB lookup. Tokens are stateless, sealed with authenticated encryption (encrypt-then-MAC, keyed apart from the generic URL-query oracle), and expire one hour after minting. The pdfStorageKey is derived server-side from the authenticated user, so a caller cannot mint a token for another user’s document.

The same token is also required by the JSON endpoint GET /v0/auth-check/<filename>?token=..., which uses its patient info to run the patient-comparison verdicts.

The patient info is also stored with the submission, so it stays reviewable in the auth-checker’s Submissions tab after the token expires. Minting again for the same filename with different patient info corrects it.

The body may also carry an optional referenceId: your own identifier for the patient (an MRN or account number), at most 255 characters, shown in the Submissions tab beside the patient. It is stored with the submission only, never in the token. Minting again with a different referenceId replaces it. Minting for the same patient without one, or with a blank one, keeps the reference already recorded, so a recorded reference cannot be removed this way; minting for a different patient drops it unless a new one is sent, and re-uploading the document clears it. A longer referenceId is rejected with 400.

filename must be a single path segment of at most 255 bytes, must not start with a dot, and must have a name before its extension; anything else is rejected with 400.

This endpoint is for the standalone flow (a document uploaded outside any patient context — typically via the auth-checker UI). For patient- or record-request-scoped documents, PatientOutput and RecordRequestOutput responses include a pre-minted embedToken field and this extra round-trip is unnecessary.

With a sandbox API key the body is checked as above but nothing is saved, and the token reads a fixed sample result for the patient John Doe.

See Embedding the auth-check UI for the full iframe integration guide.

Parameters

  • filenamestringpath, required

    The standalone auth-check document's file name, scoped to your user.

Request bodyapplication/json

object & object

ReturnsSuccess

  • tokenstring

    The embed token: an opaque encrypted string to pass to the embed as its `token` query parameter. It grants access to what it was minted for until it expires, so mint a fresh one rather than storing it.

Errors

400401404500