Request URL

POST  https://api.dotcom-monitor.com/config_api_v1/template/{template_id}

Path Parameters

Field Type Required Description
template_id

string

true

The unique id of the template you need to edit.

Header Parameters

Content-Type: application/json
POST Content example
{
"Name": "email template",
"Subject": "Monitoring Alert ",
"Email_Reply_To": "reply@to.com",
"Template_Type": "Html",
"Error_Message": "Device: \u003c%Site_Name%\u003e\r\n
Location: \u003c%Location%\u003e\r\n
Error Code: \u003c%Error_Code%\u003e\r\n
Error Description: \u003c%Error_Dscr%\u003e",
"Test_Message": "Relax, nothing happened",
"Uptime_Message": "Life is good",
"Assigned_To": []
}

Required Body Parameters

To edit a template object parameters, we recommend you get an existed template info first and use the response as a sample.

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":"Template 398 has been updated"
}