Add Email Template

API Type

REST

HTTP Method

POST

Description

Adds an email template to the AgilePoint system.

URL Format (On Premises)

https://[domain]:[port]/AgilePointServer/Admin/AddEMailTemplate

URL Format (AgilePoint for Azure)

https://[domain]:[port]/AgilePointService/Admin/AddEMailTemplate

Request Parameters

Name Description
None Not Applicable

Request Body Properties

Name Description

TemplateOwnerID

Definition:
The ID for a process template owner.
Type
string
Allowed Values:
A valid process template owner ID.

MailTemplateXML

Definition:
The XML for an email template.
Type
string
Allowed Values:
Valid XML that represents an email template.

JavaScript Code Example

$("#btnAddEMailTemplate").click(function () {
  var JSONObject = {
    TemplateOwnerID: null,
    MailTemplateXML: "< email template xml data>"
  };
  $.ajax({
    url: "https://mydomain:9011/AgilePointServer/Admin/AddEMailTemplate",
    data: JSON.stringify(JSONObject)
  });
});

Java Code Example

public String AddEMailTemplate() {

  String URI = "https://mydomain:9011/AgilePointServer/Admin/AddEMailTemplate";

  HTTPOperations ops = new HTTPOperations(domain, userName, 
                       password, appID, locale);

  JSONObject postData = new JSONObject();
  
    postData.put("TemplateOwnerID", "BBB82AAE37054A1AB469FB480028A7A3");
    postData.put("MailTemplateXML", "<email template xml data>");

    return ops.POSTMethod(URI, postData.toString());
  return "";
}

C# Code Example

public string AddEMailTemplate()
  {
    string URI = "https://mydomain:9011/AgilePointServer/Admin/AddEMailTemplate";

    string jsonRequestData = "{
      \"TemplateOwnerID\":\"" + null + "\",
      \"MailTemplateXML\":\"" + '<process template XML string>' + "\"}";

    HTTPOperations ops = new HTTPOperations(domain, this.userName, 
                         password, appID, locale);

    return ops.POSTMethod(URI, jsonRequestData);
  }

Output

The ID of the new email template.

JSON Response Body Example

"B460E2AF110E42ED97CE13CBFF42AB7B"

Supported Versions

AgilePoint BPMS v5.0 R2 and higher