Post
/cmsTemplates/render
Takes no request body.
Query parameters
templateId
integer (int64) Required
The numeric ID of the template.
Responses
200
The template, with its content rendered.
Example response:
{
"id": 9168,
"name": "November newsletter",
"description": "Monthly newsletter template",
"content": "<html><body><div data-block-area=\"main\"><p style=\"background-color: #FFFFFF\">Welcome to our newsletter</p></div></body></html>",
"tags": "newsletter",
"encoding": "UTF-8",
"imageHandlingMode": "none",
"variables": "{\"defaultBGColor\": {\"id\": \"def-bgColor\", \"name\": \"Default Background Color\", \"type\": \"text\", \"value\": \"#FFFFFF\", \"group\": \"System Defaults\", \"order\": 1, \"inline\": \"false\"}, \"imagetype\": {\"id\": \"314f6ef8-37df-470a-beea-6b630832df29\", \"name\": \"Image Link Settings\", \"type\": \"list\", \"value\": \"withlink\", \"options\": {\"Image w/ URL\": \"withlink\", \"Image w/o URL\": \"nolink\"}, \"group\": \"Variables\", \"order\": 2, \"inline\": \"false\"}}",
"lifecycleStatus": "ACTIVE",
"status": "WORKINPROGRESS",
"framework": {
"id": 9070,
"name": "Newsletter layout",
"lifecycleStatus": "ACTIVE"
},
"blocks": [
{
"blockInstanceId": "9405-387799208771704-175632977801977",
"blockId": 9405,
"name": "Welcome text",
"description": "Greeting used in onboarding mails",
"content": "<p style=\"background-color: ${defaultBGColor}\">Welcome to our newsletter</p>",
"renderedContent": null,
"variables": "{\"BLOCKVAR_9405-387799208771704-175632977801977_buttonColor_ENDBLOCKVAR\": {\"id\": \"325a8b38-e9aa-47f4-a47b-f0300e837fec\", \"name\": \"Button Colour\", \"type\": \"text\", \"value\": \"#0055AA\", \"group\": \"Button\", \"order\": 1, \"inline\": \"false\"}}",
"autoUpdate": false,
"encoding": "UTF-8"
}
],
"fallbackContent": null,
"groupId": null,
"messageCategoryId": null,
"createDate": 1792998000000,
"modifyDate": 1793001600000,
"version": 1
}
object
id
integer (int64)
name
string
description
string
content
string
tags
string
encoding
string
imageHandlingMode
string
Valid values[
"host",
"inline",
"none"
]
variables
string
lifecycleStatus
string
Valid values[
"ACTIVE",
"ARCHIVED"
]
status
string
Valid values[
"FINISHED",
"WORKINPROGRESS"
]
framework
object (FrameworkSummary)
id
integer (int64)
name
string
lifecycleStatus
string
Valid values[
"ACTIVE",
"ARCHIVED"
]
blocks
Array of object (BlockInstance)
object
blockInstanceId
string
blockId
integer (int64)
name
string
description
string
content
string
renderedContent
string
variables
string
autoUpdate
boolean
Defaultfalse
encoding
string
fallbackContent
string
groupId
integer (int64)
messageCategoryId
integer (int64)
createDate
integer (int64)
modifyDate
integer (int64)
version
integer (int32)
400
Error. All errors are returned as HTTP 400; errorCode in the body says what went wrong: INVALID_PARAMETER or MISSING_PARAMETER (a parameter is missing or invalid), NO_SUCH_OBJECT (no object with this ID in your account), PERMISSION_DENIED (your user lacks the CMS permission for this action), UNEXPECTED_ERROR (backend error). Example: {"errorActor": "CLIENT", "errorCode": "NO_SUCH_OBJECT", "message": "...", "objectType": null, "propertyName": null, "propertyValue": null}