All URIs are relative to https://subdomain.okta.com
Method | HTTP request | Description |
---|---|---|
CreateSmsTemplate | POST /api/v1/templates/sms | Create an SMS Template |
DeleteSmsTemplate | DELETE /api/v1/templates/sms/{templateId} | Delete an SMS Template |
GetSmsTemplate | GET /api/v1/templates/sms/{templateId} | Retrieve an SMS Template |
ListSmsTemplates | GET /api/v1/templates/sms | List all SMS Templates |
ReplaceSmsTemplate | PUT /api/v1/templates/sms/{templateId} | Replace an SMS Template |
UpdateSmsTemplate | POST /api/v1/templates/sms/{templateId} | Update an SMS Template |
SmsTemplate CreateSmsTemplate (SmsTemplate smsTemplate)
Create an SMS Template
Creates a new custom SMS template
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class CreateSmsTemplateExample
{
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 TemplateApi(config);
var smsTemplate = new SmsTemplate(); // SmsTemplate |
try
{
// Create an SMS Template
SmsTemplate result = apiInstance.CreateSmsTemplate(smsTemplate);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TemplateApi.CreateSmsTemplate: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
smsTemplate | SmsTemplate |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
400 | Bad Request | - |
403 | Forbidden | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteSmsTemplate (string templateId)
Delete an SMS Template
Deletes an SMS template
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class DeleteSmsTemplateExample
{
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 TemplateApi(config);
var templateId = 6NQUJ5yR3bpgEiYmq8IC; // string | `id` of the Template
try
{
// Delete an SMS Template
apiInstance.DeleteSmsTemplate(templateId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TemplateApi.DeleteSmsTemplate: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
templateId | string | `id` of the Template |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | No Content | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SmsTemplate GetSmsTemplate (string templateId)
Retrieve an SMS Template
Retrieves a specific template by id
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class GetSmsTemplateExample
{
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 TemplateApi(config);
var templateId = 6NQUJ5yR3bpgEiYmq8IC; // string | `id` of the Template
try
{
// Retrieve an SMS Template
SmsTemplate result = apiInstance.GetSmsTemplate(templateId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TemplateApi.GetSmsTemplate: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
templateId | string | `id` of the Template |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<SmsTemplate> ListSmsTemplates (SmsTemplateType? templateType = null)
List all SMS Templates
Lists all custom SMS templates. A subset of templates can be returned that match a template type.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ListSmsTemplatesExample
{
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 TemplateApi(config);
var templateType = (SmsTemplateType) "SMS_VERIFY_CODE"; // SmsTemplateType? | (optional)
try
{
// List all SMS Templates
List<SmsTemplate> result = apiInstance.ListSmsTemplates(templateType).ToListAsync();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TemplateApi.ListSmsTemplates: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
templateType | SmsTemplateType? | [optional] |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
403 | Forbidden | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SmsTemplate ReplaceSmsTemplate (string templateId, SmsTemplate smsTemplate)
Replace an SMS Template
Replaces the SMS Template > Notes: You can't update the default SMS Template.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ReplaceSmsTemplateExample
{
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 TemplateApi(config);
var templateId = 6NQUJ5yR3bpgEiYmq8IC; // string | `id` of the Template
var smsTemplate = new SmsTemplate(); // SmsTemplate |
try
{
// Replace an SMS Template
SmsTemplate result = apiInstance.ReplaceSmsTemplate(templateId, smsTemplate);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TemplateApi.ReplaceSmsTemplate: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
templateId | string | `id` of the Template | |
smsTemplate | SmsTemplate |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
400 | Bad Request | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SmsTemplate UpdateSmsTemplate (string templateId, SmsTemplate smsTemplate)
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.
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class UpdateSmsTemplateExample
{
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 TemplateApi(config);
var templateId = 6NQUJ5yR3bpgEiYmq8IC; // string | `id` of the Template
var smsTemplate = new SmsTemplate(); // SmsTemplate |
try
{
// Update an SMS Template
SmsTemplate result = apiInstance.UpdateSmsTemplate(templateId, smsTemplate);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling TemplateApi.UpdateSmsTemplate: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
templateId | string | `id` of the Template | |
smsTemplate | SmsTemplate |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
400 | Bad Request | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]