Skip to main content

email_templates

Creates, updates, deletes, gets or lists an email_templates resource.

Overview

Nameemail_templates
TypeResource
Idokta.brands.email_templates

Fields

The following fields are returned by SELECT queries:

Successfully returned the list of email templates.

NameDatatypeDescription
namestringThe name of this email template
_embeddedobject
_linksobjectSpecifies link relations (see Web Linking) available using the JSON Hypertext Application Language specification. This object is used for dynamic discovery of related resources and lifecycle operations.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
list_email_templatesselectsubdomainafter, limit, expandLists all supported email templates
get_email_templateselectsubdomainexpandRetrieves the details of an email template by name
send_test_emailexecsubdomainlanguageSends a test email to the current user's primary and secondary email addresses. The email content is selected based on the following priority:
1. The email customization for the language specified in the language query parameter
<x-lifecycle class="ea"></x-lifecycle> If Custom languages for Okta Email Templates is enabled and the language parameter is an additional language, the test email uses the customization corresponding to the language.
2. The email template's default customization
3. The email template's default content, translated to the current user's language

> Note: Super admins can view customized email templates with the Send a test email request. However, when custom email templates are sent to super admins as part of actual email notification flows, the customizations aren't applied. Instead, the default email template is used. This only applies to super admins.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
subdomainstringThe domain of your organization. This can be a provided subdomain of an official okta domain (okta.com, oktapreview.com, etc) or one of your configured custom domains. (default: my-org)
afterstringThe cursor to use for pagination. It is an opaque string that specifies your current location in the list and is obtained from the Link response header. See Pagination.
expandarraySpecifies additional metadata to be included in the response
languagestringThe language to use for the email. Defaults to the current user's language if unspecified.
limitintegerA limit on the number of objects to return

SELECT examples

Lists all supported email templates

SELECT
name,
_embedded,
_links
FROM okta.brands.email_templates
WHERE subdomain = '{{ subdomain }}' -- required
AND after = '{{ after }}'
AND limit = '{{ limit }}'
AND expand = '{{ expand }}'
;

Lifecycle Methods

Sends a test email to the current user's primary and secondary email addresses. The email content is selected based on the following priority:
1. The email customization for the language specified in the language query parameter
<x-lifecycle class="ea"></x-lifecycle> If Custom languages for Okta Email Templates is enabled and the language parameter is an additional language, the test email uses the customization corresponding to the language.
2. The email template's default customization
3. The email template's default content, translated to the current user's language

> Note: Super admins can view customized email templates with the Send a test email request. However, when custom email templates are sent to super admins as part of actual email notification flows, the customizations aren't applied. Instead, the default email template is used. This only applies to super admins.

EXEC okta.brands.email_templates.send_test_email 
@subdomain='{{ subdomain }}' --required,
@language='{{ language }}'
;