Overview
Metriport sends webhook messages to your app as data becomes available in our system. This allows you to react to events in real-time rather than polling for updates. For information on how to set up webhooks, see Implementing Webhooks.Webhook Categories
Metriport webhooks are organized into five categories based on their event type prefix:Network Query Events
Prefix:
network-query.*- Start a Network Query for a patient
- Receive
network-query.*webhooks as each source completes - Download the patient record from the
consolidatedDataUrlin the payload
Event Types
network-query.hie.first-data-ready is sent at most once
per HIE query, when the first batch of HIE data becomes
available. Its source.status is processing and it carries a
firstDataReadyAt timestamp instead of completedAt. You
will still receive the standard network-query.hie
webhook (with source.status completed or failed)
once the HIE query finishes.The
network-query.hie.first-data-ready webhook is an
opt-in feature and is only enabled on request. Contact
us to have it turned on for
your account.Example Payloads
Example Payloads
HIE Example:Pharmacy Example:Lab Example:HIE First Data Ready Example:
Schema Reference
Schema Reference
Medical Data Events
Prefix:
medical.*Event Types
medical.consolidated-data
You’ll receive this webhook after invoking a Consolidated Query via POST Start Consolidated Data Query.
The payload contains the patient’s consolidated medical record as deduplicated, standardized FHIR data. This includes all converted documents from network queries plus any FHIR data your application has inserted directly.
Note that inside the Bundle you’ll find a DocumentReference resource with attachments in the content array:
- The first item contains an attachment with a
urlwhich can be used to download the data. - If requested
conversionTypeisjson, an additional attachment withcontentType: "application/gzip"provides a gzip-compressed copy for faster downloads. - Download URLs are valid for 3 minutes
If there was no data available for the Patient, the Bundle
will be empty (the entry array will have no elements).
- Call Start Consolidated Data Query for a patient
- Receive this webhook
- Download the data from the presigned URLs in the bundle
Example Payload
Example Payload
Schema Reference
Schema Reference
medical.bulk-patient-create
You’ll receive this webhook after invoking a bulk patient creation via POST Bulk Create Patient.
The payload reports the status of the bulk creation job, allowing you to process large CSV files of patient demographics asynchronously.
Note that you’ll receive multiple webhooks for a single bulk create request:
- First, a webhook with
status: "processing"confirming the job started - Then, a webhook with
status: "completed"containing a presigned URL to download the results CSV with created patient IDs - Or, a webhook with
status: "failed"containing areasonexplaining what went wrong - Download URLs are valid for 3 minutes
- Call Bulk Create Patient with a CSV file
- Receive webhooks as the job progresses
- Download the results CSV from the presigned URL
Example Payload
Example Payload
Schema Reference
Schema Reference
medical.document-bulk-download-paged
You’ll receive this webhook after invoking a bulk document download via POST Bulk Get Document URL.
The payload provides presigned download URLs for all documents belonging to the specified patients.
When there are many documents, the payload is automatically split into multiple webhook pages to keep each under 200KB.
Each page shares the same requestId but has a unique messageId. Use the pagination field to determine the
current page number and total pages.
- Download URLs are valid for 10 minutes
- Pages are sent sequentially with a 50ms delay between them
If you’re receiving the legacy
medical.document-bulk-download-urls webhook, please
contact us to migrate to
medical.document-bulk-download-paged.Example Payload
Example Payload
Schema Reference
Schema Reference
When documents are split across multiple webhook pages,
all pages share the same
requestId but each has a unique
messageId in the meta field. Use the pagination
field to determine the current page number and the total
number of pages (totalPages).Webhooks are sent sequentially with a 50ms delay between
pages to avoid overwhelming your webhook endpoint.
Message Events
Prefix:
message.*Event Types
message.status
You’ll receive this webhook after invoking POST Send Message.
The payload reports the final delivery status of the message — either when the recipient acknowledges receipt, or when delivery fails.
You will receive one webhook per send request, with a status of completed or failed based on the outcome of the operation.
Recommended flow:
- Call Send Message for a patient
- Receive this webhook when delivery completes or fails
- Optionally confirm status via Get Message Status
Example Payloads
Example Payloads
Completed (recipient acknowledged receipt):
Schema Reference
Schema Reference
message.received
You’ll receive this webhook when another practitioner sends a secure message to your organization.
The payload includes the message metadata and a presigned URL to download the full message content and attachments.
Recommended flow:
- Receive this webhook
- Download the message from the
urlin the payload - Process the message and associated patient data in your application
Example Payload
Example Payload
Schema Reference
Schema Reference
Patient Notification Events
Prefix:
patient.*Event Types
Each webhook includes a
url to download a FHIR Bundle containing the complete encounter data.
Example Payload (patient.admit)
Example Payload (patient.admit)
Full Documentation
See the complete Real-time Patient Notifications guide for
detailed schemas, all event types, and the FHIR Encounter
model.
Individual Access (IAS) Events
Prefix:
ias.*Event Types
ias.identity.verified
Sent when the user successfully completes the hosted identity session started with
Create Identity Session. Store the
proofedIdentityId from this payload and pass it on
Start Network Query requests where the
purposeOfUse query parameter is ias.
Example payload:
Any
metadata you supplied when creating the identity session is echoed under meta.data when
configured for your integration.
Passing Metadata
You can pass metadata when calling endpoints that support webhooks. This metadata will be returned in themeta.data field of the webhook. You may use this to attach whatever metadata is relevant for your use-case - for example, external IDs.
Below is an example payload you could send in the request body of one of those endpoints and how you would use the sdk:
Note that the metadata param supports up to 50 custom string key-value pairs, with keys up to 40 chars, and values of up to 500 chars.
Metriport SDK

