Skip to main content

Get

Retrieve a template by ID or alias using the default context.

Parameters

string
required
The template ID or alias.

Returns

Returns a *Template containing the full template details.

Example


GetWithContext

Retrieve 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.

Returns

Returns a *Template containing the full template details.

Example


Types

Template

Full template object returned by the Get endpoint.
string
The object type, always “template”.
string
The unique identifier of the template.
string
The unique alias of the template.
string
The name of the template.
string
ISO 8601 timestamp of when the template was created.
string
ISO 8601 timestamp of when the template was last updated.
string
The status of the template (e.g., “draft”, “published”).
string
ISO 8601 timestamp of when the template was published.
string
The sender email address.
string
The email subject line.
any
Reply-to email address. Can be a string, array of strings, or null.
string
The HTML content of the email template.
string
The plain text version of the email template.
[]*TemplateVariableResponse
Array of variables defined in the template with their full details.

TemplateVariableResponse

Represents a variable in a template response with additional metadata.
string
The unique identifier of the variable.
string
The variable name.
VariableType
The type of the variable (“string” or “number”).
any
Default value to use if the variable is not provided.
string
ISO 8601 timestamp of when the variable was created.
string
ISO 8601 timestamp of when the variable was last updated.