API Docs - For Review
/
No Results Found
Notification Templates

Notification Templates

Notification templates API documentation

Download Notification Templates OpenAPI Document

Attribute

id
string
Unique ID for the template
name
string
Display name of the template
description
string
Description of the template
share_type
string
NONE => template is allowed only for that user and super admin
ALL => template is allowed for all users
RESTRICTED => template is allowed for selected users and super admin
module
string
Display name of the module
is_default
boolean
If true it is default notification template
configurations
object
It store custom config for templates
Show Sub-Attributes arrow
attachment_settings_enabled
boolean
If true, it indicates that the template has advanced settings for attachments. This is used to show advanced settings in the UI.
attachment_type
boolean
If true, it indicates that attachments should be sent as files. If false, attachments are sent as mail content.
attach_empty_files
boolean
If true, it indicates that empty files should not be attached. If false, empty files will be attached.
mail
object
Contains mail attributes
Show Sub-Attributes arrow
to
array
Contains mail id values for TO recipient
cc
array
Contains mail id values for CC recipient
subject
string
Subject of the mail
content
string
Body of the mail
severity
string
To store the severity of the mail.
Allowed Values:
  • LOW
  • MEDIUM
  • HIGH
attachment_ids
array
List of attachment ids used in the mail template
attachments
array
The data of the mail attachment added in the RT Editor
Show Sub-Attributes arrow
id
string
Unique ID for the attachment
name
string
Name of the file on the client side
file
binary
The file to upload as an attachment.
inline_images
array
List of inline images ids used in the mail template
sms
object
Show Sub-Attributes arrow
to
array
Mobile numbers to send SMS
content
string
Content of the SMS

Example

