Skip to main content

Preview mail template draft

Preview mail template draft. POST /api/openapi/v1/mail-templates/{template_id}/preview, scope admin.v1.mail-settings.read.

  • Scope: admin.v1.mail-settings.read
  • Permission: Read enterprise mail (mail-settings)
  • Permission type: Read
  • Endpoint: POST/api/openapi/v1/mail-templates/{template_id}/preview

Authentication and request headers

Call with an application API key. This endpoint checks only the scope above; read, manage and execute permissions do not imply one another.
NameLocationTypeRequiredDescriptionExample
AuthorizationheaderstringYesApplication API key, passed as a Bearer token.Bearer qwk_***
X-Request-IdheaderstringNoOptional request tracing identifier; generated by the server if omitted.req-20260831-001

Request parameters

NameLocationTypeRequiredDescriptionExample
template_idpathstringRequiredTemplate ID"<string>"
htmlbodystringRequiredHTML body"<string>"
subjectbodystringRequiredEmail subject"<string>"
textbodystringRequiredPlain text body"<string>"

Request example

cURL

Responses

200 OK
NameTypeRequiredDescriptionExample
htmlstringYesHTML body"<string>"
subjectstringYesEmail subject"<string>"
textstringYesPlain text body"<string>"
Response example
default Flat business error
NameTypeRequiredDescriptionExample
codestringNoStable business error code"<string>"
detailstringYesHuman-readable error description"<string>"
detailsOpenapiErrorDetailsNoTest result details{"field":"<string>","reason":"<string>","suggestion":"<string>"}
details.fieldstringNoRequest field that failed validation"<string>"
details.reasonstringNoStable validation failure reason"<string>"
details.suggestionstringNoSuggested normalized value"<string>"
errorstringYesStable HTTP error type"<string>"
Response example