Skip to main content
The person linking this account registers its own Backend Systems app and key pair, which needs an Epic on FHIR developer account. For production, each health system must activate your client ID and map it to an Epic user before calls work. Epic’s sandbox needs neither.

Find your FHIR R4 Base URL

Your FHIR R4 Base URL is the address of the health system’s Epic FHIR R4 server. Leave it empty to connect to Epic’s sandbox.

  • Find the health system’s address under Production Endpoints in Epic’s endpoint directory, or ask the health system’s Epic team.
  • Format: https://{host}/{path}/api/FHIR/R4, with no trailing slash
  • Example: if the directory lists https://fhir.example-health.org/FHIR/api/FHIR/R4/, your FHIR R4 Base URL is https://fhir.example-health.org/FHIR/api/FHIR/R4

Host your key set

Your Private Key (PKCS8 PEM) for this account comes from a key pair you create. Epic reads its public key from a JWK Set URL that uses HTTPS, is publicly reachable and needs no sign-in.

1

Generate the key pair

Run these commands to create a 2048-bit RSA private key, a copy of it in PKCS8 PEM format, and a JSON Web Key Set (JWKS) with its public key.

  • Run them once for non-production and again, in another folder, for production. Epic needs a different JWK Set URL for each.
2

Publish the key set

Host each jwks.json at its own HTTPS address that anyone can open without signing in, such as a public storage bucket or your website.

  • Open each address in a private browser window and check that it shows the key set.

Register a Backend Systems app

Your Backend Systems app issues the Client ID you enter for this account and sets which Epic APIs it may call.

1

Create the app

Sign in to Epic on FHIR and open Build Apps.

  • Click Create.
  • Application Name: StackOne
  • Select Backend Systems as the user type.
2

Set up OAuth 2.0

Backend Systems apps use OAuth 2.0 to get access tokens.

  • Check Use OAuth 2.0.
  • App FHIR Version: R4
3

Add the APIs

