Xsolla-logoXsolla Developers
前往发布商帐户

Update custom email templateServer-side

put/projects/{project_id}/templates/email/{template_id}/{locale}/{template_type}

Updates the specific custom email template.

SecurityServer
Request
path Parameters
template_type
required
string

type of template

Enum: "custom" "password_reset" "account_confirmation" "email_confirmation" "welcome_email" "passwordless_auth_by_code" "passwordless_auth_by_code_link"
project_id
required
string <uuid>

发布商帐户中的登录管理器项目ID。

template_id
required
string

Name of the template. Can include latin characters, digits, characters “-” and “_”.

locale
required
string

Region of the texts that you provided in the template in the <language code>_<country code> format, where:

Request Body schema: application/json
header
required
string

Email subject.

body
required
string

Email content without opening and closing body tags.

Responses
200

确定

401

未授权

404

未找到

422

无法处理的实体

Request samples
application/json
{
  • "body": "Hi {{first_name}} {{last_name}}!<br>We will be glad to see you on the {{site_link}} page.",
  • "header": "Welcome email"
}
Response samples
application/json
{
  • "body": "Hi {{first_name}} {{last_name}}!<br>We will be glad to see you on the {{site_link}} page.",
  • "header": "Welcome email",
  • "locale": "en_US",
  • "template_id": "Welcome email template",
  • "template_type": "custom"
}