Request URL

Alert Templates can be created using two methods:

PUT https://api.dotcom-monitor.com/config_api_v1/templates
POST  https://api.dotcom-monitor.com/config_api_v1/templates?verb=PUT

 Header Parameters

Content-Type: application/json
Example PUT / POST body
{
"Name": "email template",
"Subject": "Monitoring Alert ",
"Email_Reply_To": "reply@to.com",
"Template_Type": "Html",
"Error_Message": "Error occurred",
"Test_Message": "Relax, this is just test message",
"Uptime_Message": "Device is back online",
}

Required Body Parameters

To specify a JSON object parameters for a new alert template, we recommend you get an existed template info first and use the response as a sample for a new template object.

The following fields are required in the request body:

Field Type Required/Optional Description

Name

String

required

Template name.

Example:

“Name”: “HTML Template”

Email_Reply_To

String

required

Example:

“Email_Reply_To”: “reply@company.com”

Template_Type

String

required

This Field defines template (message) type format.

Possible values:

  • HTML
  • TXT

Example:

“Template_Type”: “Txt”

Error_Message

String

required

Error Message Text.

Example:

“Error_Message”: “Error occurred”

Test_Message

String

required

Example:

“Test_Message”: “This is a test alert for device \u003c%Site_Name%\u003e. If you have any questions please contact \u003c%Contact_Full_Name%\u003e”

Uptime_Message

String

required

Example:

“Uptime_Message”: “Device \u003c%Site_Name%\u003e detected to be back online at \u003c%Monitor_DateTime%\u003e from monitoring location: \u003c%Location%\u003e”

Assigned_To

Array containing int32 values

required

This array contains list of device ids where alert group was assigned.

Example:

“Assigned_To”: [8533, 8534,9756]

Success Response

Example response
{
"Success":true,
"Result":398
}
Field

Type

Description

Result

int32

The unique id for the template.