email_templates
Creates, updates, deletes, gets or lists an email_templates resource.
Overview
| Name | email_templates |
| Type | Resource |
| Id | okta.brands.email_templates |
Fields
The following fields are returned by SELECT queries:
- list_email_templates
- get_email_template
Successfully returned the list of email templates.
| Name | Datatype | Description |
|---|---|---|
name | string | The name of this email template |
_embedded | object | |
_links | object | Specifies 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. |
Successfully retrieved the email template.
| Name | Datatype | Description |
|---|---|---|
name | string | The name of this email template |
_embedded | object | |
_links | object | Specifies 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:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_email_templates | select | subdomain | after, limit, expand | Lists all supported email templates |
get_email_template | select | subdomain | expand | Retrieves the details of an email template by name |
send_test_email | exec | subdomain | language | 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. |
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.
| Name | Datatype | Description |
|---|---|---|
subdomain | string | The 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) |
after | string | The 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. |
expand | array | Specifies additional metadata to be included in the response |
language | string | The language to use for the email. Defaults to the current user's language if unspecified. |
limit | integer | A limit on the number of objects to return |
SELECT examples
- list_email_templates
- get_email_template
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 }}'
;
Retrieves the details of an email template by name
SELECT
name,
_embedded,
_links
FROM okta.brands.email_templates
WHERE subdomain = '{{ subdomain }}' -- required
AND expand = '{{ expand }}'
;
Lifecycle Methods
- send_test_email
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 }}'
;