Update
Update a template by ID or alias using the default context.Parameters
string
required
The template ID or alias.
*UpdateTemplateRequest
required
The template update parameters.
Returns
Returns an*UpdateTemplateResponse containing the updated template ID.
Example
UpdateWithContext
Update a template by ID or alias with a custom context.Parameters
context.Context
required
Context for the request, useful for timeouts and cancellation.
string
required
The template ID or alias.
*UpdateTemplateRequest
required
The template update parameters.
Returns
Returns an*UpdateTemplateResponse containing the updated template ID.
Example
Types
UpdateTemplateRequest
Request payload for updating a template.string
required
The name of the template.
string
A unique alias for the template. Can be used instead of the ID to reference the template.
string
The sender email address. Can be a plain email or formatted as “Name <email@example.com>”.
string
The email subject line. Can include template variables like
{{{variable_name}}}.any
Reply-to email address. Can be a string or array of strings.
string
required
The HTML content of the email template. Use
{{{variable_name}}} syntax for variables.Important: All variables referenced in Html must be declared in the Variables array, or the API will return a validation error.string
Plain text version of the email template.
[]*TemplateVariable
Array of variable declarations used in the template. All variables referenced in Html or Subject must be declared here.
UpdateTemplateResponse
Response from updating a template.string
The unique identifier of the updated template.
string
The object type, always “template”.