Skip to content

Render preview of unsaved template

POST
/communication/template-text/template-texts/{id}/rendered
Required scope: templatetext:read

Renders content that has not been saved exactly like GET /rendered renders the saved template, for the editor while the form has unsaved changes. Nothing is stored: no write, no history entry, no projection, and no check that the template has changed. A field that is left out uses the stored template; a field that is sent replaces the stored one as a whole, like a PUT. The body and the translation values are cleaned like a save cleans them. The source locale, the settings and the usage type are always the stored ones. The body of a save (PUT) can be sent as it is with locale and country added: the fields that a preview does not use are ignored. Only mistakes are refused, not what is incomplete: a language without a subject or translations falls back to the source locale, and a token without a translation is returned in unresolvedTokens. The countries of the request (country settings, country blocks) are not looked up and appear in countries as they are; only the requested country must be in the company's country table, or be OTHER. The countries of the response are those of the unsaved content.

Request body ​

Response ​

The rendered preview of the unsaved content.