Table of Contents

Class EmailTemplatesClient

Namespace
Auth0.ManagementApi.Clients
Assembly
Auth0.ManagementApi.dll

Contains methods to access the /email-templates endpoints.

public class EmailTemplatesClient : BaseClient, IEmailTemplatesClient
Inheritance
EmailTemplatesClient
Implements
Inherited Members

Constructors

EmailTemplatesClient(IManagementConnection, Uri, IDictionary<string, string>)

Creates a new instance of EmailTemplatesClient.

public EmailTemplatesClient(IManagementConnection connection, Uri baseUri, IDictionary<string, string> defaultHeaders)

Parameters

connection IManagementConnection

IManagementConnection used to make all API calls.

baseUri Uri

Uri of the endpoint to use in making API calls.

defaultHeaders IDictionary<string, string>

Dictionary containing default headers included with every request this client makes.

Methods

CreateAsync(EmailTemplateCreateRequest, CancellationToken)

Creates a new email template.

public Task<EmailTemplate> CreateAsync(EmailTemplateCreateRequest request, CancellationToken cancellationToken = default)

Parameters

request EmailTemplateCreateRequest

The EmailTemplateCreateRequest containing details of the template to create.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<EmailTemplate>

The newly created EmailTemplate.

GetAsync(EmailTemplateName, CancellationToken)

Gets an email template.

public Task<EmailTemplate> GetAsync(EmailTemplateName templateName, CancellationToken cancellationToken = default)

Parameters

templateName EmailTemplateName

The name of email template you wish to retrieve.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<EmailTemplate>

The EmailTemplate that was requested.

PatchAsync(EmailTemplateName, EmailTemplatePatchRequest, CancellationToken)

Updates an email template.

public Task<EmailTemplate> PatchAsync(EmailTemplateName templateName, EmailTemplatePatchRequest request, CancellationToken cancellationToken = default)

Parameters

templateName EmailTemplateName

The name of the email template to update.

request EmailTemplatePatchRequest

The EmailTemplatePatchRequest containing details of the template to patch.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<EmailTemplate>

The newly updated EmailTemplate.

UpdateAsync(EmailTemplateName, EmailTemplateUpdateRequest, CancellationToken)

Updates an email template.

public Task<EmailTemplate> UpdateAsync(EmailTemplateName templateName, EmailTemplateUpdateRequest request, CancellationToken cancellationToken = default)

Parameters

templateName EmailTemplateName

The name of the email template to patch.

request EmailTemplateUpdateRequest

The EmailTemplateUpdateRequest containing details of the template to update.

cancellationToken CancellationToken

The cancellation token to cancel operation.

Returns

Task<EmailTemplate>

The newly updated EmailTemplate.