A AuthMS API Wiki API Reference iam.tianv.com →

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

NameInTypeRequiredDefaultExampleConstraintsDescription
id path string Yes 源模板ID

Request Body

Schema: dto.CloneTemplateToLocaleRequest

FieldTypeRequiredExampleConstraintsDescription
target_locale string Yes en-US
content string No
subject string No

Responses

StatusDescriptionSchema
200复制成功,返回新模板详情dto.MessageTemplateDetailResponse
400请求参数错误dto.SimpleResponse
401未认证或令牌无效dto.SimpleResponse
403无权访问该资源dto.SimpleResponse
404源模板不存在dto.SimpleResponse
409目标语言环境已存在同名模板dto.SimpleResponse
500服务内部错误dto.SimpleResponse

Referenced Schemas

dto.MessageTemplateDetailResponse

FieldTypeRequiredExampleConstraintsDescription
code integer No
data dto.MessageTemplateResponse No
message string No
timestamp string No

dto.MessageTemplateResponse

消息模板数据

FieldTypeRequiredExampleConstraintsDescription
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

FieldTypeRequiredExampleConstraintsDescription
code integer No
message string No
timestamp string No