Update an email template
curl --request PATCH \
--url https://api.wacht.dev/email-templates/{template_name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"subject": "<string>",
"html_body": "<string>",
"text_body": "<string>"
}'
{
"name": "welcome_email",
"subject": "Welcome to {{app_name}}!",
"html_body": "<h1>Welcome {{user.name}}!</h1><p>Thank you for joining us.</p>",
"text_body": "Welcome {{user.name}}! Thank you for joining us.",
"variables": [
"user.name",
"user.email",
"app_name"
],
"updated_at": "2023-11-07T05:31:56Z"
}
JWT Bearer token authentication using the Authorization header
welcome_email
, password_reset
, email_verification
, invitation
Template updated successfully
The response is of type object
.
curl --request PATCH \
--url https://api.wacht.dev/email-templates/{template_name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"subject": "<string>",
"html_body": "<string>",
"text_body": "<string>"
}'
{
"name": "welcome_email",
"subject": "Welcome to {{app_name}}!",
"html_body": "<h1>Welcome {{user.name}}!</h1><p>Thank you for joining us.</p>",
"text_body": "Welcome {{user.name}}! Thank you for joining us.",
"variables": [
"user.name",
"user.email",
"app_name"
],
"updated_at": "2023-11-07T05:31:56Z"
}