Epic grants the app only the APIs you add, and health systems review the list before they activate the app.

  • Check Incoming API.
  • Under Incoming APIs, add each of these APIs:
  • Patient.Search (Demographics) (R4)
  • Patient.Read (Demographics) (R4)
  • AllergyIntolerance.Search (Patient Chart) (R4)
  • AllergyIntolerance.Read (Patient Chart) (R4)
  • Condition.Search (Problems) (R4)
  • Condition.Read (Problems) (R4)
  • Condition.Search (Encounter Diagnosis) (R4)
  • Condition.Read (Encounter Diagnosis) (R4)
  • Condition.Search (Health Concerns) (R4)
  • Condition.Read (Health Concerns) (R4)
  • Condition.Search (Medical History) (R4)
  • Condition.Read (Medical History) (R4)
  • MedicationRequest.Search (Signed Medication Order) (R4)
  • MedicationRequest.Read (Signed Medication Order) (R4)
  • MedicationAdministration.Search (R4)
  • MedicationAdministration.Read (R4)
  • Observation.Search (Labs) (R4)
  • Observation.Read (Labs) (R4)
  • Observation.Search (Vital Signs) (R4)
  • Observation.Read (Vital Signs) (R4)
  • Observation.Search (Social History) (R4)
  • Observation.Read (Social History) (R4)
  • Observation.Search (Flowsheets) (R4)
  • Observation.Read (Flowsheets) (R4)
  • DiagnosticReport.Search (Results) (R4)
  • DiagnosticReport.Read (Results) (R4)
  • Binary.Read (Labs) (R4)
  • Binary.Read (Radiology Results) (R4)
  • Procedure.Search (Orders) (R4)
  • Procedure.Read (Orders) (R4)
  • Procedure.Search (Surgeries) (R4)
  • Procedure.Read (Surgeries) (R4)
  • Immunization.Search (Patient Chart) (R4)
  • Immunization.Read (Patient Chart) (R4)
  • Encounter.Search (Patient Chart) (R4)
  • Encounter.Read (Patient Chart) (R4)
  • Appointment.Search (Appointments) (R4)
  • Appointment.Read (Appointments) (R4)
  • DocumentReference.Search (Clinical Notes) (R4)
  • DocumentReference.Read (Clinical Notes) (R4)
  • Binary.Read (Clinical Notes) (R4)
  • ServiceRequest.Search (Orders) (R4)
  • ServiceRequest.Read (Orders) (R4)
  • Coverage.Search (Patient Insurance Information) (R4)
  • Coverage.Read (Patient Insurance Information) (R4)
  • Practitioner.Search (Organizational Directory) (R4)
  • Practitioner.Read (Organizational Directory) (R4)
  • CarePlan.Search (Longitudinal) (R4)
  • CarePlan.Read (Longitudinal) (R4)
  • CarePlan.Search (Encounter) (R4)
  • CarePlan.Read (Encounter) (R4)
  • CarePlan.Search (Outpatient) (R4)
  • CarePlan.Read (Outpatient) (R4)
  • CareTeam.Search (Longitudinal CareTeam) (R4)
  • CareTeam.Read (Longitudinal CareTeam) (R4)
  • Goal.Search (Patient) (R4)
  • Goal.Read (Patient) (R4)
  • Device.Search (Implants) (R4)
  • Device.Read (Implants) (R4)
  • FamilyMemberHistory.Search (R4)
  • FamilyMemberHistory.Read (R4)
  • ExplanationOfBenefit.Search (Claim) (R4)
  • ExplanationOfBenefit.Read (Claim) (R4)
  • QuestionnaireResponse.Search (Patient-Entered Questionnaires) (R4)
  • QuestionnaireResponse.Read (Patient-Entered Questionnaires) (R4)
  • AllergyIntolerance.Create (Patient Chart) (R4)
  • Condition.Create (Problems) (R4)
  • DocumentReference.Create (Clinical Notes) (R4)
  • Observation.Create (Vital Signs) (R4)
  • Observation.Create (Flowsheets) (R4)
  • Patient.match(PatientMatch)(R4)</strong></li><li><strong>Patient.match (Patient Match) (R4)</strong></li> <li><strong>Patient.summary (International Patient Summary) (R4)
  • Appointment.find(STU3)</strong></li><li><strong>Appointment.find (STU3)</strong></li> <li><strong>Appointment.book (STU3)
  • Bulk Data Kick-off
  • Bulk Data Status Request
  • Bulk Data File Request
  • Bulk Data Delete Request
4

Add the JWK Set URLs

Epic prompts for a non-production and a production JWK Set URL.

  • Non-production JWK Set URL: the address of your non-production jwks.json.
  • Production JWK Set URL: the address of your production jwks.json.
  • Click Save.
  • Note: Epic syncs a new app to its sandbox within about an hour.
5

Set the app ready for production

A health system can request the app only after you mark it ready for production. Epic’s sandbox skips this step.

  • On Build Apps, select the app.
  • Check the box to accept the Terms and Conditions.
  • Click Save and Ready for Production. Epic locks the API list from then on.
  • Give the health system your Production Client ID so they can request the app.
6

Activate the app for a health system

Activate the app once the health system’s request arrives.

  • Click Review and Manage Downloads for the app.
  • Select the environment type, non-production before production.
  • Select the JWK Set URL option. Epic uses the key set address you gave for that environment.
  • Click Activate.
7

Copy the credentials

Use the client ID and key file for the environment you are connecting. Copy the whole key file, including its BEGIN and END lines.

  • Sandbox: Copy the Non-Production Client ID across. Copy the whole non-production privatekey.p8 across to Private Key (PKCS8 PEM).
  • Production: Copy the Production Client ID across. Copy the whole production privatekey.p8 across to Private Key (PKCS8 PEM).
1

Connect

  • Click Connect.
  • If applicable, the provider will redirect you to a sign-in or authorization page. Complete the provider’s authorization flow.
  • Once authorization is successful, you will see a confirmation popup.
2

Use Actions

Connect an AI platform to the linked account’s actions. See AI Platforms.Other ways to call actions are listed in Protocols & SDKs.