v13

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-04237161688.6 KB
Email & SMS Templates

Toggle the delivery by Clerk for a template of a given type and slug

Toggles the delivery by Clerk for a template of a given type and slug. If disabled, Clerk will not deliver the resulting email or SMS. The app developer will need to listen to the email.created or sms.created webhooks in order to handle delivery themselves.

post/templates/{template_type}/{slug}/toggle_delivery

Path parameters

template_type'email' | 'sms' required

The type of template to toggle delivery for

slugstring required

The slug of the template for which to toggle delivery

Request body

delivered_by_clerkboolean

Whether Clerk should deliver emails or SMS messages based on the current template

Response

Success

idstring
object'template'

String representing the object's type. Objects of the same type share the same value.

instance_idstring nullable

The ID of the instance to which the template belongs

resource_typestring

whether this is a system (default) or user overridden) template

template_typestring

whether this is an email or SMS template

namestring

user-friendly name of the template

slugstring

machine-friendly name of the template

positioninteger

position with the listing of templates

can_revertboolean

whether this template can be reverted to the corresponding system default

can_deleteboolean

whether this template can be deleted

can_edit_bodyboolean

whether the body of this template can be edited

can_toggleboolean

whether this template can be enabled or disabled, true only for notification SMS templates

subjectstring nullable

email subject

markupstring

the editor markup used to generate the body of the template

bodystring

the template body before variable interpolation

available_variablesstring[]

list of variables that are available for use in the template body

required_variablesstring[]

list of variables that must be contained in the template body

from_email_namestring
reply_to_email_namestring
delivered_by_clerkboolean
enabledboolean
flagged_as_suspiciousboolean
updated_atinteger

Unix timestamp of last update.

created_atinteger

Unix timestamp of creation.