Appearance
sendEmailAlert ​
Sends an email alert for a given alertType. Currently only 'Forum' is supported for alertType but could be extended later to Chat or whatever we need.
Request ​
http
POST /rest/user/notification/emailAlertHeaders ​
| Header | Required | Description |
|---|---|---|
x-nextinteract-authtoken | Yes | Auth token returned from loginUser |
Parameters ​
| Parameter | Type | Required | Description |
|---|---|---|---|
version | Number | Yes | Version of this API. Currently version 1. |
alertType | String | Yes | The type of email alert this relates to. Currently only 'Forum' is supported but this could be 'Chat' or whatever in the future. |
companyId | Number | Yes | The id of the company this relates to. NOTE: this assumes that Forums, Chats etc relate to a SAM Company (which usually they will). This however may break if/when we permit user-to-user chat for instance but we can review then. |
keyId | String | Yes | The id relating to the alertType. For Forum the keyId is the assetId. |
emailTitle | String | Yes | The title (subject) of the email to be sent. |
emailDescription | String | Yes | The description (body) of the email to be sent. |
emailLink | String | Yes | Would fill the button in the generic email template. |
emailTemplate | String | Yes | FUTURE USE. Original intention was to pass thru a client-specific email template. |
emailLogoURL | String | Yes | A URL of the logo image to be injected into the generic template. |
SAMPLE REQUEST
json
{
"version": 1,
"alertType": "Forum",
"companyId": 3,
"keyId": "123", //asset id for Forums
"emailTemplate": "NOT USED YET!",
"emailLogoURL": "https://s3-ap-southeast-2.amazonaws.com/interact-technology-sydney/SAM/logo.png",
"emailTitle": "Email Subject goes here",
"emailDescription": "TEST OF testSendEmailAlert_OK",
"emailLink": "http://deeplink.or.url.com?whatever=whatevs"
}Response ​
200 OK ​
SAMPLE RESPONSE
json
{
"numberValue": 1
}Where numberValue is the number of emails sent.
Errors ​
| Exception | Description |
|---|---|
WSInvalidParameterException | See Error Definitions |
WSUnsupportedVersionException | See Error Definitions |
WSInvalidAuthTokenException | See Error Definitions |
WSCacheServiceException | See Error Definitions |
WSInsufficientPrivilegesException | See Error Definitions |
WSRecordNotFoundException | See Error Definitions |
WSAuthorisationServiceException | See Error Definitions |
WSEmailServiceException | See Error Definitions |
WSUserPreferenceServiceException | See Error Definitions |
WSNotificationServiceException | See Error Definitions |