updateEmailTemplate()
Patches a named email template and returns the updated template.
Usage
The following example shows a basic usage of the backend client from @wacht/nextjs/server.
import { wachtClient } from '@wacht/nextjs/server';export async function updateTemplate(templateName: string, template: EmailTemplate) { const client = await wachtClient(); return client.settings.updateEmailTemplate(templateName, template);}Signature
function updateEmailTemplate( templateName: string, template: EmailTemplate,): Promise<EmailTemplate>EmailTemplate
›templateName?: string | undefined;
templateName?: string | undefined;Target template name.
›template_name?: string | undefined;
template_name?: string | undefined;Template identifier in payload.
›template_data?: string | undefined;
template_data?: string | undefined;Template body/content.
›template_from?: string | undefined;
template_from?: string | undefined;From address.
›template_reply_to?: string | undefined;
template_reply_to?: string | undefined;Reply-to address.
›template_subject?: string | undefined;
template_subject?: string | undefined;Template subject line.
Behavior
- Applies a partial update and returns the server-side updated resource.
- Treat omitted optional fields as unchanged unless explicitly documented otherwise.