Xsolla-logoXsolla Developers
또는
관리자 페이지로

Create custom email templateServer-side

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

Creates an email template with custom structure, styles, and texts. You can add the variables for some texts to the template. To add the relevant texts for these variables, use the Send email based on template call.

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

찾을 수 없음

409

Conflict

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"
}