IntroductionBefore you beginTerminologyGetting started
Authorization
Accounts
Entities
User accounts
GroupsFilesFoldersTemplatesEmail templatesRetrieve an email templateUpdate an email templateAppsErrors

Email templates

SmartVault allows users to retrieve and modify pre-defined email templates. You can't create new templates.

All the endpoints related to email templates are case sensitive, so be careful when doing the request because if you don't specify the casing properly, you will get an error object as a result of the request.









Retrieve an email template

SmartVault allows users to retrieve and modify pre-defined email templates. Use the path /nodes/email-template for email template management.

Retrieve an email template
GET/nodes/email-template/{account_name}/{email_template_name}


Default email templates present in each account may vary so, in case you want to check the current email templates, don't specify the "email_template_name" and check for the direct child of the request using the "children" property like:
/nodes/email-template/SmartVault Account?children=1
Also, if you want to know the usage of each email template, use the "eprop" query param and check the "description" field.
/nodes/email-template/SmartVault Account?children=1&eprop=true
Check the expected result from this request in the "Response" section below and get more info about these optional query params here.



Parameters


account_namestringThe user's account name.
email_template_namestring (optional)Name of email template you want to retrieve information from.

Request


curl --include \
--header "Content-Type: application/json" \
--header "Authorization: Basic dGVzdHVzZXJAc21hcnR2YXVsdC5jb206UTB4Sk1EQUFBQUFBQUFBQlVZRE9MOE82N3oyQjdvVmJLcytWMngybmZHTXgzR2FzY2pNUEp4Y0dGeHZPeWc9PQ==" \
--header "Accept: application/json" \
'https://rest.smartvault.com/nodes/email-template/{accountName}/{emailTemplateName}'

Response


Example of a partial response from a request to get all the current email templates for an account.

Show success object



Returns a node response object pointing to the email template retrieved.

Show success object


Returns an error object if the template specified in the request path doesn't exist.

Show error object









Update an email template

SmartVault allows users to retrieve and modify pre-defined email templates. Use the path /nodes/email-template for email template management.

Update an email template
POST/nodes/email-template/{account_name}/{email_template_name}


Body parameters


updateUpdateEmailTemplate (optional)Specify any changes you would like to make to the subject, body, display name, or description of the email.
revert_to_defaultboolean (optional)Setting this to true will reset the email template values, even if you specify new values for the "update" object while doing the request.

The UpdateEmailTemplate object


Use the update container to change the properties associated with a template (API name for the template, label for the template, who the template applies to, etc).

Show UpdateTemplateRequest




Request


Headers:
Content-Type:application/json
Authorization:Basic dGVzdHVzZXJAc21hcnR2YXVsdC5jb206UTB4Sk1EQUFBQUFBQUFBQlVZRE9MOE82N3oyQjdvVmJLcytWMngybmZHTXgzR2FzY2pNUEp4Y0dGeHZPeWc9PQ==
Accept:application/json
Body:
{
"update": {
"update_subject": true,
"subject": "Example Subject",
"update_body": true,
"body": "This is the body of an email template.",
"update_display_name": true,
"display_name": "Example Name",
"update_description": true,
"description": "This is an example email template."
},
"revert_to_default": false
}

Response


Returns a node response object pointing to the email template retrieved.

Show success object


Returns an error object if the email template trying to be modified doesn't exist.

Show error object