GET
/templates/{template_type}/{slug}DeprecatedRetrieve a template
Retrieves the details of an email or SMS template by its slug. Use template_type to select the template category and slug to identify the template. This operation is deprecated.
template_typestringrequired
The template category to retrieve: `email` or `sms`.
slugstringrequired
The machine-friendly name of the template to retrieve.
200Returns the template details, including its type, name, slug, editability flags, and available content such as subject, markup, and body.
idstringoptional
objectstringoptional
String representing the object's type. Objects of the same type share the same value.
instance_idstringoptional
The ID of the instance to which the template belongs
resource_typestringoptional
whether this is a system (default) or user overridden) template
template_typestringoptional
whether this is an email or SMS template
namestringoptional
user-friendly name of the template
slugstringoptional
machine-friendly name of the template
positionintegeroptional
position with the listing of templates
can_revertbooleanoptional
whether this template can be reverted to the corresponding system default
can_deletebooleanoptional
whether this template can be deleted
can_edit_bodybooleanoptional
whether the body of this template can be edited
can_togglebooleanoptional
whether this template can be enabled or disabled, true only for notification SMS templates
subjectstringoptional
email subject
markupstringoptional
the editor markup used to generate the body of the template
bodystringoptional
the template body before variable interpolation
available_variablesarray<string>optional
list of variables that are available for use in the template body
required_variablesarray<string>optional
list of variables that must be contained in the template body
from_email_namestringoptional
reply_to_email_namestringoptional
delivered_by_clerkbooleanoptional
enabledbooleanoptional
flagged_as_suspiciousbooleanoptional
updated_atintegeroptional
Unix timestamp of last update.
created_atintegeroptional
Unix timestamp of creation.
400Returned when the request is not successful.
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
401Returned when authentication is invalid.
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
404Returned when the template resource is not found.
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
Error handling
A 400 is returned when the request is not successful, a 401 when authentication is invalid, and a 404 when the template resource is not found. The template_type path parameter must be email or sms, and the slug path parameter must identify a template.