Send a Message

Sends a message for a given patient to Hero. It has optional parameters relating to the message being sent.

SecurityapiKeyAuth and practiceGroupId
Request
Request Body schema: application/json
required
patient_id
required
string^\d+$

The Hero patient the message relates to

message_type
required
string

Defines if the message will be sent on via Hero's comms tools, and by what method

Enum: "hero" "sms" "email"
message_string
required
string non-empty

Message content to be sent from Hero

recipient_contact_detail
string

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).

write_to_record
boolean
Default: false

Flags if the message should be written to the EHR record post-approval

boolean or string
Default: false

Flags if the message should be encrypted

snomed_code
string

SNOMED code to be attached to the EHR record entry. Default value applied if not passed and write_to_record is true

snomed_term
string

SNOMED term to be attached to the EHR record entry. Default value applied if not passed and write_to_record is true

auto_write_to_record
boolean
Default: false

Param only considered if API key permissions allow. Automatically writes to the EHR record without requiring Hero admin approval

task_id
string

Task ID to be attached to a task

attachment_uuid
string non-empty
short_link_id
string non-empty
Responses
200

Ok

403

Unauthorised

500

Unknown error

post/v1/messages/send
Request samples
application/json
{
  • "patient_id": "string",
  • "message_type": "hero",
  • "message_string": "string",
  • "recipient_contact_detail": "string",
  • "write_to_record": false,
  • "encrypted": false,
  • "snomed_code": "string",
  • "snomed_term": "string",
  • "auto_write_to_record": false,
  • "task_id": "string",
  • "attachment_uuid": "string",
  • "short_link_id": "string"
}
Response samples
application/json
{
  • "message_id": "string"
}