Skip to content

Hero Health Public API (1.0.0)

The Hero Health Public API enables healthtech partners to integrate with NHS GP practices connected to EMIS Web and TPP SystmOne.

Key capabilities

  • Patient messaging — Send SMS, email, and NHS App messages on behalf of a practice
  • Appointment booking — List available slots, create reservations, and confirm bookings
  • Patient management — Register and look up patients via PDS (Personal Demographics Service)
  • Webhooks — Subscribe to events such as appointment confirmations and write-to-record outcomes
  • Booking & form links — Generate sharable links for patient self-service flows
  • Elements — Generate access tokens for embedding pre-built Hero UI components

Authentication

All endpoints require an x-api-key and x-practice-group-id header. API keys are scoped to specific functionality (messaging, booking, booking links). Contact Hero support to request your key.

Rate limits

Rate limits are defined in your Partner agreement. If you exceed your limit you will receive a 429 Too Many Requests response.

Download OpenAPI description
Languages
Servers
Mock server
https://developer.herohealth.net/_mock/apis/public-api/openapi/
Staging
https://api.staging.htech.app/
Production
https://api.herohealth.net/

Practice Group

Manage practice group settings, access tokens, and configuration. Use the access token endpoint to generate short-lived JWTs for Hero Elements.

Operations

Patients

Register, search, and manage patient records. Supports PDS (Personal Demographics Service) lookups to trace patients against the NHS Spine.

Operations

Request

Retrieves a list of attachments for the patient.

Security
apiKeyAuth and practiceGroupId
Path
idstringrequired
curl -i -X GET \
  'https://developer.herohealth.net/_mock/apis/public-api/openapi/v1/patients/{id}/attachments' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-practice-group-id: YOUR_API_KEY_HERE'

Responses

Ok

Bodyapplication/json
dataArray of objectsrequired
data[].​ehr_partner_file_idstringrequired
data[].​file_namestringrequired
data[].​file_extensionstringrequired
data[].​created_atstring or null(date-time)required
countnumberrequired
Response
application/json
{ "data": [ {} ], "count": 0 }

Request

Retrieve a list of patients for the practice group. Filter by EMIS ID, NHS number, or date of birth using the field and search query parameters.

Security
apiKeyAuth and practiceGroupId
Query
fieldstring
Enum"emis_id""nhs_number""dob"
searchstring
curl -i -X GET \
  'https://developer.herohealth.net/_mock/apis/public-api/openapi/v1/patients?field=emis_id&search=string' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-practice-group-id: YOUR_API_KEY_HERE'

Responses

Ok

Bodyapplication/json
dataArray of objectsrequired
data[].​idstring^\d+$required
data[].​uidstring or null
data[].​emis_idstring or null
data[].​ehr_partner_idstring or null
data[].​dobstring or null(date-time)required
data[].​deceased_atstring or null(date-time)
data[].​titlestring or null
Enum"Baron""Baroness""Brigadier""Count""Colonel""Countess""Captain""Dame""The Dowager Viscountess""Dr"
data[].​first_namestring or null
data[].​last_namestring or null
data[].​sexstring or null
Enum"Not known""Not specified""Male""Female""Other"
data[].​nhs_numberstring or null
data[].​emailstring or null
data[].​emailsArray of strings or null
data[].​mobilestring or null
data[].​last_sync_atstring or null(date-time)
data[].​address_line_1string or null
data[].​address_line_2string or null
data[].​address_line_3string or null
data[].​countrystring or null
data[].​postcodestring or null
data[].​townstring or null
data[].​countystring or null
data[].​notesstring or null
data[].​verification_credentialsArray of strings or null
data[].​data_sourcestringrequired
Enum"hero""emis""pds""gha""systm_one"
data[].​restrictedboolean
Default false
data[].​sex_changed_atstring or null(date-time)
data[].​statusstringrequired
Enum"archived""unarchived"
data[].​ods_codestring or null
data[].​identifiersArray of objectsrequired
data[].​identifiers[].​sourcestringrequired
Enum"nhs""gha""ehr_partner""hero"
data[].​identifiers[].​namestringrequired
Enum"nhs_number""gha_number""ehr_partner_id""hero_id""hero_uid"
data[].​identifiers[].​rolestringrequired
Enum"main""secondary"
data[].​identifiers[].​labelstringrequired
Enum"NHS""GHA""EMIS""Hero""Systm One"
data[].​identifiers[].​valuestringrequired
data[].​ehr_registeredboolean or nullrequired
countnumberrequired
Response
application/json
{ "data": [ {} ], "count": 0 }

Request

Register a patient by tracing them against the NHS Spine via PDS (Personal Demographics Service). Provide an NHS number and date of birth, or alternatively a combination of forename, surname, DOB, and postcode.

If the patient already exists in Hero for this practice group, their existing patient_id is returned. If not found, Hero will create a new patient record using the demographics retrieved from PDS.

Common use case: Call this endpoint before sending a message or creating a booking to obtain the Hero patient_id.

Security
apiKeyAuth and practiceGroupId
Bodyapplication/jsonrequired
One of:
nhs_numberstringrequired

A valid NHS number

dobstring or null(date-time)required

ISO 8601 date format

Example: "1989-04-11"
ehr_partnerstringnon-empty
ehr_partner_idstringnon-empty
curl -i -X POST \
  https://developer.herohealth.net/_mock/apis/public-api/openapi/v1/patients/register_pds \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -H 'x-practice-group-id: YOUR_API_KEY_HERE' \
  -d '{
    "dob": "1989-04-11",
    "postcode": "string",
    "forename": "string",
    "surname": "string",
    "ehr_partner": "string",
    "ehr_partner_id": "string"
  }'

Responses

Ok

Bodyapplication/json
One of:
patient_idstring^\d+$required
Response
application/json
{ "message": "string", "login_url": "string" }

Messages

Send SMS, email, NHS App, and Hero-only messages to patients. Supports write-to-record to persist messages in the patient's EHR.

Operations

Booking

Create appointment reservations, confirm bookings, cancel, and reschedule. Query available slots filtered by location, practitioner, and appointment type.

Operations

Episode

Manage clinical episodes — containers for related patient interactions and messages.

Operations

Care Navigation

Manage care navigation pathways and patient submissions for triage workflows.

Operations

Prescription

Create and manage prescriptions.

Operations

Prescriptions

List and manage prescriptions.

Operations

WriteToRecord

Check the status of write-to-record operations for messages sent to the EHR.

Operations

Admin

Manage admin users, signatures, and preferences within a practice group.

Operations

ApiKey

List and manage API keys for your practice group.

Operations

Task

Manage tasks assigned to admin users.

Operations

Partner

Retrieve partner information and integrations.

Operations

Partners

Retrieve partner information and integrations.

Operations

Form

List and retrieve forms (questionnaires) configured for a practice group.

Operations

Form Response

Create, retrieve, and update form responses submitted by patients.

Operations

Subscriptions

Manage notification subscriptions and subscribers.

Operations

Webhooks

Subscribe to Hero events (e.g. appointment confirmations, write-to-record outcomes) and receive real-time notifications via HTTP callbacks.

Operations

Invoicing

Manage invoicing customers, products, coupons, and membership schemes.

Operations

Utilities

Utility endpoints for address lookup and SNOMED code validation.

Operations

Booking - HCA

Specialist booking endpoints for HCA (Healthcare Assistant) diary consultants and appointments.

Operations