Docs › API Reference › Communication Service › PUT /admin/communication/templates/{template_id}
PUT /admin/communication/templates/{template_id}
Update the name, content, variable list, and other fields of a specified template. After update, the template version number is automatically incremented, and the old version is retained in the version history. Supports modifying the template's activation status. References: ePrivacy Directive 2002/58/EC, CAN-SPAM Act.
Communication Service `bearerAuth` application/json
Request Parameters
Name In Type Required Default Example Constraints Description
id
path
string
Yes
Template ID
Request Body
Schema: dto.UpdateTemplateRequest
Field Type Required Example Constraints Description
content
string
No
Your verification code is {code}, valid for 10 minutes.
content_type
string
No
text
description
string
No
Updated verification code template
format
string
No
go-template
is_active
boolean
No
True
name
string
No
Verification code template v2
subject
string
No
Verification code notification v2
text_content
string
No
Your code is {code}, valid for 10 min
variables
array ofstring
No
['["code"]']
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
Message template data
Field Type Required Example Constraints Description
channel
string
No
sms
code
string
No
verify_code
content
string
No
Your verification code is {code}, valid for 5 minutes.
content_type
string
No
text
created_at
string
No
2026-04-15T10:00:00Z
description
string
No
Used to send login verification codes.
id
string
No
tpl_abc123
is_active
boolean
No
True
name
string
No
Verification code template
subject
string
No
Verification code notification
tenant_id
string
No
tnt_xyz789
updated_at
string
No
2026-04-15T10:00:00Z
variables
array ofstring
No
['["code"]']
version
integer
No
1
dto.SimpleResponse
Field Type Required Example Constraints Description
code
integer
No
message
string
No
timestamp
string
No