POST /admin/communication/templates/{id}/clone-to-locale
将源模板的所有字段(名称、内容、变量等)复制一份到目标语言区域(locale),保持相同的模板编码(code)。用于快速创建多语言模板。如果目标locale已存在同名模板,返回409冲突。参考:ePrivacy Directive 2002/58/EC、CAN-SPAM Act。
通信服务 `bearerAuth` application/json
Request Parameters
| Name | In | Type | Required | Default | Example | Constraints | Description |
id |
path |
string |
Yes |
|
|
|
源模板ID |
Request Body
Schema: dto.CloneTemplateToLocaleRequest
| Field | Type | Required | Example | Constraints | Description |
target_locale |
string |
Yes |
en-US |
|
|
content |
string |
No |
|
|
|
subject |
string |
No |
|
|
|
Referenced Schemas
dto.MessageTemplateDetailResponse
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
data |
dto.MessageTemplateResponse |
No |
|
|
|
message |
string |
No |
|
|
|
timestamp |
string |
No |
|
|
|
dto.MessageTemplateResponse
消息模板数据
| Field | Type | Required | Example | Constraints | Description |
channel |
string |
No |
sms |
|
|
code |
string |
No |
verify_code |
|
|
content |
string |
No |
您的验证码是{code},5分钟内有效 |
|
|
content_type |
string |
No |
text |
|
|
created_at |
string |
No |
2026-04-15T10:00:00Z |
|
|
description |
string |
No |
用于发送登录验证码 |
|
|
id |
string |
No |
tpl_abc123 |
|
|
is_active |
boolean |
No |
True |
|
|
name |
string |
No |
验证码模板 |
|
|
subject |
string |
No |
验证码通知 |
|
|
tenant_id |
string |
No |
tnt_xyz789 |
|
|
updated_at |
string |
No |
2026-04-15T10:00:00Z |
|
|
variables |
array of
string |
No |
['["code"]'] |
|
|
version |
integer |
No |
1 |
|
|
dto.SimpleResponse
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
message |
string |
No |
|
|
|
timestamp |
string |
No |
|
|
|