Manage practice group settings, access tokens, and configuration. Use the access token endpoint to generate short-lived JWTs for Hero Elements.
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.
- 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
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.
- Mock serverhttps://developer.herohealth.net/_mock/apis/public-api/openapi/v1/messages/{id}
- Staginghttps://api.staging.htech.app/v1/messages/{id}
- Productionhttps://api.herohealth.net/v1/messages/{id}
- curl
- NodeJS
- Ruby
curl -i -X GET \
'https://developer.herohealth.net/_mock/apis/public-api/openapi/v1/messages/{id}' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-H 'x-practice-group-id: YOUR_API_KEY_HERE'{ "id": "string", "patient": { "id": "string", "title": "Baron", "first_name": "string", "last_name": "string" }, "write_to_record": { "write_to_record_at": "2019-08-24T14:15:22Z", "status": "string", "failure_reason": "string", "snomed_code": "string" }, "short_link": { "id": "string", "type": "string", "name": "string", "status": "string" }, "campaign": { "id": "string", "name": "string" }, "created_at": "2019-08-24T14:15:22Z", "sent_at": "2019-08-24T14:15:22Z", "scheduled_at": "2019-08-24T14:15:22Z", "status": "delivered", "sent_by_admin": { "id": "string", "first_name": "string", "last_name": "string" }, "recipient_contact_detail": "string", "message_type": "string", "message": "string", "attachments": [ { … } ] }
Request
Send a message to a patient via SMS, email, NHS App, or as a Hero-only audit record.
Message types:
sms— Sent via the practice's configured SMS provider (e.g. Firetext)email— Sent via Hero's email service (AWS SES)nhs_app— Delivered through the NHS Apphero— Not delivered to the patient; used as an audit log for messages sent externally
Set write_to_record: true to persist the message in the patient's EHR (EMIS/TPP) after clinician approval. Use auto_write_to_record: true (if permitted by your API key scopes) to skip the approval step.
Defines if the message will be sent on via Hero's comms tools, and by what method
Where the message will be sent (e.g. patient@email.com or +44 79000000000). If no value is provided a default will be picked from the patients record (for that contact method, SMS/Email).
Flags if the message should be written to the EHR record post-approval
Flags if the message should be encrypted
Flags if the message should be encrypted
SNOMED code to be attached to the EHR record entry. Default value applied if not passed and write_to_record is true
SNOMED term to be attached to the EHR record entry. Default value applied if not passed and write_to_record is true
Param only considered if API key permissions allow. Automatically writes to the EHR record without requiring Hero admin approval
- Mock serverhttps://developer.herohealth.net/_mock/apis/public-api/openapi/v1/messages/send
- Staginghttps://api.staging.htech.app/v1/messages/send
- Productionhttps://api.herohealth.net/v1/messages/send
- curl
- NodeJS
- Ruby
curl -i -X POST \
https://developer.herohealth.net/_mock/apis/public-api/openapi/v1/messages/send \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-H 'x-practice-group-id: YOUR_API_KEY_HERE' \
-d '{
"patient_id": "1234",
"message_type": "sms",
"message_string": "Dear patient, your appointment is confirmed for 15 March at 09:30.",
"recipient_contact_detail": "+447700900123",
"write_to_record": true
}'{ "message_id": "string", "content": "string", "created_at": "string", "snomed_code": "string", "write_to_record": true, "auth_token": "string", "confirm_write_to_record_url": "string", "submitted_by": "string", "send_at": "2019-08-24T14:15:22Z" }
- Mock serverhttps://developer.herohealth.net/_mock/apis/public-api/openapi/v1/messages/{id}/status
- Staginghttps://api.staging.htech.app/v1/messages/{id}/status
- Productionhttps://api.herohealth.net/v1/messages/{id}/status
- curl
- NodeJS
- Ruby
curl -i -X GET \
'https://developer.herohealth.net/_mock/apis/public-api/openapi/v1/messages/{id}/status' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-H 'x-practice-group-id: YOUR_API_KEY_HERE'{ "id": "string", "scheduled_send_at": "2019-08-24T14:15:22Z", "write_to_record": true, "status": { "write_to_record_at": "2019-08-24T14:15:22Z", "sent_at": "2019-08-24T14:15:22Z", "response": "delivered", "failure_reason": "string" }, "errors": { "write_to_record": "string", "send": "string" } }