For Agents
Look up patients, request clinical documents from health information networks, and run FHIR-based consolidated data queries against a tenant's medical record graph.
Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the Metriport Medical API, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with Metriport Medical API.
Register an organization and create the facilities a patient roster lives under
Manage patient demographics with create, retrieve, update, and remove operations
Trigger document queries that pull clinical records from connected HIE networks for a patient
GET STARTED
Use for: I need to register a new patient under a facility, Find all clinical documents for a given patient, Retrieve a consolidated FHIR bundle for a patient I'm onboarding, Get a download URL for a specific medical document
Not supported: Does not handle clinical scheduling, billing, claims submission, or e-prescribing — use for patient demographics, document retrieval, and FHIR consolidated queries only.
The Metriport Medical API gives developers programmatic access to healthcare facilities, patients, and FHIR-formatted clinical documents. It supports patient demographics, document queries against connected health information networks, bulk document download, and consolidated FHIR data queries — making it useful for digital health products that need a unified view of a patient's medical history. Authentication uses a tenant API key passed in the x-api-key header.
Download patient documents individually or as a bulk archive
Run consolidated FHIR data queries that return a unified resource bundle for a patient
Patterns agents use Metriport Medical API for, with concrete tasks.
★ Patient Onboarding with Auto-Document Pull
Digital health products onboarding a new patient can register the patient via POST /patient and immediately trigger POST /document/query/{patientId} to pull historical records from connected health information exchanges. This delivers a consolidated medical history within minutes of signup, without requiring the patient to upload PDFs manually.
Create a patient under facility 'fac_123' with demographics, then call POST /document/query/{patientId} and poll for completion.
Consolidated FHIR for Care Coordination
Care coordination tools need a single FHIR view spanning encounters, conditions, medications, and lab results. POST /patient/{patientId}/consolidated/query starts the query and the agent retrieves the resulting bundle, which already conforms to FHIR R4 so it can drop into existing clinical decision systems without translation.
Start a consolidated query for patient 'pat_456' filtered to Encounter and Condition resources and return the resulting FHIR bundle.
Bulk Document Migration
When a clinic switches EHRs or pulls historical archives, POST /document/bulk/download/{patientId} produces a packaged set of documents for a patient that can be ingested into the new system. Combined with /facility and /patient listings, this supports systematic migration without per-document manual handling.
List all patients in facility 'fac_789', then for each patient start a bulk document download and collect the resulting URLs.
Agent-Assisted Clinical Lookups Through Jentic
An AI agent supporting a clinician can fetch a patient's consolidated record on demand by searching Jentic for the operation, loading the input schema for /patient/{patientId}/consolidated/query, and executing with the patient ID. The Metriport x-api-key never enters the agent context — Jentic injects it at execution time.
Search Jentic for 'get a patient's consolidated FHIR record', load the operation, and execute with patient ID and the requested resource types.
16 endpoints — the metriport medical api gives developers programmatic access to healthcare facilities, patients, and fhir-formatted clinical documents.
METHOD
PATH
DESCRIPTION
/patient
Create a patient under a facility
/patient/{id}
Retrieve a patient by ID
/document/query/{patientId}
Start a document query for a patient
/document/bulk/download/{patientId}
Start a bulk document download
/patient/{patientId}/consolidated/query
Start a FHIR consolidated query
/document/upload/{patientId}
Upload a document to a patient record
/patient
Create a patient under a facility
/patient/{id}
Retrieve a patient by ID
/document/query/{patientId}
Start a document query for a patient
/document/bulk/download/{patientId}
Start a bulk document download
/patient/{patientId}/consolidated/query
Start a FHIR consolidated query
Three things that make agents converge on Jentic-routed access.
Credential isolation
The Metriport x-api-key is stored encrypted in the Jentic vault. Agents request operations and Jentic injects the header at execution time, so the API key never appears in the agent's context — important for HIPAA-relevant deployments.
Intent-based discovery
Agents search Jentic with intents like 'pull a patient's medical records' and Jentic returns the matching Metriport operation with its parameter schema, so the agent does not browse Metriport's documentation.
Time to first call
Direct Metriport integration: 2-4 days for auth, async document jobs, and FHIR bundle handling. Through Jentic: under 1 hour for the most common patient and document flows.
Alternatives and complements available in the Jentic catalogue.
Specific to using Metriport Medical API through Jentic.
What authentication does the Metriport Medical API use?
Metriport uses an API key passed in the x-api-key header. Through Jentic the key is stored encrypted in the vault and added to the request at execution time so the agent never sees it.
Can I retrieve a patient's full medical history with one call?
POST /patient/{patientId}/consolidated/query starts a job that produces a single FHIR bundle covering the resource types you request. You poll or webhook for completion and then GET the resulting bundle from the returned URL.
What are the rate limits for the Metriport API?
The OpenAPI spec does not enumerate fixed rate limits — they are set by your Metriport plan and the upstream health information network. Watch for 429 responses and stagger bulk document jobs across patients to avoid throttling.
How do I trigger a document pull for a new patient through Jentic?
Search Jentic for 'pull medical documents for a patient', load the POST /document/query/{patientId} operation, and execute with the patientId returned from POST /patient. Jentic handles the x-api-key from your stored credential.
Does Metriport return raw HL7 v2 messages?
No — Metriport normalises everything to FHIR R4 resources. If you specifically need raw HL7 v2 you would integrate directly with the source EHR or a separate HL7 broker.
Can I upload documents back into the patient record?
Yes. POST /document/upload/{patientId} attaches a document to the patient — useful for adding scans, intake forms, or external lab results into the consolidated view.
/document/upload/{patientId}
Upload a document to a patient record