---
title: API Reference
description: The Huli Public API is a standards-based FHIR REST surface — the safest bet for an EHR, lab, or billing integration. Browse resources, auth, and scopes.
nav: API
order: 0
version: v1
source: handwritten
updated: 2026-08-17
---

# API Reference

**The Huli API is a standards-based FHIR REST surface** — the safest bet for an
EHR, lab, or billing integration. Read and write real clinical data through the
same FHIR resources your existing tools already speak, with one OAuth flow and
one scope model across both FHIR R4 and R5.

<WhyFhirShowcase />

## Why FHIR first

FHIR is the data model the healthcare integrator community already runs on.
Adopt it once and every downstream system — EHR, HIE, lab, billing, and your own
AI agent — understands your data without a per-vendor adapter. Every resource
here maps a standard FHIR shape to the underlying HuliPractice record; a couple
of endpoints (authentication, capability discovery) are plain REST and clearly
marked.

Both **FHIR R4** (the stable default) and **FHIR R5** are served side by side —
same token, same scopes, same pagination. Switch releases with the **R4 / R5**
control in the sidebar, or from the switch on any resource page.

## Explore the API

<BentoGrid>

<BentoCard icon="layers" :wide="true" title="Browse FHIR resources" description="Every R4 and R5 resource — Patient, Appointment, Encounter, Observation, and more — with interactions, scopes, and search parameters." chip="/v1/api/resources" href="/v1/api/resources" />

<BentoCard icon="key" title="Authentication" description="SMART Backend Services — client_credentials with private_key_jwt, plus admin bearer keys to start fast." chip="POST /auth/token" href="/v1/auth" />

<BentoCard icon="lock" title="Scopes" description="The least-privilege system/Resource.* access model, shared identically across both releases." chip="system/Patient.rs" href="/v1/scopes" />

<BentoCard icon="alert" title="Errors" description="Every failure is a FHIR OperationOutcome carrying a stable HPB- code — branch on it, no string matching." chip="HPB-00101" href="/v1/errors" />

<BentoCard icon="list" title="Choosing R4 vs R5" description="What differs between the two releases, and which one to target for your integration." chip="R4 · R5" href="/v1/api/fhir-versions" />

</BentoGrid>
