All URIs are relative to https://subdomain.okta.com
Method | HTTP request | Description |
---|---|---|
CreateEmailServer | POST /api/v1/email-servers | Create a custom SMTP server |
DeleteEmailServer | DELETE /api/v1/email-servers/{emailServerId} | Delete an SMTP Server configuration |
GetEmailServer | GET /api/v1/email-servers/{emailServerId} | Retrieve an SMTP Server configuration |
ListEmailServers | GET /api/v1/email-servers | List all enrolled SMTP servers |
TestEmailServer | POST /api/v1/email-servers/{emailServerId}/test | Test an SMTP Server configuration |
UpdateEmailServer | PATCH /api/v1/email-servers/{emailServerId} | Update an SMTP Server configuration |
EmailServerResponse CreateEmailServer (EmailServerPost emailServerPost = null)
Create a custom SMTP server
Creates a custom email SMTP server configuration for your org
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class CreateEmailServerExample
{
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 EmailServerApi(config);
var emailServerPost = new EmailServerPost(); // EmailServerPost | (optional)
try
{
// Create a custom SMTP server
EmailServerResponse result = apiInstance.CreateEmailServer(emailServerPost);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EmailServerApi.CreateEmailServer: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
emailServerPost | EmailServerPost | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
201 | Successfully enrolled server credentials | - |
400 | Bad Request | - |
403 | Forbidden | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void DeleteEmailServer (string emailServerId)
Delete an SMTP Server configuration
Deletes the specified custom SMTP server configuration
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class DeleteEmailServerExample
{
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 EmailServerApi(config);
var emailServerId = "emailServerId_example"; // string |
try
{
// Delete an SMTP Server configuration
apiInstance.DeleteEmailServer(emailServerId);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EmailServerApi.DeleteEmailServer: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
emailServerId | string |
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]
EmailServerListResponse GetEmailServer (string emailServerId)
Retrieve an SMTP Server configuration
Retrieves the specified custom SMTP server configuration
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class GetEmailServerExample
{
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 EmailServerApi(config);
var emailServerId = "emailServerId_example"; // string |
try
{
// Retrieve an SMTP Server configuration
EmailServerListResponse result = apiInstance.GetEmailServer(emailServerId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EmailServerApi.GetEmailServer: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
emailServerId | string |
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
403 | Forbidden | - |
404 | Not Found | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
EmailServerListResponse ListEmailServers ()
List all enrolled SMTP servers
Lists all the enrolled custom SMTP server configurations
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class ListEmailServersExample
{
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 EmailServerApi(config);
try
{
// List all enrolled SMTP servers
EmailServerListResponse result = apiInstance.ListEmailServers();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EmailServerApi.ListEmailServers: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
403 | Forbidden | - |
429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void TestEmailServer (string emailServerId, EmailTestAddresses emailTestAddresses = null)
Test an SMTP Server configuration
Tests the specified custom SMTP Server configuration
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class TestEmailServerExample
{
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 EmailServerApi(config);
var emailServerId = "emailServerId_example"; // string |
var emailTestAddresses = new EmailTestAddresses(); // EmailTestAddresses | (optional)
try
{
// Test an SMTP Server configuration
apiInstance.TestEmailServer(emailServerId, emailTestAddresses);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EmailServerApi.TestEmailServer: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
emailServerId | string | ||
emailTestAddresses | EmailTestAddresses | [optional] |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
204 | No content | - |
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]
EmailServerResponse UpdateEmailServer (string emailServerId, EmailServerRequest emailServerRequest = null)
Update an SMTP Server configuration
Updates the specified custom SMTP server configuration
using System.Collections.Generic;
using System.Diagnostics;
using Okta.Sdk.Api;
using Okta.Sdk.Client;
using Okta.Sdk.Model;
namespace Example
{
public class UpdateEmailServerExample
{
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 EmailServerApi(config);
var emailServerId = "emailServerId_example"; // string |
var emailServerRequest = new EmailServerRequest(); // EmailServerRequest | (optional)
try
{
// Update an SMTP Server configuration
EmailServerResponse result = apiInstance.UpdateEmailServer(emailServerId, emailServerRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling EmailServerApi.UpdateEmailServer: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Name | Type | Description | Notes |
---|---|---|---|
emailServerId | string | ||
emailServerRequest | EmailServerRequest | [optional] |
- Content-Type: application/json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | OK | - |
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]