PATCH
/
email-templates
/
{template_name}
Update 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"
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication using the Authorization header

Path Parameters

template_name
enum<string>
required
Available options:
welcome_email,
password_reset,
email_verification,
invitation

Body

application/json

Response

Template updated successfully

The response is of type object.