Docs › API Reference › Communication Service › POST /admin/communication/templates/{template_id}/preview
POST /admin/communication/templates/{template_id}/preview
Render a specified template with provided variable values, returning the rendered subject, content, and plain text version for preview before sending. Supports both simple and go-template formats. 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
Accepts an empty JSON object {}
Referenced Schemas
dto.DataResponse-dto_PreviewTemplateResponse
Field Type Required Example Constraints Description
code
integer
No
data
dto.PreviewTemplateResponse
No
message
string
No
timestamp
string
No
dto.PreviewTemplateResponse
Template preview rendering result, including channel, subject, body, and plain text rendering effect.
dto.RenderedContent
Field Type Required Example Constraints Description
error
string
No
rendered
string
No
Your verification code is 123456, valid for 5 minutes.
dto.SimpleResponse
Field Type Required Example Constraints Description
code
integer
No
message
string
No
timestamp
string
No