Appearance
sendEmailToExternalUsers ​
Allows an INTERACT end user to send an email to users "external" to the platform e.g. HCP sending to patient and/or carer. Also works for sending to internal users. See: TP#15915.
Request ​
http
POST /rest/user/send/email/externalHeaders ​
| Header | Required | Description |
|---|---|---|
x-nextinteract-authtoken | Yes | Auth token returned from loginUser |
x-nextinteract-company-api-key | Yes | Admin-specific API key UUID provided to company |
Parameters ​
Multi-part form data request containing:
| Parameter | Type | Required | Description |
|---|---|---|---|
toEmailAddresses | string | Yes | Comma-separated text array of email addresses to send to e.g one@one.com, two@two.com etc. Max 10 email addresses. |
emailSubject | string | Yes | Subject of email. Max 255 chars. |
emailBody | string | No | HTML body of email. Max 30000 chars including HTML tags. |
emailDisclaimer | string | No | HTML email disclaimer. Max 4000 chars. |
attachments | file(s) | No | 1-M file attachments. Max 20Mb. |
If you need help, let Aaron know as it's difficult to paste a binary multi-part form request in here.
Response ​
200 OK ​
HTTP 200 means it succeeded but if you must have a message then see below
JSON response:
json
{
"errorCode": 0,
"errorMsg": "OK"
}Errors ​
| Exception | Description |
|---|---|
WSInvalidParameterException | See Error Definitions |
WSInvalidAuthTokenException | See Error Definitions |
WSCacheServiceException | See Error Definitions |
WSMaxFileUploadSizeException | See Error Definitions |
WSEmailServiceException | See Error Definitions |
WSRecordNotFoundException | See Error Definitions |
WSCompanyApiKeyNotActiveException | See Error Definitions |
WSIncorrectApiKeyTypeException | See Error Definitions |
WSInternalException | See Error Definitions |