All URIs are relative to https://subdomain.okta.com
Method | HTTP request | Description |
---|---|---|
CreateEmailCustomization | POST /api/v1/brands/{brandId}/templates/email/{templateName}/customizations | Create an Email Customization |
DeleteAllCustomizations | DELETE /api/v1/brands/{brandId}/templates/email/{templateName}/customizations | Delete all Email Customizations |
DeleteEmailCustomization | DELETE /api/v1/brands/{brandId}/templates/email/{templateName}/customizations/{customizationId} | Delete an Email Customization |
GetCustomizationPreview | GET /api/v1/brands/{brandId}/templates/email/{templateName}/customizations/{customizationId}/preview | Retrieve a Preview of an Email Customization |
GetEmailCustomization | GET /api/v1/brands/{brandId}/templates/email/{templateName}/customizations/{customizationId} | Retrieve an Email Customization |
GetEmailDefaultContent | GET /api/v1/brands/{brandId}/templates/email/{templateName}/default-content | Retrieve an Email Template Default Content |
GetEmailDefaultPreview | GET /api/v1/brands/{brandId}/templates/email/{templateName}/default-content/preview | Retrieve a Preview of the Email Template default content |
GetEmailSettings | GET /api/v1/brands/{brandId}/templates/email/{templateName}/settings | Retrieve the Email Template Settings |
GetEmailTemplate | GET /api/v1/brands/{brandId}/templates/email/{templateName} | Retrieve an Email Template |
ListEmailCustomizations | GET /api/v1/brands/{brandId}/templates/email/{templateName}/customizations | List all Email Customizations |
ListEmailTemplates | GET /api/v1/brands/{brandId}/templates/email | List all Email Templates |
ReplaceEmailCustomization | PUT /api/v1/brands/{brandId}/templates/email/{templateName}/customizations/{customizationId} | Replace an Email Customization |
ReplaceEmailSettings | PUT /api/v1/brands/{brandId}/templates/email/{templateName}/settings | Replace the Email Template Settings |
SendTestEmail | POST /api/v1/brands/{brandId}/templates/email/{templateName}/test | Send a Test Email |
EmailCustomization CreateEmailCustomization (string brandId, string templateName, EmailCustomization instance = null)
Create an Email Customization
Creates a new Email Customization <x-lifecycle class="ea"> 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.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class CreateEmailCustomizationExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new CustomTemplatesApi(config);
var brandId = "brandId_example"; // string | The ID of the brand
var templateName = "templateName_example"; // string | The name of the email template
var instance = new EmailCustomization(); // EmailCustomization | (optional)
try
{
// Create an Email Customization
EmailCustomization result = apiInstance.CreateEmailCustomization(brandId, templateName, instance);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomTemplatesApi.CreateEmailCustomization: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
brandId | string | The ID of the brand | |
templateName | string | The name of the email template | |
instance | EmailCustomization | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Successfully created the email customization. | - |
400 | Bad Request | - |
403 | Forbidden | - |
404 | Not Found | - |
409 | Could not create the email customization because it conflicts with an existing email customization. | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteAllCustomizations (string brandId, string templateName)
Delete all Email Customizations
Deletes all customizations for an email template <x-lifecycle class="ea"> 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.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class DeleteAllCustomizationsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new CustomTemplatesApi(config);
var brandId = "brandId_example"; // string | The ID of the brand
var templateName = "templateName_example"; // string | The name of the email template
try
{
// Delete all Email Customizations
apiInstance.DeleteAllCustomizations(brandId, templateName);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomTemplatesApi.DeleteAllCustomizations: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
brandId | string | The ID of the brand | |
templateName | string | The name of the email template |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | Successfully deleted all customizations for the email template. | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteEmailCustomization (string brandId, string templateName, string customizationId)
Delete an Email Customization
Deletes an Email Customization by its unique identifier <x-lifecycle class="ea"> If Custom languages for Okta Email Templates is disabled, deletion of an existing additional language customization by ID doesn't register.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class DeleteEmailCustomizationExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new CustomTemplatesApi(config);
var brandId = "brandId_example"; // string | The ID of the brand
var templateName = "templateName_example"; // string | The name of the email template
var customizationId = "customizationId_example"; // string | The ID of the email customization
try
{
// Delete an Email Customization
apiInstance.DeleteEmailCustomization(brandId, templateName, customizationId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomTemplatesApi.DeleteEmailCustomization: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
brandId | string | The ID of the brand | |
templateName | string | The name of the email template | |
customizationId | string | The ID of the email customization |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | Successfully deleted the email customization. | - |
403 | Forbidden | - |
404 | Not Found | - |
409 | Could not delete the email customization deleted because it is the default email customization. | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EmailPreview GetCustomizationPreview (string brandId, string templateName, string customizationId)
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"> 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.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class GetCustomizationPreviewExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new CustomTemplatesApi(config);
var brandId = "brandId_example"; // string | The ID of the brand
var templateName = "templateName_example"; // string | The name of the email template
var customizationId = "customizationId_example"; // string | The ID of the email customization
try
{
// Retrieve a Preview of an Email Customization
EmailPreview result = apiInstance.GetCustomizationPreview(brandId, templateName, customizationId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomTemplatesApi.GetCustomizationPreview: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
brandId | string | The ID of the brand | |
templateName | string | The name of the email template | |
customizationId | string | The ID of the email customization |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successfully generated a preview of the email customization. | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EmailCustomization GetEmailCustomization (string brandId, string templateName, string customizationId)
Retrieve an Email Customization
Retrieves an email customization by its unique identifier <x-lifecycle class="ea"> 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.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class GetEmailCustomizationExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new CustomTemplatesApi(config);
var brandId = "brandId_example"; // string | The ID of the brand
var templateName = "templateName_example"; // string | The name of the email template
var customizationId = "customizationId_example"; // string | The ID of the email customization
try
{
// Retrieve an Email Customization
EmailCustomization result = apiInstance.GetEmailCustomization(brandId, templateName, customizationId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomTemplatesApi.GetEmailCustomization: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
brandId | string | The ID of the brand | |
templateName | string | The name of the email template | |
customizationId | string | The ID of the email customization |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successfully retrieved the email customization. | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EmailDefaultContent GetEmailDefaultContent (string brandId, string templateName, string language = null)
Retrieve an Email Template Default Content
Retrieves an email template's default content <x-lifecycle class="ea"> 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
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class GetEmailDefaultContentExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new CustomTemplatesApi(config);
var brandId = "brandId_example"; // string | The ID of the brand
var templateName = "templateName_example"; // string | The name of the email template
var language = "language_example"; // string | The language to use for the email. Defaults to the current user's language if unspecified. (optional)
try
{
// Retrieve an Email Template Default Content
EmailDefaultContent result = apiInstance.GetEmailDefaultContent(brandId, templateName, language);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomTemplatesApi.GetEmailDefaultContent: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
brandId | string | The ID of the brand | |
templateName | string | The name of the email template | |
language | string | The language to use for the email. Defaults to the current user's language if unspecified. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successfully retrieved the email template's default content. | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EmailPreview GetEmailDefaultPreview (string brandId, string templateName, string language = null)
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"> 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
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class GetEmailDefaultPreviewExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new CustomTemplatesApi(config);
var brandId = "brandId_example"; // string | The ID of the brand
var templateName = "templateName_example"; // string | The name of the email template
var language = "language_example"; // string | The language to use for the email. Defaults to the current user's language if unspecified. (optional)
try
{
// Retrieve a Preview of the Email Template default content
EmailPreview result = apiInstance.GetEmailDefaultPreview(brandId, templateName, language);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomTemplatesApi.GetEmailDefaultPreview: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
brandId | string | The ID of the brand | |
templateName | string | The name of the email template | |
language | string | The language to use for the email. Defaults to the current user's language if unspecified. | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successfully generated a preview of the email template's default content. | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EmailSettingsResponse GetEmailSettings (string brandId, string templateName)
Retrieve the Email Template Settings
Retrieves an email template's settings
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class GetEmailSettingsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new CustomTemplatesApi(config);
var brandId = "brandId_example"; // string | The ID of the brand
var templateName = "templateName_example"; // string | The name of the email template
try
{
// Retrieve the Email Template Settings
EmailSettingsResponse result = apiInstance.GetEmailSettings(brandId, templateName);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomTemplatesApi.GetEmailSettings: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
brandId | string | The ID of the brand | |
templateName | string | The name of the email template |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successfully retrieved the email template's settings. | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EmailTemplateResponse GetEmailTemplate (string brandId, string templateName, List expand = null)
Retrieve an Email Template
Retrieves the details of an email template by name
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class GetEmailTemplateExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new CustomTemplatesApi(config);
var brandId = "brandId_example"; // string | The ID of the brand
var templateName = "templateName_example"; // string | The name of the email template
var expand = new List<string>(); // List<string> | Specifies additional metadata to be included in the response (optional)
try
{
// Retrieve an Email Template
EmailTemplateResponse result = apiInstance.GetEmailTemplate(brandId, templateName, expand);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomTemplatesApi.GetEmailTemplate: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
brandId | string | The ID of the brand | |
templateName | string | The name of the email template | |
expand | List<string> | Specifies additional metadata to be included in the response | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successfully retrieved the email template. | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<EmailCustomization> ListEmailCustomizations (string brandId, string templateName, string after = null, int? limit = null)
List all Email Customizations
Lists all customizations of an email template <x-lifecycle class="ea"> 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.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ListEmailCustomizationsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new CustomTemplatesApi(config);
var brandId = "brandId_example"; // string | The ID of the brand
var templateName = "templateName_example"; // string | The name of the email template
var after = "after_example"; // 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](/#pagination). (optional)
var limit = 20; // int? | A limit on the number of objects to return (optional) (default to 20)
try
{
// List all Email Customizations
List<EmailCustomization> result = apiInstance.ListEmailCustomizations(brandId, templateName, after, limit).ToListAsync();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomTemplatesApi.ListEmailCustomizations: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
brandId | string | The ID of the brand | |
templateName | string | The name of the email template | |
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. | [optional] |
limit | int? | A limit on the number of objects to return | [optional] [default to 20] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successfully retrieved all email customizations for the specified email template. | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<EmailTemplateResponse> ListEmailTemplates (string brandId, string after = null, int? limit = null, List expand = null)
List all Email Templates
Lists all supported email templates
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ListEmailTemplatesExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new CustomTemplatesApi(config);
var brandId = "brandId_example"; // string | The ID of the brand
var after = "after_example"; // 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](/#pagination). (optional)
var limit = 20; // int? | A limit on the number of objects to return (optional) (default to 20)
var expand = new List<string>(); // List<string> | Specifies additional metadata to be included in the response (optional)
try
{
// List all Email Templates
List<EmailTemplateResponse> result = apiInstance.ListEmailTemplates(brandId, after, limit, expand).ToListAsync();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomTemplatesApi.ListEmailTemplates: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
brandId | string | The ID of the brand | |
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. | [optional] |
limit | int? | A limit on the number of objects to return | [optional] [default to 20] |
expand | List<string> | Specifies additional metadata to be included in the response | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successfully returned the list of email templates. | * Link - The pagination header containing links to the current and next page of results. See Pagination for more information. |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EmailCustomization ReplaceEmailCustomization (string brandId, string templateName, string customizationId, EmailCustomization instance = null)
Replace an Email Customization
Replaces an email customization using property values <x-lifecycle class="ea"> 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.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ReplaceEmailCustomizationExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new CustomTemplatesApi(config);
var brandId = "brandId_example"; // string | The ID of the brand
var templateName = "templateName_example"; // string | The name of the email template
var customizationId = "customizationId_example"; // string | The ID of the email customization
var instance = new EmailCustomization(); // EmailCustomization | Request (optional)
try
{
// Replace an Email Customization
EmailCustomization result = apiInstance.ReplaceEmailCustomization(brandId, templateName, customizationId, instance);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomTemplatesApi.ReplaceEmailCustomization: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
brandId | string | The ID of the brand | |
templateName | string | The name of the email template | |
customizationId | string | The ID of the email customization | |
instance | EmailCustomization | Request | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successfully updated the email customization. | - |
400 | Bad Request | - |
403 | Forbidden | - |
404 | Not Found | - |
409 | Could not update the email customization because the update would cause a conflict with an existing email customization. | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EmailSettings ReplaceEmailSettings (string brandId, string templateName, EmailSettings emailSettings = null)
Replace the Email Template Settings
Replaces an email template's settings
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ReplaceEmailSettingsExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new CustomTemplatesApi(config);
var brandId = "brandId_example"; // string | The ID of the brand
var templateName = "templateName_example"; // string | The name of the email template
var emailSettings = new EmailSettings(); // EmailSettings | (optional)
try
{
// Replace the Email Template Settings
EmailSettings result = apiInstance.ReplaceEmailSettings(brandId, templateName, emailSettings);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomTemplatesApi.ReplaceEmailSettings: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
brandId | string | The ID of the brand | |
templateName | string | The name of the email template | |
emailSettings | EmailSettings | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Successfully updated the email template's settings. | - |
400 | Bad Request | - |
403 | Forbidden | - |
404 | Not Found | - |
422 | Could not update the email template's settings due to an invalid setting value. | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void SendTestEmail (string brandId, string templateName, string language = null)
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"> 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.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class SendTestEmailExample
{
public static void Main()
{
Configuration config = new Configuration();
config.OktaDomain = "https://subdomain.okta.com";
// Configure API key authorization: apiToken
config.Token ="YOUR_API_KEY";
// Configure OAuth2 access token for authorization: oauth2
config.AccessToken = "YOUR_ACCESS_TOKEN";
var apiInstance = new CustomTemplatesApi(config);
var brandId = "brandId_example"; // string | The ID of the brand
var templateName = "templateName_example"; // string | The name of the email template
var language = "language_example"; // string | The language to use for the email. Defaults to the current user's language if unspecified. (optional)
try
{
// Send a Test Email
apiInstance.SendTestEmail(brandId, templateName, language);
}
catch (ApiException e)
{
Debug.Print("Exception when calling CustomTemplatesApi.SendTestEmail: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
brandId | string | The ID of the brand | |
templateName | string | The name of the email template | |
language | string | The language to use for the email. Defaults to the current user's language if unspecified. | [optional] |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | Successfully sent a test email. | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]