update_email_template

The update_email_template method is used to update the custom letter template.

Copied!
svc=resource/update_email_template&params={"resourceId":<uint>,
				 				 	   "subject":"<text>",			     
				 				 	   "body":"<text>",
	                                   "flags":<uint>}

Parameters

Name Description
resourceId The resource ID of the user.
subject Email subject.
body Email body.
flags Use the default template:
  • 0 — yes;
  • 1 — no.

The following variables can be used in the subject and body text:

Name Description
%JOB_NOTIFICATION% The name of the job or notification.
%ITEM% The name of the item in the report.
%TEMPLATE% The name of the report template.
%DATE_TIME% Date and time.
%LINK% The link to download the report.

Returned result

Copied!
{"error":0}		/* if the execution is successful */

Possible error codes:

Code Description
7 The resource doesn’t exist, or the user doesn’t have the View detailed object properties and Edit not mentioned properties access rights to it.
6 Failed to update the email template.
4 Wrong input parameters.

If you find a mistake in the text, please select it and press Ctrl+Enter.