Skip to content

Latest commit

 

History

History
155 lines (102 loc) · 3.7 KB

email-templates.md

File metadata and controls

155 lines (102 loc) · 3.7 KB

Email Templates

4 operation(s). Part of the API index.

Call these as client.<service>.<method>(...). <service> is the client field for this group — the README lists the field name for every service. These pages group operations the way the OpenAPI specification tags them, which is not always one field per page.


addEmailTemplate

POST /v2/manage/email-templates

Create Email template

Adds a new Email template to the Tenant's configuration.

Example

public static void callAddEmailTemplate(LoginRadiusClient client) {
  EmailTemplateModel emailTemplateModel = new EmailTemplateModel().templateType("<templateType>").template("<template>").subject("<subject>"); //Required

  try {
    var response = client.emailTemplates.addEmailTemplate(emailTemplateModel);
    System.out.println(response);
  } catch (ApiException e) {
    LoginRadiusException lr = LoginRadiusClient.toLoginRadiusException(e);
    System.err.println(lr.description());
  }
}

Request body

EmailTemplateModel as application/json.

Returns

EmailTemplateResponse


deleteEmailTemplate

DELETE /v2/manage/email-templates/{templateType}

Delete Email Template

Deletes the Email template for a specified Email template type within a specific Tenant.

Example

public static void callDeleteEmailTemplate(LoginRadiusClient client) {
  String templateType = "<templateType>"; //Required
  DeleteEmailTemplate deleteEmailTemplate = new DeleteEmailTemplate().templateName("<templateName>"); //Optional

  try {
    var response = client.emailTemplates.deleteEmailTemplate(templateType, deleteEmailTemplate);
    System.out.println(response);
  } catch (ApiException e) {
    LoginRadiusException lr = LoginRadiusClient.toLoginRadiusException(e);
    System.err.println(lr.description());
  }
}

Parameters

Name In Type Required Description
templateType path string yes The type of Email template to delete.

Request body

DeleteEmailTemplate as application/json.

Returns

DeleteResponse


getEmailTemplates

GET /v2/manage/email-templates

List Email templates

Retrieves all Email templates configured for the Tenant.

Example

public static void callGetEmailTemplates(LoginRadiusClient client) {
  try {
    var response = client.emailTemplates.getEmailTemplates();
    System.out.println(response);
  } catch (ApiException e) {
    LoginRadiusException lr = LoginRadiusClient.toLoginRadiusException(e);
    System.err.println(lr.description());
  }
}

Returns

object


updateEmailTemplate

PUT /v2/manage/email-templates/{templateType}

Update Email Template

Updates the Email template for a specified Email template type within a specific Tenant.

Example

public static void callUpdateEmailTemplate(LoginRadiusClient client) {
  String templateType = "<templateType>"; //Required
  UpdateEmailTemplate updateEmailTemplate = new UpdateEmailTemplate().template("<template>").subject("<subject>"); //Required

  try {
    var response = client.emailTemplates.updateEmailTemplate(templateType, updateEmailTemplate);
    System.out.println(response);
  } catch (ApiException e) {
    LoginRadiusException lr = LoginRadiusClient.toLoginRadiusException(e);
    System.err.println(lr.description());
  }
}

Parameters

Name In Type Required Description
templateType path string yes The type of Email template to delete.

Request body

UpdateEmailTemplate as application/json.

Returns

EmailTemplateResponse