POST /internal/notification/templates

内部API,由seed脚本调用,通过请求体直接传入模板title、locale等信息创建模板。受InternalAPIKeyMulti保护。

通知服务 - 内部接口 None application/json

请求体

Schema: service-notification/internal/handler/dto.InternalCreateTemplateRequest

字段类型必填示例约束描述
code string 否
content string 否
format string 否
locale string 否
name string 否
priority string 否
title string 否
type string 否
variables array of

string

否

响应

引用的 Schema

dto.DataResponse-service-notification/internal/handler/dto/TemplateResponse

字段类型必填示例约束描述
code integer 否
data service-notification/internal/handler/dto.TemplateResponse 否
message string 否
timestamp string 否

service-core/base/dto.SimpleResponse

字段类型必填示例约束描述
code integer 否
message string 否
timestamp string 否

service-notification/internal/handler/dto.TemplateResponse

通知模板信息

字段类型必填示例约束描述
content string 否 亲爱的{{user_name}},欢迎加入{{app_name}}! 内容
created_at string 否 2026-01-01T00:00:00Z 创建时间
name string 否 welcome_notification 模板名称
subject string 否 欢迎加入{{app_name}} 主题
template_id string 否 tpl_abc123 模板ID
type string 否 system 类型
variables array of

string

否 ['["user_name"', '"app_name"]'] 变量