{ "id": "200000000000001", "name": "New mail template", "description": "Admin template", "share_type": "ALL", "module": "Reports", "is_default": true, "configurations": { "attachment_settings_enabled": true, "attachment_type": false, "attach_empty_files": true }, "mail": { "to": [ "a@A.com", "V@A.com" ], "cc": [ "b@A.com", "b@A.com" ], "subject": "Report available", "content": "Mail content goes here", "severity": "low", "attachment_ids": [ "200000000000001" ], "attachments": [ { "id": "200000000000001", "name": "Active_User_Sessions.csv", "file": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA..." } ], "inline_images": [ "200000000000001" ] }, "sms": { "to": [ "+91-9807654321" ], "content": "Sample sms text" } }

Get all notification templates

Retrieves a list of notification templates, optionally filtered by module.
OAuth Scope : id360.notification_template.read,id360.notification_template.all

Query Parameters

fields
Comma-separated list of fields to include in the response.
eg: id,name,description,share_type,module,is_default,configurations,mail,sms
from
Start index for pagination.
limit
Maximum number of records to return in the response.
eg: 50
filter
Filter users based on a the provided SCIM filter query. Refer to filter section for more details
eg: name eq "New mail template" and module eq "Reports"

Request Example

Click to copy
headers_data = Map(); headers_data.put("Accept", "application/json"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://id360.manageengine.com/api/v1/templates/notification" type: GET headers: headers_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://id360.manageengine.com/api/v1/templates/notification") .get() .addHeader("Accept", "application/json") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { Accept: 'application/json', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://id360.manageengine.com/api/v1/templates/notification', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("id360.manageengine.com") headers = { 'Accept': "application/json", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/templates/notification", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "id360.manageengine.com", "port": null, "path": "/api/v1/templates/notification", "headers": { "Accept": "application/json", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url https://id360.manageengine.com/api/v1/templates/notification \ --header 'Accept: application/json' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "data": [ { "id": "200000000000001", "name": "New mail template", "description": "Admin template", "share_type": "ALL", "module": "Reports", "is_default": true, "configurations": { "attachment_settings_enabled": true, "attachment_type": false, "attach_empty_files": true }, "mail": { "to": [ "a@A.com", "V@A.com" ], "cc": [ "b@A.com", "b@A.com" ], "subject": "Report available", "content": "Mail content goes here", "severity": "low", "attachments": [ { "id": "200000000000001", "name": "Active_User_Sessions.csv" } ], "inline_images": [ "200000000000001" ] }, "sms": { "to": [ "+91-9807654321" ], "content": "Sample sms text" } } ], "meta": { "start_index": 1, "limit": 100, "total_no_of_objects": 3 } }
{ "error": { "code": "00000101", "title": "Unauthorized", "detail": "The OAuth token is invalid." } }
{ "error": { "code": "00000000", "title": "Internal Server Error", "detail": "An unexpected internal error has occurred on the server. Please try again later." } }

Create Notification Template

Creates a new notification template with specified email and SMS configurations.
OAuth Scope : id360.notification_template.create,id360.notification_template.write,id360.notification_template.all

Arguments

name
string
Display name of the template
description
string
Description of the template
share_type
string
NONE => template is allowed only for that user and super admin
ALL => template is allowed for all users
RESTRICTED => template is allowed for selected users and super admin
module
string
Display name of the module
is_default
boolean
If true it is default notification template
configurations
object
It store custom config for templates
Show Sub-Attributes arrow
attachment_settings_enabled
boolean
If true, it indicates that the template has advanced settings for attachments. This is used to show advanced settings in the UI.
attachment_type
boolean
If true, it indicates that attachments should be sent as files. If false, attachments are sent as mail content.
attach_empty_files
boolean
If true, it indicates that empty files should not be attached. If false, empty files will be attached.
mail
object
Contains mail attributes
Show Sub-Attributes arrow
to
array
Contains mail id values for TO recipient
cc
array
Contains mail id values for CC recipient
subject
string
Subject of the mail
content
string
Body of the mail
severity
string
To store the severity of the mail.
Allowed Values:
  • LOW
  • MEDIUM
  • HIGH
attachment_ids
array
List of attachment ids used in the mail template
inline_images
array
List of inline images ids used in the mail template
sms
object
Show Sub-Attributes arrow
to
array
Mobile numbers to send SMS
content
string
Content of the SMS

Request Example

Click to copy
parameters_data='{"field1":"value1","field2":"value2"}'; headers_data = Map(); headers_data.put("Accept", "application/json"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://id360.manageengine.com/api/v1/templates/notification" type: POST headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}"); Request request = new Request.Builder() .url("https://id360.manageengine.com/api/v1/templates/notification") .post(body) .addHeader("Accept", "application/json") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'POST', headers: { Accept: 'application/json', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"field1":"value1","field2":"value2"}' }; fetch('https://id360.manageengine.com/api/v1/templates/notification', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("id360.manageengine.com") payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}" headers = { 'Accept': "application/json", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("POST", "/api/v1/templates/notification", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "id360.manageengine.com", "port": null, "path": "/api/v1/templates/notification", "headers": { "Accept": "application/json", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({field1: 'value1', field2: 'value2'})); req.end();
curl --request POST \ --url https://id360.manageengine.com/api/v1/templates/notification \ --header 'Accept: application/json' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"field1":"value1","field2":"value2"}'

Body Parameters

Click to copy
{ "name": "New mail template", "description": "Admin template", "share_type": "ALL", "module": "Reports", "is_default": true, "configurations": { "attachment_settings_enabled": true, "attachment_type": false, "attach_empty_files": true }, "mail": { "to": [ "a@A.com", "V@A.com" ], "cc": [ "b@A.com", "b@A.com" ], "subject": "Report available", "content": "Mail content goes here", "severity": "low", "attachment_ids": [ "200000000000001" ], "inline_images": [ "200000000000001" ] }, "sms": { "to": [ "+91-9807654321" ], "content": "Sample sms text" } }

Response Example

{ "data": { "id": "200000000000001", "name": "New mail template", "description": "Admin template", "share_type": "ALL", "module": "Reports", "is_default": true, "configurations": { "attachment_settings_enabled": true, "attachment_type": false, "attach_empty_files": true }, "mail": { "to": [ "a@A.com", "V@A.com" ], "cc": [ "b@A.com", "b@A.com" ], "subject": "Report available", "content": "Mail content goes here", "severity": "low", "attachments": [ { "id": "200000000000001", "name": "Active_User_Sessions.csv" } ], "inline_images": [ "200000000000001" ] }, "sms": { "to": [ "+91-9807654321" ], "content": "Sample sms text" } } }
{ "error": { "code": "00000101", "title": "Unauthorized", "detail": "The OAuth token is invalid." } }
{ "error": { "code": "00000000", "title": "Internal Server Error", "detail": "An unexpected internal error has occurred on the server. Please try again later." } }

Get notification template

Retrieves a notification template
OAuth Scope : id360.notification_template.read,id360.notification_template.all

Request Example

Click to copy
headers_data = Map(); headers_data.put("Accept", "application/json"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://id360.manageengine.com/api/v1/templates/notification/2000000000001" type: GET headers: headers_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://id360.manageengine.com/api/v1/templates/notification/2000000000001") .get() .addHeader("Accept", "application/json") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { Accept: 'application/json', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://id360.manageengine.com/api/v1/templates/notification/2000000000001', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("id360.manageengine.com") headers = { 'Accept': "application/json", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/templates/notification/2000000000001", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "id360.manageengine.com", "port": null, "path": "/api/v1/templates/notification/2000000000001", "headers": { "Accept": "application/json", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url https://id360.manageengine.com/api/v1/templates/notification/2000000000001 \ --header 'Accept: application/json' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

{ "data": { "id": "200000000000001", "name": "New mail template", "description": "Admin template", "share_type": "ALL", "module": "Reports", "is_default": true, "configurations": { "attachment_settings_enabled": true, "attachment_type": false, "attach_empty_files": true }, "mail": { "to": [ "a@A.com", "V@A.com" ], "cc": [ "b@A.com", "b@A.com" ], "subject": "Report available", "content": "Mail content goes here", "severity": "low", "attachments": [ { "id": "200000000000001", "name": "Active_User_Sessions.csv" } ], "inline_images": [ "200000000000001" ] }, "sms": { "to": [ "+91-9807654321" ], "content": "Sample sms text" } } }
{ "error": { "code": "00000101", "title": "Unauthorized", "detail": "The OAuth token is invalid." } }
{ "error": { "code": "00000000", "title": "Internal Server Error", "detail": "An unexpected internal error has occurred on the server. Please try again later." } }

Edit a notification template

Edit a notification template
OAuth Scope : id360.notification_template.update,id360.notification_template.write,id360.notification_template.all

Arguments

name
string
Display name of the template
description
string
Description of the template
share_type
string
NONE => template is allowed only for that user and super admin
ALL => template is allowed for all users
RESTRICTED => template is allowed for selected users and super admin
module
string
Display name of the module
is_default
boolean
If true it is default notification template
configurations
object
It store custom config for templates
Show Sub-Attributes arrow
attachment_settings_enabled
boolean
If true, it indicates that the template has advanced settings for attachments. This is used to show advanced settings in the UI.
attachment_type
boolean
If true, it indicates that attachments should be sent as files. If false, attachments are sent as mail content.
attach_empty_files
boolean
If true, it indicates that empty files should not be attached. If false, empty files will be attached.
mail
object
Contains mail attributes
Show Sub-Attributes arrow
to
array
Contains mail id values for TO recipient
cc
array
Contains mail id values for CC recipient
subject
string
Subject of the mail
content
string
Body of the mail
severity
string
To store the severity of the mail.
Allowed Values:
  • LOW
  • MEDIUM
  • HIGH
attachment_ids
array
List of attachment ids used in the mail template
inline_images
array
List of inline images ids used in the mail template
sms
object
Show Sub-Attributes arrow
to
array
Mobile numbers to send SMS
content
string
Content of the SMS

Request Example

Click to copy
parameters_data='{"name":"New mail template","description":"Admin template","share_type":"ALL","module":"Reports","is_default":true,"configurations":{"attachment_settings_enabled":true,"attachment_type":false,"attach_empty_files":true},"mail":{"to":["a@A.com","V@A.com"],"cc":["b@A.com","b@A.com"],"subject":"Report available","content":"Mail content goes here","severity":"low","attachment_ids":["200000000000001"],"inline_images":["200000000000001"]},"sms":{"to":["+91-9807654321"],"content":"Sample sms text"}}'; headers_data = Map(); headers_data.put("Accept", "application/json"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://id360.manageengine.com/api/v1/templates/notification/2000000000001" type: PATCH headers: headers_data content-type: application/json parameters: parameters_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"name\":\"New mail template\",\"description\":\"Admin template\",\"share_type\":\"ALL\",\"module\":\"Reports\",\"is_default\":true,\"configurations\":{\"attachment_settings_enabled\":true,\"attachment_type\":false,\"attach_empty_files\":true},\"mail\":{\"to\":[\"a@A.com\",\"V@A.com\"],\"cc\":[\"b@A.com\",\"b@A.com\"],\"subject\":\"Report available\",\"content\":\"Mail content goes here\",\"severity\":\"low\",\"attachment_ids\":[\"200000000000001\"],\"inline_images\":[\"200000000000001\"]},\"sms\":{\"to\":[\"+91-9807654321\"],\"content\":\"Sample sms text\"}}"); Request request = new Request.Builder() .url("https://id360.manageengine.com/api/v1/templates/notification/2000000000001") .patch(body) .addHeader("Accept", "application/json") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "application/json") .build(); Response response = client.newCall(request).execute();
const options = { method: 'PATCH', headers: { Accept: 'application/json', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'application/json' }, body: '{"name":"New mail template","description":"Admin template","share_type":"ALL","module":"Reports","is_default":true,"configurations":{"attachment_settings_enabled":true,"attachment_type":false,"attach_empty_files":true},"mail":{"to":["a@A.com","V@A.com"],"cc":["b@A.com","b@A.com"],"subject":"Report available","content":"Mail content goes here","severity":"low","attachment_ids":["200000000000001"],"inline_images":["200000000000001"]},"sms":{"to":["+91-9807654321"],"content":"Sample sms text"}}' }; fetch('https://id360.manageengine.com/api/v1/templates/notification/2000000000001', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("id360.manageengine.com") payload = "{\"name\":\"New mail template\",\"description\":\"Admin template\",\"share_type\":\"ALL\",\"module\":\"Reports\",\"is_default\":true,\"configurations\":{\"attachment_settings_enabled\":true,\"attachment_type\":false,\"attach_empty_files\":true},\"mail\":{\"to\":[\"a@A.com\",\"V@A.com\"],\"cc\":[\"b@A.com\",\"b@A.com\"],\"subject\":\"Report available\",\"content\":\"Mail content goes here\",\"severity\":\"low\",\"attachment_ids\":[\"200000000000001\"],\"inline_images\":[\"200000000000001\"]},\"sms\":{\"to\":[\"+91-9807654321\"],\"content\":\"Sample sms text\"}}" headers = { 'Accept': "application/json", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "application/json" } conn.request("PATCH", "/api/v1/templates/notification/2000000000001", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "PATCH", "hostname": "id360.manageengine.com", "port": null, "path": "/api/v1/templates/notification/2000000000001", "headers": { "Accept": "application/json", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "application/json" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write(JSON.stringify({ name: 'New mail template', description: 'Admin template', share_type: 'ALL', module: 'Reports', is_default: true, configurations: { attachment_settings_enabled: true, attachment_type: false, attach_empty_files: true }, mail: { to: ['a@A.com', 'V@A.com'], cc: ['b@A.com', 'b@A.com'], subject: 'Report available', content: 'Mail content goes here', severity: 'low', attachment_ids: ['200000000000001'], inline_images: ['200000000000001'] }, sms: {to: ['+91-9807654321'], content: 'Sample sms text'} })); req.end();
curl --request PATCH \ --url https://id360.manageengine.com/api/v1/templates/notification/2000000000001 \ --header 'Accept: application/json' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: application/json' \ --data '{"name":"New mail template","description":"Admin template","share_type":"ALL","module":"Reports","is_default":true,"configurations":{"attachment_settings_enabled":true,"attachment_type":false,"attach_empty_files":true},"mail":{"to":["a@A.com","V@A.com"],"cc":["b@A.com","b@A.com"],"subject":"Report available","content":"Mail content goes here","severity":"low","attachment_ids":["200000000000001"],"inline_images":["200000000000001"]},"sms":{"to":["+91-9807654321"],"content":"Sample sms text"}}'

Body Parameters

Click to copy
{ "name": "New mail template", "description": "Admin template", "share_type": "ALL", "module": "Reports", "is_default": true, "configurations": { "attachment_settings_enabled": true, "attachment_type": false, "attach_empty_files": true }, "mail": { "to": [ "a@A.com", "V@A.com" ], "cc": [ "b@A.com", "b@A.com" ], "subject": "Report available", "content": "Mail content goes here", "severity": "low", "attachment_ids": [ "200000000000001" ], "inline_images": [ "200000000000001" ] }, "sms": { "to": [ "+91-9807654321" ], "content": "Sample sms text" } }

Response Example

{ "data": { "id": "200000000000001", "name": "New mail template", "description": "Admin template", "share_type": "ALL", "module": "Reports", "is_default": true, "configurations": { "attachment_settings_enabled": true, "attachment_type": false, "attach_empty_files": true }, "mail": { "to": [ "a@A.com", "V@A.com" ], "cc": [ "b@A.com", "b@A.com" ], "subject": "Report available", "content": "Mail content goes here", "severity": "low", "attachments": [ { "id": "200000000000001", "name": "Active_User_Sessions.csv" } ], "inline_images": [ "200000000000001" ] }, "sms": { "to": [ "+91-9807654321" ], "content": "Sample sms text" } } }
{ "error": { "code": "00000101", "title": "Unauthorized", "detail": "The OAuth token is invalid." } }
{ "error": { "code": "00000000", "title": "Internal Server Error", "detail": "An unexpected internal error has occurred on the server. Please try again later." } }

Upload Attachment

Uploads an attachment for a notification template.
OAuth Scope : id360.notification_template.write,id360.notification_template.all

Arguments

file
binary
The file to upload as an attachment.

Query Parameters

type
Type of attachment being uploaded. This is used to determine how the attachment is processed. By default, it is set to 1.
  • 1 - For attachments in mail templates
  • 2 - For inline images in mail templates

Request Example

Click to copy
parameters_data = Map(); parameters_data.put("field1", "value1") parameters_data.put("field2", "value2") headers_data = Map(); headers_data.put("Accept", "application/json"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://id360.manageengine.com/api/v1/templates/notification/attachments" type: POST headers: headers_data parameters: parameters_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("multipart/form-data; boundary=---011000010111000001101001"); RequestBody body = RequestBody.create(mediaType, "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field1\"\r\n\r\nvalue1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field2\"\r\n\r\nvalue2\r\n-----011000010111000001101001--\r\n"); Request request = new Request.Builder() .url("https://id360.manageengine.com/api/v1/templates/notification/attachments") .post(body) .addHeader("Accept", "application/json") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .addHeader("content-type", "multipart/form-data; boundary=---011000010111000001101001") .build(); Response response = client.newCall(request).execute();
const form = new FormData(); form.append("field1", "value1"); form.append("field2", "value2"); const options = { method: 'POST', headers: { Accept: 'application/json', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f', 'content-type': 'multipart/form-data; boundary=---011000010111000001101001' } }; options.body = form; fetch('https://id360.manageengine.com/api/v1/templates/notification/attachments', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("id360.manageengine.com") payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field1\"\r\n\r\nvalue1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field2\"\r\n\r\nvalue2\r\n-----011000010111000001101001--\r\n" headers = { 'Accept': "application/json", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", 'content-type': "multipart/form-data; boundary=---011000010111000001101001" } conn.request("POST", "/api/v1/templates/notification/attachments", payload, headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "POST", "hostname": "id360.manageengine.com", "port": null, "path": "/api/v1/templates/notification/attachments", "headers": { "Accept": "application/json", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f", "content-type": "multipart/form-data; boundary=---011000010111000001101001" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.write("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field1\"\r\n\r\nvalue1\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"field2\"\r\n\r\nvalue2\r\n-----011000010111000001101001--\r\n"); req.end();
curl --request POST \ --url https://id360.manageengine.com/api/v1/templates/notification/attachments \ --header 'Accept: application/json' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' \ --header 'content-type: multipart/form-data' \ --form field1=value1 \ --form field2=value2

Body Parameters

Click to copy
{ "file": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA..." }

Response Example

{ "id": "200000000000001", "name": "Active_User_Sessions.csv" }
{ "error": { "code": "00000101", "title": "Unauthorized", "detail": "The OAuth token is invalid." } }
{ "error": { "code": "00000000", "title": "Internal Server Error", "detail": "An unexpected internal error has occurred on the server. Please try again later." } }

Download Attachment

Downloads an attachment for a notification template.
If attachment type is specified as 2, it will not be downloaded as a file or image instead it will show the image content.
OAuth Scope : id360.notification_template.write,id360.notification_template.all

Query Parameters

type
Type of attachment being uploaded. This is used to determine how the attachment is processed. By default, it is set to 1.
  • 1 - For attachments in mail templates
  • 2 - For inline images in mail templates

Request Example

Click to copy
headers_data = Map(); headers_data.put("Accept", "application/json"); headers_data.put("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f"); response = invokeUrl [ url: "https://id360.manageengine.com/api/v1/templates/notification/attachments/2000000000001/download" type: GET headers: headers_data connection: <connection_name> ]; info response;
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://id360.manageengine.com/api/v1/templates/notification/attachments/2000000000001/download") .get() .addHeader("Accept", "application/json") .addHeader("Authorization", "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f") .build(); Response response = client.newCall(request).execute();
const options = { method: 'GET', headers: { Accept: 'application/json', Authorization: 'Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f' } }; fetch('https://id360.manageengine.com/api/v1/templates/notification/attachments/2000000000001/download', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import http.client conn = http.client.HTTPSConnection("id360.manageengine.com") headers = { 'Accept': "application/json", 'Authorization': "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } conn.request("GET", "/api/v1/templates/notification/attachments/2000000000001/download", headers=headers) res = conn.getresponse() data = res.read() print(data.decode("utf-8"))
const http = require("https"); const options = { "method": "GET", "hostname": "id360.manageengine.com", "port": null, "path": "/api/v1/templates/notification/attachments/2000000000001/download", "headers": { "Accept": "application/json", "Authorization": "Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f" } }; const req = http.request(options, function (res) { const chunks = []; res.on("data", function (chunk) { chunks.push(chunk); }); res.on("end", function () { const body = Buffer.concat(chunks); console.log(body.toString()); }); }); req.end();
curl --request GET \ --url https://id360.manageengine.com/api/v1/templates/notification/attachments/2000000000001/download \ --header 'Accept: application/json' \ --header 'Authorization: Zoho-oauthtoken 1000.41d9xxxxxxxxxxxxxxxxxxxxxxxxc2d1.8fccxxxxxxxxxxxxxxxxxxxxxxxx125f'

Response Example

"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA..."
{ "error": { "code": "00000101", "title": "Unauthorized", "detail": "The OAuth token is invalid." } }
{ "error": { "code": "00000000", "title": "Internal Server Error", "detail": "An unexpected internal error has occurred on the server. Please try again later." } }