Medplum Fhir API

Medplum's FHIR R4 REST API, as described by its own OpenAPI (https://api.medplum.com/openapi.json): batch/transaction, search, create (incl. conditional create via If-None-Exist), conditional update (upsert), $validate, read, update, patch, delete and history; OAuth2 / OpenID Connect, bearer and basic security schemes.

Business capability
Healthcare Interoperability Operations BC-2900.60

Operations 11

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /fhir/R4 Batch or Transaction #
POST /fhir/R4/{resourceType} Create a new FHIR resource · Create Resource #
Ask an LLM
“How do I add a brand-new Patient record to the FHIR server?”
“Can I post a new Encounter resource and have the server assign its id?”
Tell an agent
Create a new {resourceType} resource in the FHIR store.
Add a new Patient record for the person I'm registering.
PUT /fhir/R4/{resourceType} Conditional Update #
POST /fhir/R4/{resourceType}/$validate Validate Resource #
GET /fhir/R4/{resourceType}/{id} Fetch one FHIR resource by its id · Read Resource #
Ask an LLM
“How do I fetch a single Patient by its FHIR id?”
“What does the current version of a specific FHIR resource look like right now?”
Tell an agent
Get the current {resourceType} with id {id}.
Open Patient {id} and show me its details.
PUT /fhir/R4/{resourceType}/{id} Replace an existing FHIR resource · Update Resource #
Ask an LLM
“How do I overwrite an existing FHIR resource with a complete new copy?”
“Can I send the whole updated Patient body to replace the stored one?”
Tell an agent
Replace {resourceType} {id} with the full updated resource I provide.
Save my fully edited version of Patient {id} over the stored record.
DELETE /fhir/R4/{resourceType}/{id} Delete a FHIR resource · Delete Resource #
Ask an LLM
“How do I remove a FHIR resource from my Medplum project?”
“Can I delete a duplicate Patient record by its id?”
Tell an agent destructive · confirm first
Delete {resourceType} {id}.
Remove the duplicate Patient with id {id}.
PATCH /fhir/R4/{resourceType}/{id} Partially update a FHIR resource · Patch Resource #
Ask an LLM
“How do I change just one field on a FHIR resource without resending the whole thing?”
“Can I update only a couple of fields on an existing Observation in place?”
Tell an agent
Patch only the changed fields on {resourceType} {id}.
Apply a partial patch to Patient {id} to fix its phone number.
GET /fhir/R4/{resourceType}/{id}/_history List the version history of a FHIR resource · Read Resource History #
Ask an LLM
“How can I see every change ever made to a Patient record?”
“Which past versions exist for a given FHIR resource?”
Tell an agent
Show the full version history of {resourceType} {id}.
List all past revisions of Patient {id}.
GET /fhir/R4/{resourceType}/{id}/_history/{versionId} Fetch a specific past version of a FHIR resource · Read Version #
Ask an LLM
“How do I retrieve an older version of a FHIR resource by its version id?”
“Can I see exactly what a Patient record looked like at a particular revision?”
Tell an agent
Get version {versionId} of {resourceType} {id}.
Show me Patient {id} as it was at version {versionId}.

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/medplum:medplum-fhir-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

medplum-fhir-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Medplum - OpenAPI 3.0 Fhir API
  description: Medplum OpenAPI 3.0 specification. Learn more about Medplum at https://www.medplum.com.
  termsOfService: https://www.medplum.com/terms
  contact:
    email: hello@medplum.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  version: 1.0.5
servers:
- url: https://api.medplum.com/
security:
- BasicAuth: []
- BearerAuth: []
- OpenID: []
- OAuth2: []
tags:


# --- truncated at 32 KB (3062 KB total) ---
# Full source: https://artifacts.apis.io/medplum/openapi/medplum-fhir-api-openapi.yml