email_template_customizations
Creates, updates, deletes, gets or lists an email_template_customizations resource.
Overview
| Name | email_template_customizations |
| Type | Resource |
| Id | okta.brands.email_template_customizations |
Fields
The following fields are returned by SELECT queries:
- list_email_customizations
- get_email_customization
Successfully retrieved all email customizations for the specified email template.
| Name | Datatype | Description |
|---|---|---|
id | string | A unique identifier for this email customization |
_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. |
body | string | The HTML body of the email. May contain variable references. <x-lifecycle class="ea"></x-lifecycle> Not required if Custom languages for Okta Email Templates is enabled. A null body is replaced with a default value from one of the following in priority order: 1. An existing default email customization, if one exists 2. Okta-provided translated content for the specified language, if one exists 3. Okta-provided translated content for the brand locale, if it's set 4. Okta-provided content in English |
created | string (date-time) | The UTC time at which this email customization was created. |
isDefault | boolean | Whether this is the default customization for the email template. Each customized email template must have exactly one default customization. Defaults to true for the first customization and false thereafter. |
language | string | The language specified as an IETF BCP 47 language tag |
lastUpdated | string (date-time) | The UTC time at which this email customization was last updated. |
subject | string | The email subject. May contain variable references. <x-lifecycle class="ea"></x-lifecycle> Not required if Custom languages for Okta Email Templates is enabled. A null subject is replaced with a default value from one of the following in priority order: 1. An existing default email customization, if one exists 2. Okta-provided translated content for the specified language, if one exists 3. Okta-provided translated content for the brand locale, if it's set 4. Okta-provided content in English |
Successfully retrieved the email customization.
| Name | Datatype | Description |
|---|---|---|
id | string | A unique identifier for this email customization |
_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. |
body | string | The HTML body of the email. May contain variable references. <x-lifecycle class="ea"></x-lifecycle> Not required if Custom languages for Okta Email Templates is enabled. A null body is replaced with a default value from one of the following in priority order: 1. An existing default email customization, if one exists 2. Okta-provided translated content for the specified language, if one exists 3. Okta-provided translated content for the brand locale, if it's set 4. Okta-provided content in English |
created | string (date-time) | The UTC time at which this email customization was created. |
isDefault | boolean | Whether this is the default customization for the email template. Each customized email template must have exactly one default customization. Defaults to true for the first customization and false thereafter. |
language | string | The language specified as an IETF BCP 47 language tag |
lastUpdated | string (date-time) | The UTC time at which this email customization was last updated. |
subject | string | The email subject. May contain variable references. <x-lifecycle class="ea"></x-lifecycle> Not required if Custom languages for Okta Email Templates is enabled. A null subject is replaced with a default value from one of the following in priority order: 1. An existing default email customization, if one exists 2. Okta-provided translated content for the specified language, if one exists 3. Okta-provided translated content for the brand locale, if it's set 4. Okta-provided content in English |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
list_email_customizations | select | subdomain | after, limit | Lists all customizations of an email template <x-lifecycle class="ea"></x-lifecycle> If Custom languages for Okta Email Templates is enabled, all existing customizations are retrieved, including customizations for additional languages. If disabled, only customizations for Okta-supported languages are returned. |
get_email_customization | select | subdomain | Retrieves an email customization by its unique identifier <x-lifecycle class="ea"></x-lifecycle> If Custom languages for Okta Email Templates is disabled, requests to retrieve an additional language customization by ID result in a 404 Not Found error response. | |
create_email_customization | insert | subdomain, data__subject, data__body | Creates a new Email Customization <x-lifecycle class="ea"></x-lifecycle> If Custom languages for Okta Email Templates is enabled, you can create a customization for any BCP47 language in addition to the Okta-supported languages. | |
replace_email_customization | replace | subdomain, data__subject, data__body | Replaces an email customization using property values <x-lifecycle class="ea"></x-lifecycle> If Custom languages for Okta Email Templates is disabled, requests to update a customization for an additional language return a 404 Not Found error response. | |
delete_all_customizations | delete | subdomain | Deletes all customizations for an email template <x-lifecycle class="ea"></x-lifecycle> If Custom languages for Okta Email Templates is enabled, all customizations are deleted, including customizations for additional languages. If disabled, only customizations in Okta-supported languages are deleted. | |
delete_email_customization | delete | subdomain | Deletes an Email Customization by its unique identifier <x-lifecycle class="ea"></x-lifecycle> If Custom languages for Okta Email Templates is disabled, deletion of an existing additional language customization by ID doesn't register. |
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. |
limit | integer | A limit on the number of objects to return |
SELECT examples
- list_email_customizations
- get_email_customization
Lists all customizations of an email template
<x-lifecycle class="ea"></x-lifecycle> If Custom languages for Okta Email Templates is enabled, all existing customizations are retrieved, including customizations for additional languages. If disabled, only customizations for Okta-supported languages are returned.
SELECT
id,
_links,
body,
created,
isDefault,
language,
lastUpdated,
subject
FROM okta.brands.email_template_customizations
WHERE subdomain = '{{ subdomain }}' -- required
AND after = '{{ after }}'
AND limit = '{{ limit }}'
;
Retrieves an email customization by its unique identifier
<x-lifecycle class="ea"></x-lifecycle> If Custom languages for Okta Email Templates is disabled, requests to retrieve an additional language customization by ID result in a 404 Not Found error response.
SELECT
id,
_links,
body,
created,
isDefault,
language,
lastUpdated,
subject
FROM okta.brands.email_template_customizations
WHERE subdomain = '{{ subdomain }}' -- required
;
INSERT examples
- create_email_customization
- Manifest
Creates a new Email Customization
<x-lifecycle class="ea"></x-lifecycle> If Custom languages for Okta Email Templates is enabled, you can create a customization for any BCP47 language in addition to the Okta-supported languages.
INSERT INTO okta.brands.email_template_customizations (
data__body,
data__subject,
data__isDefault,
data__language,
subdomain
)
SELECT
'{{ body }}' /* required */,
'{{ subject }}' /* required */,
{{ isDefault }},
'{{ language }}',
'{{ subdomain }}'
RETURNING
id,
_links,
body,
created,
isDefault,
language,
lastUpdated,
subject
;
# Description fields are for documentation purposes
- name: email_template_customizations
props:
- name: subdomain
value: string
description: Required parameter for the email_template_customizations resource.
- name: body
value: string
description: >
The HTML body of the email. May contain [variable references](https://velocity.apache.org/engine/1.7/user-guide.html#references).
<x-lifecycle class="ea"></x-lifecycle> Not required if Custom languages for Okta Email Templates is enabled. A `null` body is replaced with a default value from one of the following in priority order:
1. An existing default email customization, if one exists
2. Okta-provided translated content for the specified language, if one exists
3. Okta-provided translated content for the brand locale, if it's set
4. Okta-provided content in English
- name: subject
value: string
description: >
The email subject. May contain [variable references](https://velocity.apache.org/engine/1.7/user-guide.html#references).
<x-lifecycle class="ea"></x-lifecycle> Not required if Custom languages for Okta Email Templates is enabled. A `null` subject is replaced with a default value from one of the following in priority order:
1. An existing default email customization, if one exists
2. Okta-provided translated content for the specified language, if one exists
3. Okta-provided translated content for the brand locale, if it's set
4. Okta-provided content in English
- name: isDefault
value: boolean
description: >
Whether this is the default customization for the email template. Each customized email template must have exactly one default customization. Defaults to `true` for the first customization and `false` thereafter.
- name: language
value: string
description: >
The language specified as an [IETF BCP 47 language tag](https://datatracker.ietf.org/doc/html/rfc5646)
REPLACE examples
- replace_email_customization
Replaces an email customization using property values
<x-lifecycle class="ea"></x-lifecycle> If Custom languages for Okta Email Templates is disabled, requests to update a customization for an additional language return a 404 Not Found error response.
REPLACE okta.brands.email_template_customizations
SET
data__body = '{{ body }}',
data__subject = '{{ subject }}',
data__isDefault = {{ isDefault }},
data__language = '{{ language }}'
WHERE
subdomain = '{{ subdomain }}' --required
AND data__subject = '{{ subject }}' --required
AND data__body = '{{ body }}' --required
RETURNING
id,
_links,
body,
created,
isDefault,
language,
lastUpdated,
subject
;
DELETE examples
- delete_all_customizations
- delete_email_customization
Deletes all customizations for an email template
<x-lifecycle class="ea"></x-lifecycle> If Custom languages for Okta Email Templates is enabled, all customizations are deleted, including customizations for additional languages. If disabled, only customizations in Okta-supported languages are deleted.
DELETE FROM okta.brands.email_template_customizations
WHERE subdomain = '{{ subdomain }}' --required
;
Deletes an Email Customization by its unique identifier
<x-lifecycle class="ea"></x-lifecycle> If Custom languages for Okta Email Templates is disabled, deletion of an existing additional language customization by ID doesn't register.
DELETE FROM okta.brands.email_template_customizations
WHERE subdomain = '{{ subdomain }}' --required
;