Class EmailTemplatesClient
- Namespace
- Auth0.Management
Api .Clients
- Assembly
- Auth0.ManagementApi.dll
Contains methods to access the /email-templates endpoints.
- Inheritance
-
Email
Templates Client
- Implements
- Inherited Members
Constructors
EmailTemplatesClient(IManagementConnection, Uri, IDictionary<string, string>)
Creates a new instance of Email
public EmailTemplatesClient(IManagementConnection connection, Uri baseUri, IDictionary<string, string> defaultHeaders)
Parameters
connection
IManagementConnection IManagement
Connection used to make all API calls.baseUri
UriUri 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
EmailTemplate Create Request The Email
Template containing details of the template to create.Create Request cancellationToken
CancellationToken The cancellation token to cancel operation.
Returns
- Task<Email
Template > The newly created Email
Template .
GetAsync(EmailTemplateName, CancellationToken)
Gets an email template.
public Task<EmailTemplate> GetAsync(EmailTemplateName templateName, CancellationToken cancellationToken = default)
Parameters
templateName
EmailTemplate Name The name of email template you wish to retrieve.
cancellationToken
CancellationToken The cancellation token to cancel operation.
Returns
- Task<Email
Template > The Email
Template that was requested.
PatchAsync(EmailTemplateName, EmailTemplatePatchRequest, CancellationToken)
Updates an email template.
public Task<EmailTemplate> PatchAsync(EmailTemplateName templateName, EmailTemplatePatchRequest request, CancellationToken cancellationToken = default)
Parameters
templateName
EmailTemplate Name The name of the email template to update.
request
EmailTemplate Patch Request The Email
Template containing details of the template to patch.Patch Request cancellationToken
CancellationToken The cancellation token to cancel operation.
Returns
- Task<Email
Template > The newly updated Email
Template .
UpdateAsync(EmailTemplateName, EmailTemplateUpdateRequest, CancellationToken)
Updates an email template.
public Task<EmailTemplate> UpdateAsync(EmailTemplateName templateName, EmailTemplateUpdateRequest request, CancellationToken cancellationToken = default)
Parameters
templateName
EmailTemplate Name The name of the email template to patch.
request
EmailTemplate Update Request The Email
Template containing details of the template to update.Update Request cancellationToken
CancellationToken The cancellation token to cancel operation.
Returns
- Task<Email
Template > The newly updated Email
Template .