Class CustomTemplatesApi

java.lang.Object
com.okta.sdk.resource.api.CustomTemplatesApi

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-09-23T08:35:59.300824-05:00[America/Chicago]", comments="Generator version: 7.8.0") public class CustomTemplatesApi extends Object
  • Constructor Details

    • CustomTemplatesApi

      public CustomTemplatesApi()
    • CustomTemplatesApi

      public CustomTemplatesApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • createEmailCustomization

      public EmailCustomization createEmailCustomization(String brandId, String templateName, EmailCustomization instance) throws ApiException
      Create an Email Customization 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.
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      instance - (optional)
      Returns:
      EmailCustomization
      Throws:
      ApiException - if fails to make API call
    • createEmailCustomization

      public EmailCustomization createEmailCustomization(String brandId, String templateName, EmailCustomization instance, Map<String,String> additionalHeaders) throws ApiException
      Create an Email Customization 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.
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      instance - (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      EmailCustomization
      Throws:
      ApiException - if fails to make API call
    • deleteAllCustomizations

      public void deleteAllCustomizations(String brandId, String templateName) throws ApiException
      Delete all Email Customizations 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.
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      Throws:
      ApiException - if fails to make API call
    • deleteAllCustomizations

      public void deleteAllCustomizations(String brandId, String templateName, Map<String,String> additionalHeaders) throws ApiException
      Delete all Email Customizations 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.
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • deleteEmailCustomization

      public void deleteEmailCustomization(String brandId, String templateName, String customizationId) throws ApiException
      Delete an Email Customization 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:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      customizationId - The ID of the email customization (required)
      Throws:
      ApiException - if fails to make API call
    • deleteEmailCustomization

      public void deleteEmailCustomization(String brandId, String templateName, String customizationId, Map<String,String> additionalHeaders) throws ApiException
      Delete an Email Customization 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:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      customizationId - The ID of the email customization (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getCustomizationPreview

      public EmailPreview getCustomizationPreview(String brandId, String templateName, String customizationId) throws ApiException
      Retrieve a Preview of an Email Customization Retrieves a Preview of an Email Customization. All variable references are populated from the current user's context. For example, `${user.profile.firstName}`. <x-lifecycle class=\"ea\"></x-lifecycle> If Custom languages for Okta Email Templates is disabled, requests for the preview of an additional language customization by ID return a `404 Not Found` error response.
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      customizationId - The ID of the email customization (required)
      Returns:
      EmailPreview
      Throws:
      ApiException - if fails to make API call
    • getCustomizationPreview

      public EmailPreview getCustomizationPreview(String brandId, String templateName, String customizationId, Map<String,String> additionalHeaders) throws ApiException
      Retrieve a Preview of an Email Customization Retrieves a Preview of an Email Customization. All variable references are populated from the current user's context. For example, `${user.profile.firstName}`. <x-lifecycle class=\"ea\"></x-lifecycle> If Custom languages for Okta Email Templates is disabled, requests for the preview of an additional language customization by ID return a `404 Not Found` error response.
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      customizationId - The ID of the email customization (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      EmailPreview
      Throws:
      ApiException - if fails to make API call
    • getEmailCustomization

      public EmailCustomization getEmailCustomization(String brandId, String templateName, String customizationId) throws ApiException
      Retrieve an Email Customization 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.
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      customizationId - The ID of the email customization (required)
      Returns:
      EmailCustomization
      Throws:
      ApiException - if fails to make API call
    • getEmailCustomization

      public EmailCustomization getEmailCustomization(String brandId, String templateName, String customizationId, Map<String,String> additionalHeaders) throws ApiException
      Retrieve an Email Customization 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.
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      customizationId - The ID of the email customization (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      EmailCustomization
      Throws:
      ApiException - if fails to make API call
    • getEmailDefaultContent

      public EmailDefaultContent getEmailDefaultContent(String brandId, String templateName, String language) throws ApiException
      Retrieve an Email Template Default Content Retrieves an email template's default content <x-lifecycle class=\"ea\"></x-lifecycle> Defaults to the current user's language given the following: - Custom languages for Okta Email Templates is enabled - An additional language is specified for the `language` parameter
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      language - The language to use for the email. Defaults to the current user's language if unspecified. (optional)
      Returns:
      EmailDefaultContent
      Throws:
      ApiException - if fails to make API call
    • getEmailDefaultContent

      public EmailDefaultContent getEmailDefaultContent(String brandId, String templateName, String language, Map<String,String> additionalHeaders) throws ApiException
      Retrieve an Email Template Default Content Retrieves an email template's default content <x-lifecycle class=\"ea\"></x-lifecycle> Defaults to the current user's language given the following: - Custom languages for Okta Email Templates is enabled - An additional language is specified for the `language` parameter
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      language - The language to use for the email. Defaults to the current user's language if unspecified. (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      EmailDefaultContent
      Throws:
      ApiException - if fails to make API call
    • getEmailDefaultPreview

      public EmailPreview getEmailDefaultPreview(String brandId, String templateName, String language) throws ApiException
      Retrieve a Preview of the Email Template default content Retrieves a preview of an Email Template's default content. All variable references are populated using the current user's context. For example, `${user.profile.firstName}`. <x-lifecycle class=\"ea\"></x-lifecycle> Defaults to the current user's language given the following: - Custom languages for Okta Email Templates is enabled - An additional language is specified for the `language` parameter
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      language - The language to use for the email. Defaults to the current user's language if unspecified. (optional)
      Returns:
      EmailPreview
      Throws:
      ApiException - if fails to make API call
    • getEmailDefaultPreview

      public EmailPreview getEmailDefaultPreview(String brandId, String templateName, String language, Map<String,String> additionalHeaders) throws ApiException
      Retrieve a Preview of the Email Template default content Retrieves a preview of an Email Template's default content. All variable references are populated using the current user's context. For example, `${user.profile.firstName}`. <x-lifecycle class=\"ea\"></x-lifecycle> Defaults to the current user's language given the following: - Custom languages for Okta Email Templates is enabled - An additional language is specified for the `language` parameter
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      language - The language to use for the email. Defaults to the current user's language if unspecified. (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      EmailPreview
      Throws:
      ApiException - if fails to make API call
    • getEmailSettings

      public EmailSettingsResponse getEmailSettings(String brandId, String templateName) throws ApiException
      Retrieve the Email Template Settings Retrieves an email template's settings
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      Returns:
      EmailSettingsResponse
      Throws:
      ApiException - if fails to make API call
    • getEmailSettings

      public EmailSettingsResponse getEmailSettings(String brandId, String templateName, Map<String,String> additionalHeaders) throws ApiException
      Retrieve the Email Template Settings Retrieves an email template's settings
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      EmailSettingsResponse
      Throws:
      ApiException - if fails to make API call
    • getEmailTemplate

      public EmailTemplateResponse getEmailTemplate(String brandId, String templateName, List<String> expand) throws ApiException
      Retrieve an Email Template Retrieves the details of an email template by name
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      expand - Specifies additional metadata to be included in the response (optional
      Returns:
      EmailTemplateResponse
      Throws:
      ApiException - if fails to make API call
    • getEmailTemplate

      public EmailTemplateResponse getEmailTemplate(String brandId, String templateName, List<String> expand, Map<String,String> additionalHeaders) throws ApiException
      Retrieve an Email Template Retrieves the details of an email template by name
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      expand - Specifies additional metadata to be included in the response (optional
      additionalHeaders - additionalHeaders for this call
      Returns:
      EmailTemplateResponse
      Throws:
      ApiException - if fails to make API call
    • listEmailCustomizations

      public List<EmailCustomization> listEmailCustomizations(String brandId, String templateName, String after, Integer limit) throws ApiException
      List all Email Customizations 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.
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      after - 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](https://developer.okta.com/docs/api/#pagination). (optional)
      limit - A limit on the number of objects to return (optional, default to 20)
      Returns:
      List<EmailCustomization>
      Throws:
      ApiException - if fails to make API call
    • listEmailCustomizations

      public List<EmailCustomization> listEmailCustomizations(String brandId, String templateName, String after, Integer limit, Map<String,String> additionalHeaders) throws ApiException
      List all Email Customizations 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.
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      after - 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](https://developer.okta.com/docs/api/#pagination). (optional)
      limit - A limit on the number of objects to return (optional, default to 20)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<EmailCustomization>
      Throws:
      ApiException - if fails to make API call
    • listEmailTemplates

      public List<EmailTemplateResponse> listEmailTemplates(String brandId, String after, Integer limit, List<String> expand) throws ApiException
      List all Email Templates Lists all supported email templates
      Parameters:
      brandId - The ID of the brand (required)
      after - 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](https://developer.okta.com/docs/api/#pagination). (optional)
      limit - A limit on the number of objects to return (optional, default to 20)
      expand - Specifies additional metadata to be included in the response (optional
      Returns:
      List<EmailTemplateResponse>
      Throws:
      ApiException - if fails to make API call
    • listEmailTemplates

      public List<EmailTemplateResponse> listEmailTemplates(String brandId, String after, Integer limit, List<String> expand, Map<String,String> additionalHeaders) throws ApiException
      List all Email Templates Lists all supported email templates
      Parameters:
      brandId - The ID of the brand (required)
      after - 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](https://developer.okta.com/docs/api/#pagination). (optional)
      limit - A limit on the number of objects to return (optional, default to 20)
      expand - Specifies additional metadata to be included in the response (optional
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<EmailTemplateResponse>
      Throws:
      ApiException - if fails to make API call
    • replaceEmailCustomization

      public EmailCustomization replaceEmailCustomization(String brandId, String templateName, String customizationId, EmailCustomization instance) throws ApiException
      Replace an 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.
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      customizationId - The ID of the email customization (required)
      instance - Request (optional)
      Returns:
      EmailCustomization
      Throws:
      ApiException - if fails to make API call
    • replaceEmailCustomization

      public EmailCustomization replaceEmailCustomization(String brandId, String templateName, String customizationId, EmailCustomization instance, Map<String,String> additionalHeaders) throws ApiException
      Replace an 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.
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      customizationId - The ID of the email customization (required)
      instance - Request (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      EmailCustomization
      Throws:
      ApiException - if fails to make API call
    • replaceEmailSettings

      public EmailSettings replaceEmailSettings(String brandId, String templateName, EmailSettings emailSettings) throws ApiException
      Replace the Email Template Settings Replaces an email template's settings
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      emailSettings - (optional)
      Returns:
      EmailSettings
      Throws:
      ApiException - if fails to make API call
    • replaceEmailSettings

      public EmailSettings replaceEmailSettings(String brandId, String templateName, EmailSettings emailSettings, Map<String,String> additionalHeaders) throws ApiException
      Replace the Email Template Settings Replaces an email template's settings
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      emailSettings - (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      EmailSettings
      Throws:
      ApiException - if fails to make API call
    • sendTestEmail

      public void sendTestEmail(String brandId, String templateName, String language) throws ApiException
      Send a 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.
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      language - The language to use for the email. Defaults to the current user's language if unspecified. (optional)
      Throws:
      ApiException - if fails to make API call
    • sendTestEmail

      public void sendTestEmail(String brandId, String templateName, String language, Map<String,String> additionalHeaders) throws ApiException
      Send a 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.
      Parameters:
      brandId - The ID of the brand (required)
      templateName - The name of the email template (required)
      language - The language to use for the email. Defaults to the current user's language if unspecified. (optional)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getObjectMapper

      protected static com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()