Notification Templates API
Methods to list, create, update, and delete email templates.
The following requests change and preview the default templates for Access Workflow notification emails.
Base URL and Authorization: As custom templates are experimental and subject to change, these endpoints are currently available under the
/preview
namespace. To use the API, you will need to generate an API Key.
Create email notification template
POST {VEZA_URL}/api/preview/notifications/email_templates
Add a new email template, including a subject line template, body template, and any attachments. See Custom Templates for template usage and placeholders.
Body parameters:
Name | Type | Description |
---|---|---|
| string | Template unique ID (read-only). |
| string | Template name. |
| string | Template to use for the email subject. |
| string | Base64-encoded body template. |
| string | Body template (deprecated). |
|
| See Attachments below. |
|
| See Usage below. |
Converting to Base64:
The body template and any image attachments are expected as base64-encoded strings. Most environments provide a simple method to encode an HTML file, for example:
Mac |
|
Linux |
|
PowerShell |
|
Request:
Use
base64 -D
. to decode the input. In this case,body_template_base64
contains the encoded stringSign in at {{WORKFLOW_URL}} to finish review by by {{WORKFLOW_CERT_DUE_DATE}}.
The response will contain the new email template, including the id
:
Attachment
Attachment
Name | Type | Description |
---|---|---|
|
| Optional attachment type. |
| string | Attachment name. |
| string | Base64-encoded contents. |
Veza recommends hosting your own high quality images and referencing them from your templates using HTML. However, you can upload attachments of 64kb or less in base64 format. Valid EmailTemplateAttachmentType
types are:
IMAGE
(default)
Usage
Usage
Notifications inform reviewers of different types of events, such as when a due date is near or a result is re-assigned. You can customize the email sent for each event by setting the usage
when uploading the template.
One template can currently exist per usage
. To change the usage for a template, delete and re-create it.
Placeholders:The message can use different placeholders depending on the usage. See Usage for more information about placeholders.
Email batch size: When possible, notifications use a single email message, with all recipients in the "to" field. The maximum recipients is 20 by default. Veza sends additional emails when the limit is exceeded. The max recipients is adjustable by the Veza support team. ACCESS_WORKFLOW_REVIEWER_CHANGED
emails are sent to individual recipients, unless triggered by a Smart Action or another action impacting several rows.
This table shows possible usage
values and their matching setting in on the Email Notifications and Reminders page:
Value | Setting | Notes |
---|---|---|
| When a certification row has been reassigned | Sent to all newly added reviewers, and old removed reviewers. Not sent when auto-assigning upon creation, or for changes in draft certifications. |
| When a certification has been started | Sent to all reviewers in a single email, when the certification is published |
| When a certification has been completed | Not sent for expiring certifications |
| If no changes have been made | Sent to all inactive reviewers. |
| When a certification is due | Sent before, the day of, or after the due date. |
Delete email template
Delete an email template by id
.
DELETE {VEZA_URL}/api/preview/notifications/email_templates/{id}
Request:
Response:
A successful response will be empty {}
.
Get email notification template
GET {VEZA_URL}/api/preview/notifications/email_templates/{id}
Returns a single template, by id
.
Request:
Response:
List email templates
GET {VEZA_URL}/api/preview/notifications/email_templates
Return all existing email templates, including IDs, usage, and attachment details.
Request:
Response:
All user-configured templates are returned within a values
array:
Update email template
PATCH {VEZA_URL}/api/preview/notifications/email_templates/{id}
PUT {VEZA_URL}/api/preview/notifications/email_templates/{id}
Update an existing template with a new value. You can push either a full template, or only include the fields to modify.
Request:
Response:
Test email template
POST {VEZA_URL}/api/preview/notifications/email_templates:test_template
Send an email to test recipients, using the specified template.
SendEmailFromTemplate will deliver a test email with the requested template to specified recipients. Emails can use:
an existing
template.id
the current template for any
usage
the built-in
default
template for any usagea custom
template
specified in the request
Body parameters:
Field | Type | Description |
---|---|---|
| Array of strings | List of recipient email addresses |
| Array of strings | list of BCC recipient email addresses |
| Array of strings | list of CC recipient email addresses |
| Sends an email with the specified | |
| boolean | if |
Test a new template
To send an email using a new template, the template
object must contain values for body_base_64
, name
, usage
, and subject_template
.
Note that the HTML template must converted to a base64-encoded string. Replace template.txt
with the path to the actual template file.
Test an existing template
Test the default template for a usage
When default
is true, the email uses the original Veza-provided template for a valid usage:
Test the current template for a usage
When default
is false or not provided, the email uses the current template for a valid usage:
Last updated