Class TemplateApi

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

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2026-03-13T17:36:05.533634+05:30[Asia/Kolkata]", comments="Generator version: 7.15.0") public class TemplateApi extends Object
  • Constructor Details

    • TemplateApi

      public TemplateApi()
    • TemplateApi

      public TemplateApi(ApiClient apiClient)
  • Method Details

    • getApiClient

      public ApiClient getApiClient()
    • setApiClient

      public void setApiClient(ApiClient apiClient)
    • createSmsTemplate

      public SmsTemplate createSmsTemplate(SmsTemplate smsTemplate) throws ApiException
      Create an SMS template Creates a new custom SMS template
      Parameters:
      smsTemplate - (required)
      Returns:
      SmsTemplate
      Throws:
      ApiException - if fails to make API call
    • createSmsTemplate

      public SmsTemplate createSmsTemplate(SmsTemplate smsTemplate, Map<String,String> additionalHeaders) throws ApiException
      Create an SMS template Creates a new custom SMS template
      Parameters:
      smsTemplate - (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      SmsTemplate
      Throws:
      ApiException - if fails to make API call
    • deleteSmsTemplate

      public void deleteSmsTemplate(String templateId) throws ApiException
      Delete an SMS template Deletes an SMS template
      Parameters:
      templateId - `id` of the Template (required)
      Throws:
      ApiException - if fails to make API call
    • deleteSmsTemplate

      public void deleteSmsTemplate(String templateId, Map<String,String> additionalHeaders) throws ApiException
      Delete an SMS template Deletes an SMS template
      Parameters:
      templateId - `id` of the Template (required)
      additionalHeaders - additionalHeaders for this call
      Throws:
      ApiException - if fails to make API call
    • getSmsTemplate

      public SmsTemplate getSmsTemplate(String templateId) throws ApiException
      Retrieve an SMS template Retrieves a specific template by `id`
      Parameters:
      templateId - `id` of the Template (required)
      Returns:
      SmsTemplate
      Throws:
      ApiException - if fails to make API call
    • getSmsTemplate

      public SmsTemplate getSmsTemplate(String templateId, Map<String,String> additionalHeaders) throws ApiException
      Retrieve an SMS template Retrieves a specific template by `id`
      Parameters:
      templateId - `id` of the Template (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      SmsTemplate
      Throws:
      ApiException - if fails to make API call
    • listSmsTemplates

      public List<SmsTemplate> listSmsTemplates(SmsTemplateType templateType) throws ApiException
      List all SMS templates Lists all custom SMS templates. A subset of templates can be returned that match a template type.
      Parameters:
      templateType - (optional)
      Returns:
      List<SmsTemplate>
      Throws:
      ApiException - if fails to make API call
    • listSmsTemplates

      public List<SmsTemplate> listSmsTemplates(SmsTemplateType templateType, Map<String,String> additionalHeaders) throws ApiException
      List all SMS templates Lists all custom SMS templates. A subset of templates can be returned that match a template type.
      Parameters:
      templateType - (optional)
      additionalHeaders - additionalHeaders for this call
      Returns:
      List<SmsTemplate>
      Throws:
      ApiException - if fails to make API call
    • listSmsTemplatesPaged

      public Iterable<SmsTemplate> listSmsTemplatesPaged(SmsTemplateType templateType)
      List all SMS templates (Paginated) Lists all custom SMS templates. A subset of templates can be returned that match a template type. This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks. Use this method in a for-each loop to automatically fetch all pages without manual cursor management.
      Parameters:
      templateType - (optional)
      Returns:
      Iterable<SmsTemplate> lazy iterable over all pages
    • listSmsTemplatesPaged

      public Iterable<SmsTemplate> listSmsTemplatesPaged(SmsTemplateType templateType, Map<String,String> additionalHeaders)
      List all SMS templates (Paginated with additional headers) Lists all custom SMS templates. A subset of templates can be returned that match a template type. This method returns a lazy, paginated iterable that automatically handles pagination. It is thread-safe and does not cause memory leaks.
      Parameters:
      templateType - (optional)
      additionalHeaders - additional headers for this call
      Returns:
      Iterable<SmsTemplate> lazy iterable over all pages
    • replaceSmsTemplate

      public SmsTemplate replaceSmsTemplate(String templateId, SmsTemplate smsTemplate) throws ApiException
      Replace an SMS template Replaces the SMS Template > **Notes:** You can't update the default SMS Template.
      Parameters:
      templateId - `id` of the Template (required)
      smsTemplate - (required)
      Returns:
      SmsTemplate
      Throws:
      ApiException - if fails to make API call
    • replaceSmsTemplate

      public SmsTemplate replaceSmsTemplate(String templateId, SmsTemplate smsTemplate, Map<String,String> additionalHeaders) throws ApiException
      Replace an SMS template Replaces the SMS Template > **Notes:** You can't update the default SMS Template.
      Parameters:
      templateId - `id` of the Template (required)
      smsTemplate - (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      SmsTemplate
      Throws:
      ApiException - if fails to make API call
    • updateSmsTemplate

      public SmsTemplate updateSmsTemplate(String templateId, SmsTemplate smsTemplate) throws ApiException
      Update an SMS template Updates only some of the SMS Template properties: * All properties within the custom SMS Template that have values are updated. * Any translation that doesn't exist is added. * Any translation with a null or empty value is removed. * Any translation with non-empty/null value is updated.
      Parameters:
      templateId - `id` of the Template (required)
      smsTemplate - (required)
      Returns:
      SmsTemplate
      Throws:
      ApiException - if fails to make API call
    • updateSmsTemplate

      public SmsTemplate updateSmsTemplate(String templateId, SmsTemplate smsTemplate, Map<String,String> additionalHeaders) throws ApiException
      Update an SMS template Updates only some of the SMS Template properties: * All properties within the custom SMS Template that have values are updated. * Any translation that doesn't exist is added. * Any translation with a null or empty value is removed. * Any translation with non-empty/null value is updated.
      Parameters:
      templateId - `id` of the Template (required)
      smsTemplate - (required)
      additionalHeaders - additionalHeaders for this call
      Returns:
      SmsTemplate
      Throws:
      ApiException - if fails to make API call
    • getObjectMapper

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