Description
Creates a new email notification template.
Package Details
Interface
IEmailNotificationManager
Syntax
Task RegisterNotification(EmailNotificationTemplateDto notificationTemplateDto);
Returns
Task
API Endpoint
POST
/api/v1/notification-template
Parameters
Parameter | Description | Parameter Type |
---|---|---|
emailNotificationTemplate | Email Notification Template JSON. | Request body |
Sample request body
Code Block | ||
---|---|---|
| ||
{
"Name": "string",
"ServiceName": "string",
"BodyTextEnglish": [
"string"
],
"BodyTextFrench": [
"string"
],
"HasBodyParameters": true,
"SubjectTextEnglish": "string",
"SubjectTextFrench": "string",
"HasSubjectParameters": true
} |
Returns
200 OK - When successful
400 Bad Request - Unable to create the template
Example
Code Block | ||
---|---|---|
| ||
const string serviceName = "ServiceName";
const string subjectTextEnglish = "Eng_Subject";
const string subjectTextFrench = "Fra_Subject";
const string templateName = "template name";
var bodyTextFrench = new string[] { "This is French Body Text" };
var bodyTextEnglish = new string[] { "This is English Body Text" };
var emailNotificationTemplateDto = new EmailNotificationTemplateDto
{
Name = templateName,
ServiceName = serviceName,
BodyTextFrench = bodyTextFrench,
BodyTextEnglish = bodyTextEnglish,
SubjectTextEnglish = subjectTextEnglish,
SubjectTextFrench = subjectTextFrench,
HasSubjectParameters = false,
HasBodyParameters = false
};
var result = await emailNotificationManager.RegisterNotification(emailNotificationTemplateDto); |