POST/templates/{template_type}/{slug}/revertDeprecated

Revert a template to its default

Reverts an email or SMS template to its corresponding system default. Use template_type and slug to identify the template to restore.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

2 parameters
template_typestringrequired
The type of template to revert: `email` or `sms`.
Allowed:emailsms
slugstringrequired
The slug identifying the template to revert.

5 status codes
200Returns the reverted template object, including its identifier, template type, slug, and template content.
idstringoptional
objectstringoptional
String representing the object's type. Objects of the same type share the same value.
Allowed:template
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 unsuccessful.
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
401Returned when authentication is invalid.
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
402Returned when payment is required.
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 unsuccessful. A 401 is returned when authentication is invalid. A 402 is returned when payment is required. A 404 is returned when the template resource is not found. The template_type path parameter must be email or sms, and the slug path parameter identifies the template to revert.