Reference
Outbound webhooks
Outbound webhooks notify your server when something happens, so you don’t have to poll. You register endpoints in the Hermes Health web app; each endpoint is a destination URL plus the named events it receives and the scope they cover. Endpoints are configured entirely from the UI described below — there is no API to manage them today.
Configuring endpoints
A webhook endpoint is owned by your company, not by the person who created it, so it keeps delivering when that person leaves. Anyone in your company who holds the ManageWebhooks permission can edit it, delete it, or rotate its secret. What it delivers is limited to what a company administrator can see — see Scope. Email notifications are different: each one belongs to the person it emails, and only that person can change it.
Creating a webhook endpoint requires the ManageWebhooks permission — a webhook can deliver PHI to an external URL, so it is gated. (Personal email notifications delivered to your Hermes inbox live on a separate page, Settings → Notifications, for holders of ManageNotifications; those are out of scope for this section, which covers the webhook delivery channel.)
- Sign in to Hermes Health.
- Open Settings (top-right user menu, or navigate to
/settings). - Select the Webhooks tab, beside API (shown to
ManageWebhooksholders). - Add webhook, and set:
- URL — your receiver. Must be publicly resolvable; private and loopback addresses are rejected.
- Environment —
productionorsandbox. An endpoint receives only events from projects in its own environment, so you can point a sandbox endpoint at a test receiver while you build. (Sandbox projects auto-complete searches and requests, so they exercise the full webhook flow without real claims.) - Events — see Named events below.
- Scope — see Scope below.
- Payload — Full record (the default) sends the record each event is about; ID only sends empty
dataandprevious, for a receiver that reads the record from the API itself. See Delivery payload. You can change it later from the endpoint’s card. - Custom headers (optional) — up to 20 static
name: valueheaders sent on every delivery (e.g. anAuthorizationheader your receiver checks). The reserved headersContent-Type,Host, and theX-Webhook-*set cannot be overridden.
- Copy the endpoint’s signing secret — the UUID used to sign every delivery (see Verifying deliveries). You can regenerate it later from the same panel; see Rotating the secret.
Named events
Events are named group.event and grouped by product capability. Ticking a group subscribes the endpoint to every event in it; you can also tick single events. Each delivery’s eventType is the event’s name, and the top-level webhooks section of this spec documents each one.
- Record requests —
recordRequest.created,recordRequest.statusChanged(any new status), the category eventsrecordRequest.processing,recordRequest.needsResolution,recordRequest.completed,recordRequest.recordsNotFoundandrecordRequest.canceled(sent alongsiderecordRequest.statusChangedwhen a request moves into that category),recordRequest.authorizationNeedsResolution(sent alongside on every move intoAuthDeniedorNeedSiteSpecificAuth, including between the two, but not intoPaymentPending),recordRequest.followUpDue(once a day while the request’s follow-up date is on or before today; requires theConfigureFollowUpNotificationspermission), andrecordRequest.deliveryFailed(once per send to the facility that fails; see Delivery failed). - Site Sonar —
siteSonar.startedandsiteSonar.completed. - Patient Histories —
patientHistories.startedandpatientHistories.completed. - C-CDA Search —
ccdaSearch.startedandccdaSearch.completed. - Patients —
patient.created,patient.updated(name, date of birth, sex, contact details or ZIP codes) andpatient.searchStatusChanged. - Authorization —
authorization.statusChanged,authorization.approved,authorization.needsAttention(a move to any status other than approved) andauthorization.needsResolution(sent alongside on every move into a status that is neitherNeedsApprovalnorApproved, including between two of them, while the patient has Site Sonar or Patient Histories requested; a patient created alreadyAwaitingAuthorization, or one whose status already needs resolution when a product is newly requested, makes no move and is not sent it). - Clinical data —
clinicalData.added; see Net-new clinical data. - Notes —
note.createdandnote.updated. An endpoint belonging to a note’s author is not sentnote.createdfor that note. - AI research —
aiResearch.completed; see AI research completed. - Fees —
fee.siteFeeCreated; see Site fee created.
To learn that a search finished, subscribe to its .completed event: it is sent once per run, on every run, whatever the result. A patient created with a search already requested also sends that search’s .started.
Every event in a group carries the same kind of record in data, nested under the key its GET endpoint nests it under, so a receiver parses one shape per group:
| Group | data |
|---|---|
recordRequest | request: the record request, as in GET .../record-requests/{recordRequestId}; recordRequest.deliveryFailed adds deliveryFailure |
siteSonar | patient: the patient, as in GET .../patients/{patientId} |
patientHistories | patient: the patient |
ccdaSearch | patient: the patient |
patient | patient: the patient |
authorization | patient: the patient |
note | note: the note, as listed in its parent’s notes |
clinicalData | patients (see Net-new clinical data) |
aiResearch | siteId, siteName, url |
fee | feeId, amount, projectId, patientId, requestId, createdAt (see Site fee created) |
The record is the one the GET returns, minus the fields that GET builds on request: download and upload links, deliverable listings, authorization check results, partner delivery status, notes and embed tokens. GET the resource path for those. It is limited to what a company administrator can see, exactly as the GET is.
userId on the record is the ID of the user who created it, and ownerUserId the user it is assigned to; either is null when none is recorded. A change to either does not send a named event on its own.
data is the record as it stood when the event was processed. Changes that land within moments of each other can already show in data, and two status moves in quick succession can arrive as a single recordRequest.statusChanged. Treat data as a hint and GET the resource path for the authoritative state.
Scope
An endpoint’s scope answers two questions once, for all its events:
- Projects — every project in your account, including ones created later (the default), or only the projects you pick. Picked projects must all be sandbox or all production, and the endpoint takes their environment.
- Records — every record in your company. A webhook endpoint cannot be limited to the records one person follows, because it belongs to the company rather than a person; an attempt to save a tracked scope on a webhook is rejected. An email notification can still cover only the records its person follows (“Records I follow” in Settings → Notifications;
trackedon the wire): the records they created or are assigned, which they follow automatically, and any they followed by hand from the record’s page. Following cascades to everything beneath the record.
aiResearch.completed ignores the project filter: a researched site belongs to no project, and the event goes to the webhook endpoints of the company whose member started the run.
Net-new clinical data
siteSonar.completed and patientHistories.completed answer a run finished, whether that run grew the patient’s clinical record or merely re-confirmed what we already held. Subscribe to clinicalData.added (webhook endpoints only) when you need the other question answered: did anything actually change?
It fires only for patients whose run produced clinical content they did not already have, and carries the per-artifact-type counts of what is new. A run reports a batch of patients at once; each endpoint is sent only the patients its scope covers:
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2026-06-24T12:34:56Z",
"version": "events",
"eventType": "clinicalData.added",
"resource": "companies/1",
"changed": [],
"previous": {},
"data": {
"patients": [
{
"patient": { "id": "pat_456", "…": "the full patient resource" },
"project": { "id": "proj_123", "name": "Q3 underwriting" },
"source": "siteSonar",
"counts": {
"newVisits": 4,
"newDiagnoses": 3,
"newProcedures": 0,
"newPrescriptionFills": 1,
"newLabResults": 2
}
}
]
}
}
A run that produced nothing new sends nothing at all — there is no delivery carrying all-zero counts. Use the counts to decide whether re-fetching the patient’s clinical data is worth it.
source names which product’s run produced the counts — siteSonar, patientHistories, or sandboxSearch — or parsePass for a re-read of clinical data we already hold for the patient (see the next paragraph). It matters when a patient is enrolled in more than one: the products run and finish independently, so one cycle can deliver twice for the same patient, and each delivery’s counts describe only that source’s contribution. Where two sources report the same clinical line, both count it, so do not add the two deliveries together — take the larger, or simply treat any delivery as “re-fetch this patient”.
The counts are net-new to the patient for that source, not “rows the vendor returned this time”. We re-derive a patient’s clinical record from payloads we already hold whenever our parsing improves, and a re-derived line that merges onto an existing row leaves the row count untouched. The event compares clinical identity rather than row ids, so that merge is reported as new — while a plain re-confirmation of content you already have is not.
AI research completed
AI research is not owned by a company: a run is started by a person. Subscribe to aiResearch.completed on a webhook endpoint to be notified when a run started by anyone in your company finishes, or on your own email notification for the runs you start. Another company’s endpoints never fire. Bulk operator batches do not fire. Its data is siteId, siteName and url (a link to the site), and its resource is the researched site. Email deliveries use the same facts and never include the researched field values.
Site fee created
Subscribe to fee.siteFeeCreated to hear when a site fee is charged on a record request, whatever charged it. It goes only to the person who created the record request: their own email notification, or a webhook endpoint of the company they belong to. It is sent only while that person, or for a webhook your company, holds the ViewFees permission, and subscribing to it needs ViewFees too. The endpoint’s scope applies as for any record-request event: the request must be in a covered project and, for a notification on the records its person follows, a request they follow.
Its data is feeId, amount (in US dollars, as a decimal string), projectId, patientId, requestId and createdAt, and its resource is the fee (fees/{feeId}). The email states the amount and links to the record request. A site fee charged on no record request has no one to go to and is not sent, and a fee changed to a site fee after it was charged is not sent either.
Delivery failed
Subscribe to recordRequest.deliveryFailed to hear when a send of a record request to its facility fails: a fax that was not delivered, an email the facility’s address refused, a letter that was canceled before it was mailed, or a release-of-information request the service did not accept. It is sent once per failed send, on every channel, and a sandbox project’s reserved failing inputs send it exactly as a production failure does. It reaches the endpoints the request’s other events reach.
Its data is the request and deliveryFailure, the failed send: channel (fax, email, mail or roi), code (faxFailed, faxCanceled, emailRejected, mailCanceled or roiRejected; branch on it), message (a readable sentence for display) and failedAt. The request’s lastDeliveryFailure holds the same failure until a later send is accepted, which sets it back to null.
In production, an email the facility’s mail server refuses and a release-of-information request the service rejects fail during the send call, which answers an error and still sets lastDeliveryFailure and sends the event; a fax or letter fails after the call returns. In a sandbox project, every channel’s reserved failing value is accepted by the call and fails afterwards.
A failed send is not a status: the request keeps its status, no recordRequest.statusChanged is sent, and Hermes does not send it again. Decide the next step yourself: send the request again, through the same channel or another, or change it.
Delivery payload
Every delivery is a POST with a JSON envelope:
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"timestamp": "2026-06-24T12:34:56Z",
"version": "events",
"eventType": "recordRequest.completed",
"resource": "companies/1/projects/p_123/patients/pat_456/record-requests/req_789",
"changed": ["status"],
"previous": { "status": "RequestSent" },
"data": {
"request": { "id": "req_789", "status": "Completed", "patientId": "pat_456", "…": "the rest of the record request" }
}
}
id— unique delivery id, stable across retries. Dedupe on it (it is also sent in theX-Webhook-Idheader).timestamp— when the event was emitted (not the per-attempt send time; that rides the signedX-Webhook-Timestampheader).version— alwaysevents. A deprecated Classic delivery has noversionfield, so a receiver serving both can branch on its presence.eventType— the event’s name.resource— the path to the record. GET it with your bearer token when the payload isn’t enough.changed— the fields of the record indatawhose value changed, such asstatus(data.request.status); empty when the event is not a change, such as a.createdevent orrecordRequest.followUpDue.previous— the value each field inchangedheld before the event, such as{ "status": "RequestSent" }. Always present; an empty object when the event is not a change.data— the record the event is about, nested underrequest,patientornote(see Named events), or a run-driven event’s own payload. This is not the fullGETresponse for the resource — to download deliverables, read presigned URLs, or see check results, GETresource.
An endpoint whose Payload is set to ID only still sends id, timestamp, version, eventType, resource and changed, but data and previous are empty objects on every event, including clinicalData.added, aiResearch.completed and fee.siteFeeCreated. Read the record from resource when you need it.
Verifying deliveries
Each delivery carries three headers:
| Header | Meaning |
|---|---|
X-Webhook-Id | The delivery id; stable across retries (dedupe key). |
X-Webhook-Timestamp | Unix seconds when this attempt was signed. |
X-Webhook-Signature | HMAC-SHA256 signature(s), hex-encoded. |
To verify a delivery:
- Read
X-Webhook-Timestampand reject the request if it falls outside your freshness window (e.g. more than five minutes old) — this is what stops a captured request from being replayed. - Compute the hex-encoded
HMAC-SHA256of"{X-Webhook-Timestamp}.{raw_body}", keyed by the endpoint’s signing-secret UUID bytes (the 16 raw bytes — not the UUID’s string form), whereraw_bodyis the exact bytes you received. X-Webhook-Signaturemay carry multiple comma-separated signatures (see Rotating the secret). Accept the request if your computed value matches any of them, comparing in constant time.
Respond 2xx within 10 seconds to acknowledge. Any other response (or a timeout) is treated as a failure and retried.
Retries and auto-disable
A failed delivery is retried with exponential backoff — after the first attempt, again at 30s, 2m, 10m, 1h, and 6h (six attempts over roughly eight hours). A delivery that still hasn’t succeeded after 24 hours is abandoned. If an endpoint accumulates five consecutive failed deliveries it is automatically disabled and the person who last changed it is emailed; re-enable it from the Webhooks tab once your receiver is healthy (which also clears the failure count).
Rotating the secret
Regenerating the secret from the Webhooks tab opens a 24-hour grace window: during it, deliveries are signed with both the new and the old secret, and X-Webhook-Signature lists both (comma-separated). Roll your receiver to the new secret any time inside the window — because you accept a match against any listed signature, there is no delivery gap.
Reviewing deliveries and sending a test
The Webhooks → Delivery log tab lists every webhook delivery attempt and every email notification, with its channel, status (pending, succeeded, failed, abandoned), attempt count, and the last HTTP status code returned — use it to debug a misbehaving receiver. The Webhooks tab’s Send test button delivers one sample payload per subscribed group to the live URL synchronously and shows the result inline; test sends are single-attempt (never retried) and never count toward auto-disable.
Classic endpoints (deprecated)
Classic endpoints use column subscriptions instead of named events. They keep receiving exactly the deliveries they always did until January 31, 2027, and can still be created until then, though named events are recommended. On that date every Classic endpoint, webhooks and email notifications alike, is moved to named events automatically with the full record, even where the move loses something: eventType becomes the event’s name, the record is nested in data, the body carries version: events, and any column that maps to no event stops triggering a delivery. An endpoint that cannot be moved is stopped. Each Classic endpoint shows an Upgrade to Events button that previews the mapping before switching the endpoint over in one step (its URL, secret and headers carry over). Where its subscriptions had different scopes, the upgrade takes the broadest.
Subscriptions
A Classic subscription names an entity (recordRequest, patient, or note), a trigger (rowCreated, columnChanged — one of the subscribed columns changed value — or followUpDue, record-request only), a scope (companyWide; tracked is for email notifications only and is rejected on a webhook endpoint) and a columns list of camelCase column keys (e.g. status, searchStatus, patientId, or userId and ownerUserId for who created and is assigned the record). For columnChanged the columns both arm the trigger and are delivered; for rowCreated and followUpDue they are only delivered.
A Classic delivery’s eventType is <entity>.<trigger> — one of recordRequest.rowCreated, recordRequest.columnChanged, recordRequest.followUpDue, patient.rowCreated, patient.columnChanged, note.rowCreated, or note.columnChanged — its body is the envelope above without version or previous, and its data holds only the subscribed columns. On a Classic endpoint, do not subscribe to searchStatus alone to learn that a search finished: a repeat run that ends in the status it already had changes nothing and sends nothing. Watch the siteSonar, patientHistories and ccdaSearch request flags instead — or upgrade and use the .completed events.
A Classic endpoint can also opt into two whole events, picked from the Events group of the subscription builder’s Entity dropdown: clinicalDataAdded and aiResearchCompleted. Those Classic deliveries use a two-field envelope — eventType and data, with no id, timestamp, resource, changed or version — signed with an X-Webhook-Signature over the raw body alone (no X-Webhook-Timestamp, no X-Webhook-Id to dedupe on, and none of the endpoint’s custom headers), sent once with no retry and no auto-disable on failure. Their data is the same as clinicalData.added and aiResearch.completed.